34#define _BITS_SOCKADDR_H 1
35#define __SOCKADDR_COMMON(sa_prefix) \
36 sa_family_t sa_prefix##family
38#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int))
57#ifndef SOCKET_POOL_SIZE
59#define SOCKET_POOL_SIZE (6)
61#define SOCKET_POOL_SIZE (4)
69#ifndef SOCKET_TCP_QUEUE_SIZE
71#define SOCKET_TCP_QUEUE_SIZE (2)
73#define SOCKET_TCP_QUEUE_SIZE (0)
84#define SOCKADDR_MAX_DATA_LEN (26)
92#define SOCK_SEQPACKET (3)
93#define SOCK_STREAM (4)
96#define SOL_SOCKET (-1)
103#define SO_ACCEPTCONN (0)
104#define SO_BROADCAST (1)
106#define SO_DONTROUTE (3)
108#define SO_KEEPALIVE (5)
110#define SO_OOBINLINE (7)
112#define SO_RCVLOWAT (9)
113#define SO_RCVTIMEO (10)
114#define SO_REUSEADDR (11)
115#define SO_SNDBUF (12)
116#define SO_SNDLOWAT (13)
117#define SO_SNDTIMEO (14)
360 struct sockaddr *__restrict address,
386static inline ssize_t
recv(
int socket,
void *buffer,
size_t length,
int flags)
432ssize_t
sendto(
int socket,
const void *buffer,
size_t length,
int flags,
456static inline ssize_t
send(
int socket,
const void *buffer,
size_t length,
483int socket(
int domain,
int type,
int protocol);
500int setsockopt(
int socket,
int level,
int option_name,
const void *option_value,
Global UNIX address family definitions.
Platform-independent access to architecture details.
System-internal byte operations.
uint32_t socklen_t
socket address length
unsigned short sa_family_t
address family type
static ssize_t send(int socket, const void *buffer, size_t length, int flags)
Send a message on a socket.
int bind(int socket, const struct sockaddr *address, socklen_t address_len)
Bind a name to a socket.
static ssize_t recv(int socket, void *buffer, size_t length, int flags)
Receive a message from a connected socket.
int accept(int socket, struct sockaddr *__restrict address, socklen_t *__restrict address_len)
Accept a new connection on a socket.
int getpeername(int socket, struct sockaddr *__restrict address, socklen_t *__restrict address_len)
Get the name of the peer socket.
int listen(int socket, int backlog)
Listen for socket connections and limit the queue of incoming connections.
int getsockname(int socket, struct sockaddr *__restrict address, socklen_t *__restrict address_len)
Get the socket name.
static int getsockopt(int socket, int level, int option_name, void *option_value, socklen_t *option_len)
int connect(int socket, const struct sockaddr *address, socklen_t address_len)
Connect a socket.
int socket(int domain, int type, int protocol)
Create an endpoint for communication.
#define SOCKADDR_MAX_DATA_LEN
Maximum data length for a socket address.
ssize_t recvfrom(int socket, void *__restrict buffer, size_t length, int flags, struct sockaddr *__restrict address, socklen_t *__restrict address_len)
Receive a message from a socket.
ssize_t sendto(int socket, const void *buffer, size_t length, int flags, const struct sockaddr *address, socklen_t address_len)
Send a message on a socket.
Implementation based socket address table.
sa_family_t ss_family
Address family.
uint8_t ss_data[SOCKADDR_MAX_DATA_LEN]
Socket address.
Used to define the socket address.
char sa_data[SOCKADDR_MAX_DATA_LEN]
Socket address (variable length data)
sa_family_t sa_family
Address family.
libc header for scatter/gather I/O