Defines | Functions

ink_sock.cc File Reference

A brief file description. More...

#include "libts.h"
Include dependency graph for ink_sock.cc:

Go to the source code of this file.

Defines

#define CHECK_PLAUSIBLE_SOCKADDR(_n, _f, _l)

Functions

int safe_setsockopt (int s, int level, int optname, char *optval, int optlevel)
int safe_getsockopt (int s, int level, int optname, char *optval, int *optlevel)
int safe_fcntl (int fd, int cmd, int arg)
int safe_set_fl (int fd, int arg)
int safe_clr_fl (int fd, int arg)
int safe_nonblocking (int fd)
int safe_blocking (int fd)
int write_ready (int fd)
int read_ready (int fd)
int safe_ioctl (int fd, int request, char *arg)
int safe_bind (int s, struct sockaddr const *name, int namelen)
int safe_listen (int s, int backlog)
int safe_getsockname (int s, struct sockaddr *name, int *namelen)
char fd_read_char (int fd)
int fd_read_line (int fd, char *s, int len)
int close_socket (int s)
int write_socket (int s, const char *buffer, int length)
int read_socket (int s, char *buffer, int length)

Detailed Description

A brief file description.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file ink_sock.cc.


Define Documentation

#define CHECK_PLAUSIBLE_SOCKADDR (   _n,
  _f,
  _l 
)

Definition at line 55 of file ink_sock.cc.

Referenced by safe_bind().


Function Documentation

int close_socket ( int  s  ) 

Definition at line 239 of file ink_sock.cc.

Referenced by processPacket().

char fd_read_char ( int  fd  ) 

Definition at line 196 of file ink_sock.cc.

References ink_assert.

int fd_read_line ( int  fd,
char *  s,
int  len 
)

Definition at line 211 of file ink_sock.cc.

int read_ready ( int  fd  ) 

Definition at line 139 of file ink_sock.cc.

int read_socket ( int  s,
char *  buffer,
int  length 
)

Definition at line 251 of file ink_sock.cc.

int safe_bind ( int  s,
struct sockaddr const *  name,
int  namelen 
)

Definition at line 165 of file ink_sock.cc.

References CHECK_PLAUSIBLE_SOCKADDR.

Referenced by SocketManager::ink_bind(), and LogSock::listen().

int safe_blocking ( int  fd  ) 

Definition at line 117 of file ink_sock.cc.

References safe_clr_fl().

Referenced by Connection::connect().

int safe_clr_fl ( int  fd,
int  arg 
)

Definition at line 100 of file ink_sock.cc.

References safe_fcntl().

Referenced by safe_blocking().

int safe_fcntl ( int  fd,
int  cmd,
int  arg 
)
int safe_getsockname ( int  s,
struct sockaddr *  name,
int *  namelen 
)
int safe_getsockopt ( int  s,
int  level,
int  optname,
char *  optval,
int *  optlevel 
)
int safe_ioctl ( int  fd,
int  request,
char *  arg 
)

Definition at line 155 of file ink_sock.cc.

int safe_listen ( int  s,
int  backlog 
)

Definition at line 176 of file ink_sock.cc.

Referenced by LogSock::listen(), and Server::listen().

int safe_nonblocking ( int  fd  ) 
int safe_set_fl ( int  fd,
int  arg 
)

Definition at line 89 of file ink_sock.cc.

References safe_fcntl().

Referenced by safe_nonblocking().

int safe_setsockopt ( int  s,
int  level,
int  optname,
char *  optval,
int  optlevel 
)
int write_ready ( int  fd  ) 

Definition at line 123 of file ink_sock.cc.

int write_socket ( int  s,
const char *  buffer,
int  length 
)

Definition at line 245 of file ink_sock.cc.