Go to the documentation of this file.
21 #ifndef __SYS_SOCKET_H
22 #define __SYS_SOCKET_H
24 #include <sys/cdefs.h>
25 #include <sys/types.h>
51 #define _SS_MAXSIZE 128
54 #define _SS_ALIGNSIZE (sizeof(__uint64_t))
57 #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(sa_family_t))
60 #define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(sa_family_t) + \
61 _SS_PAD1SIZE + _SS_ALIGNSIZE))
119 #define SO_ACCEPTCONN 1
120 #define SO_BROADCAST 2
122 #define SO_DONTROUTE 4
124 #define SO_KEEPALIVE 6
126 #define SO_OOBINLINE 8
128 #define SO_RCVLOWAT 10
129 #define SO_RCVTIMEO 11
130 #define SO_REUSEADDR 12
132 #define SO_SNDLOWAT 14
133 #define SO_SNDTIMEO 15
149 #define MSG_CTRUNC 0x01
150 #define MSG_DONTROUTE 0x02
153 #define MSG_PEEK 0x10
154 #define MSG_TRUNC 0x20
155 #define MSG_WAITALL 0x40
156 #define MSG_DONTWAIT 0x80
166 #define PF_INET AF_INET
169 #define PF_INET6 AF_INET6
172 #define SHUT_RD 0x00000001
175 #define SHUT_WR 0x00000002
178 #define SHUT_RDWR (SHUT_RD | SHUT_WR)
254 ssize_t
recv(
int socket,
void *buffer,
size_t length,
int flags);
273 ssize_t
recvfrom(
int socket,
void *buffer,
size_t length,
int flags,
287 ssize_t
send(
int socket,
const void *message,
size_t length,
int flags);
304 ssize_t
sendto(
int socket,
const void *message,
size_t length,
int flags,
333 int socket(
int domain,
int type,
int protocol);
372 int setsockopt(
int socket,
int level,
int option_name,
const void *option_value,