|
| #define | SCM_RIGHTS 1 |
| | Access rights (file descriptors) in ancillary data.
|
| |
| #define | CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + ROUND_UP(sizeof(struct cmsghdr), sizeof(size_t))) |
| | Pointer to ancillary data payload.
|
| |
| #define | CMSG_NXTHDR(mhdr, cmsg) |
| | Next ancillary data object in a message.
|
| |
| #define | CMSG_FIRSTHDR(mhdr) |
| | First ancillary data object in a message.
|
| |
| #define | SOCK_DGRAM NET_SOCK_DGRAM |
| | Datagram socket.
|
| |
| #define | SOCK_RAW NET_SOCK_RAW |
| | Raw socket.
|
| |
| #define | SOCK_SEQPACKET 5 |
| | Sequenced-packet socket.
|
| |
| #define | SOCK_STREAM NET_SOCK_STREAM |
| | Stream socket.
|
| |
| #define | SOL_SOCKET ZSOCK_SOL_SOCKET |
| | Socket-level option level for setsockopt() and getsockopt().
|
| |
| #define | SO_ACCEPTCONN ZSOCK_SO_ACCEPTCONN |
| | Socket is accepting connections.
|
| |
| #define | SO_BROADCAST ZSOCK_SO_BROADCAST |
| | Permit sending broadcast datagrams.
|
| |
| #define | SO_DEBUG ZSOCK_SO_DEBUG |
| | Record debugging information (ignored; for compatibility).
|
| |
| #define | SO_DONTROUTE ZSOCK_SO_DONTROUTE |
| | Bypass routing when sending (ignored; for compatibility).
|
| |
| #define | SO_ERROR ZSOCK_SO_ERROR |
| | Socket error status.
|
| |
| #define | SO_KEEPALIVE ZSOCK_SO_KEEPALIVE |
| | Keep connections alive.
|
| |
| #define | SO_LINGER ZSOCK_SO_LINGER |
| | Linger on close.
|
| |
| #define | SO_OOBINLINE ZSOCK_SO_OOBINLINE |
| | Deliver out-of-band data inline (ignored; for compatibility).
|
| |
| #define | SO_RCVBUF ZSOCK_SO_RCVBUF |
| | Receive buffer size.
|
| |
| #define | SO_RCVLOWAT ZSOCK_SO_RCVLOWAT |
| | Receive low watermark.
|
| |
| #define | SO_RCVTIMEO ZSOCK_SO_RCVTIMEO |
| | Receive timeout.
|
| |
| #define | SO_REUSEADDR ZSOCK_SO_REUSEADDR |
| | Allow local address reuse.
|
| |
| #define | SO_SNDBUF ZSOCK_SO_SNDBUF |
| | Send buffer size.
|
| |
| #define | SO_SNDLOWAT ZSOCK_SO_SNDLOWAT |
| | Send low watermark.
|
| |
| #define | SO_SNDTIMEO ZSOCK_SO_SNDTIMEO |
| | Send timeout.
|
| |
| #define | SO_TYPE ZSOCK_SO_TYPE |
| | Socket type.
|
| |
| #define | SOMAXCONN ZSOCK_SOMAXCONN |
| | Maximum pending connection queue length for listen().
|
| |
| #define | MSG_CTRUNC ZSOCK_MSG_CTRUNC |
| | Control data was truncated.
|
| |
| #define | MSG_DONTROUTE 0x04 |
| | Send without using routing tables.
|
| |
| #define | MSG_EOR 0x80 |
| | Terminates a record (if supported by the protocol).
|
| |
| #define | MSG_OOB 0x01 |
| | Out-of-band data.
|
| |
| #define | MSG_NOSIGNAL 0x4000 |
| | No SIGPIPE on send to a disconnected stream socket.
|
| |
| #define | MSG_PEEK ZSOCK_MSG_PEEK |
| | Peek at incoming data without consuming it.
|
| |
| #define | MSG_TRUNC ZSOCK_MSG_TRUNC |
| | Datagram was truncated.
|
| |
| #define | MSG_WAITALL ZSOCK_MSG_WAITALL |
| | Wait for a full request.
|
| |
| #define | AF_UNSPEC NET_AF_UNSPEC |
| | Unspecified address family.
|
| |
| #define | AF_INET NET_AF_INET |
| | Internet domain sockets for use with IPv4 addresses.
|
| |
| #define | AF_INET6 NET_AF_INET6 |
| | Internet domain sockets for use with IPv6 addresses.
|
| |
| #define | AF_UNIX NET_AF_UNIX |
| | UNIX domain sockets.
|
| |
| #define | SHUT_RD ZSOCK_SHUT_RD |
| | Disables further receive operations.
|
| |
| #define | SHUT_WR ZSOCK_SHUT_WR |
| | Disables further send operations.
|
| |
| #define | SHUT_RDWR ZSOCK_SHUT_RDWR |
| | Disables further send and receive operations.
|
| |
|
| int | accept (int sock, struct sockaddr *addr, socklen_t *addrlen) |
| | Accept a new connection on a listening socket.
|
| |
| int | bind (int sock, const struct sockaddr *addr, socklen_t addrlen) |
| | Assign a local address to a socket.
|
| |
| int | connect (int sock, const struct sockaddr *addr, socklen_t addrlen) |
| | Initiate a connection on a socket.
|
| |
| int | getpeername (int sock, struct sockaddr *addr, socklen_t *addrlen) |
| | Get the address of the peer connected to a socket.
|
| |
| int | getsockname (int sock, struct sockaddr *addr, socklen_t *addrlen) |
| | Get the local address bound to a socket.
|
| |
| int | getsockopt (int sock, int level, int optname, void *optval, socklen_t *optlen) |
| | Get socket options.
|
| |
| int | listen (int sock, int backlog) |
| | Mark a socket as passive (ready to accept connections).
|
| |
| ssize_t | recv (int sock, void *buf, size_t max_len, int flags) |
| | Receive data from a connected socket.
|
| |
| ssize_t | recvfrom (int sock, void *buf, size_t max_len, int flags, struct sockaddr *src_addr, socklen_t *addrlen) |
| | Receive data and the sender's address from a socket.
|
| |
| ssize_t | recvmsg (int sock, struct msghdr *msg, int flags) |
| | Receive a message (with scatter-gather I/O and ancillary data).
|
| |
| ssize_t | send (int sock, const void *buf, size_t len, int flags) |
| | Send data on a connected socket.
|
| |
| ssize_t | sendmsg (int sock, const struct msghdr *message, int flags) |
| | Send a message (with scatter-gather I/O and ancillary data).
|
| |
| ssize_t | sendto (int sock, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen) |
| | Send data to a specific destination address.
|
| |
| int | setsockopt (int sock, int level, int optname, const void *optval, socklen_t optlen) |
| | Set socket options.
|
| |
| int | shutdown (int sock, int how) |
| | Shut down part or all of a full-duplex connection.
|
| |
| int | sockatmark (int s) |
| | Determine whether a socket is at the out-of-band mark.
|
| |
| int | socket (int family, int type, int proto) |
| | Create a new socket.
|
| |
| int | socketpair (int family, int type, int proto, int sv[2]) |
| | Create a pair of connected sockets.
|
| |
POSIX socket API (<sys/socket.h>)
- See also
- POSIX.1-2017 <sys/socket.h>
Definition in file socket.h.