A brief file description. More...
#include "libts.h"
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) |
A brief file description.
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 CHECK_PLAUSIBLE_SOCKADDR | ( | _n, | ||
_f, | ||||
_l | ||||
) |
Definition at line 55 of file ink_sock.cc.
Referenced by safe_bind().
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 | |||
) |
int safe_fcntl | ( | int | fd, | |
int | cmd, | |||
int | arg | |||
) |
Definition at line 79 of file ink_sock.cc.
Referenced by Server::accept(), UDPNetProcessor::CreateUDPSocket(), LogSock::listen(), safe_clr_fl(), safe_set_fl(), Server::setup_fd_for_listen(), Connection::setup_mc_receive(), and Connection::setup_mc_send().
int safe_getsockname | ( | int | s, | |
struct sockaddr * | name, | |||
int * | namelen | |||
) |
Definition at line 186 of file ink_sock.cc.
Referenced by UDPNetProcessor::CreateUDPSocket(), LogSock::listen(), Server::listen(), UnixNetVConnection::set_local_addr(), and UDPNetProcessor::UDPBind().
int safe_getsockopt | ( | int | s, | |
int | level, | |||
int | optname, | |||
char * | optval, | |||
int * | optlevel | |||
) |
Definition at line 69 of file ink_sock.cc.
Referenced by UnixNetVConnection::connectUp(), SocketManager::get_rcvbuf_size(), and SocketManager::get_sndbuf_size().
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 | ) |
Definition at line 111 of file ink_sock.cc.
References safe_set_fl().
Referenced by Server::accept(), NetAccept::acceptFastEvent(), Connection::connect(), DNSConnection::connect(), UnixNetVConnection::connectUp(), Connection::open(), Server::setup_fd_for_listen(), Connection::setup_mc_receive(), and Connection::setup_mc_send().
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 | |||
) |
Definition at line 59 of file ink_sock.cc.
Referenced by Server::accept(), NetAccept::acceptFastEvent(), Connection::apply_options(), LogSock::connect(), DNSConnection::connect(), NetAccept::do_blocking_accept(), LogSock::listen(), Connection::open(), SocketManager::set_rcvbuf_size(), SocketManager::set_sndbuf_size(), Server::setup_fd_for_listen(), Connection::setup_mc_receive(), Connection::setup_mc_send(), and UDPNetProcessor::UDPBind().
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.