Go to the documentation of this file.
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))
42 #include <sys/types.h>
56 #ifndef SOCKET_POOL_SIZE
57 #ifdef MODULE_SOCK_TCP
58 #define SOCKET_POOL_SIZE (6)
60 #define SOCKET_POOL_SIZE (4)
68 #ifndef SOCKET_TCP_QUEUE_SIZE
69 #ifdef MODULE_SOCK_TCP
70 #define SOCKET_TCP_QUEUE_SIZE (2)
72 #define SOCKET_TCP_QUEUE_SIZE (0)
83 #define SOCKADDR_MAX_DATA_LEN (26)
89 #define SOCK_DGRAM (1)
91 #define SOCK_SEQPACKET (3)
92 #define SOCK_STREAM (4)
95 #define SOL_SOCKET (-1)
102 #define SO_ACCEPTCONN (0)
103 #define SO_BROADCAST (1)
105 #define SO_DONTROUTE (3)
107 #define SO_KEEPALIVE (5)
108 #define SO_LINGER (6)
109 #define SO_OOBINLINE (7)
110 #define SO_RCVBUF (8)
111 #define SO_RCVLOWAT (9)
112 #define SO_RCVTIMEO (10)
113 #define SO_REUSEADDR (11)
114 #define SO_SNDBUF (12)
115 #define SO_SNDLOWAT (13)
116 #define SO_SNDTIMEO (14)
120 typedef unsigned short sa_family_t;
353 ssize_t
recvfrom(
int socket,
void *__restrict buffer,
size_t length,
int flags,
354 struct sockaddr *__restrict address,
380 static inline ssize_t
recv(
int socket,
void *buffer,
size_t length,
int flags)
426 ssize_t
sendto(
int socket,
const void *buffer,
size_t length,
int flags,
450 static inline ssize_t
send(
int socket,
const void *buffer,
size_t length,
477 int socket(
int domain,
int type,
int protocol);
494 int setsockopt(
int socket,
int level,
int option_name,
const void *option_value,
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.
int connect(int socket, const struct sockaddr *address, socklen_t address_len)
Connect a socket.
uint8_t ss_data[SOCKADDR_MAX_DATA_LEN]
Socket address.
Implementation based socket address table.
int accept(int socket, struct sockaddr *__restrict address, socklen_t *__restrict address_len)
Accept a new connection on a socket.
sa_family_t ss_family
Address family.
int getsockname(int socket, struct sockaddr *__restrict address, socklen_t *__restrict address_len)
Get the socket name.
Used to define the socket address.
int getpeername(int socket, struct sockaddr *__restrict address, socklen_t *__restrict address_len)
Get the name of the peer 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.
libc header for scatter/gather I/O
unsigned short sa_family_t
address family type
static ssize_t recv(int socket, void *buffer, size_t length, int flags)
Receive a message from a connected socket.
Global UNIX address family definitions.
int listen(int socket, int backlog)
Listen for socket connections and limit the queue of incoming connections.
int bind(int socket, const struct sockaddr *address, socklen_t address_len)
Bind a name to a socket.
static int getsockopt(int socket, int level, int option_name, void *option_value, socklen_t *option_len)
int socket(int domain, int type, int protocol)
Create an endpoint for communication.
size_t socklen_t
socket address length
System-internal byte operations.
static ssize_t send(int socket, const void *buffer, size_t length, int flags)
Send a message on a socket.
sa_family_t sa_family
Address family.
#define SOCKADDR_MAX_DATA_LEN
Maximum data length for a socket address.
Types used by the kernel.