Expand description
getsockopt
and setsockopt
functions.
In the rustix API, there is a separate function for each option, so that it can be given an option-specific type signature.
§References for all get_*
functions:
- POSIX
getsockopt
- Linux
getsockopt
- Winsock
getsockopt
- Apple
getsockopt
- FreeBSD
getsockopt
- NetBSD
getsockopt
- OpenBSD
getsockopt
- DragonFly BSD
getsockopt
- illumos
getsockopt
- glibc
getsockopt
§References for all set_*
functions:
- POSIX
setsockopt
- Linux
setsockopt
- Winsock
setsockopt
- Apple
setsockopt
- FreeBSD
setsockopt
- NetBSD
setsockopt
- OpenBSD
setsockopt
- DragonFly BSD
setsockopt
- illumos
setsockopt
- glibc
setsockopt
§References for get_socket_*
and set_socket_*
functions:
- References for all
get_*
functions - References for all
set_*
functions - POSIX
sys/socket.h
- Linux
socket
- Winsock
SOL_SOCKET
options - glibc
SOL_SOCKET
Options
§References for get_ip_*
and set_ip_*
functions:
- References for all
get_*
functions - References for all
set_*
functions - POSIX
netinet/in.h
- Linux
ip
- Winsock
IPPROTO_IP
options - Apple
ip
- FreeBSD
ip
- NetBSD
ip
- OpenBSD
ip
- DragonFly BSD
ip
- illumos
ip
§References for get_ipv6_*
and set_ipv6_*
functions:
- References for all
get_*
functions - References for all
set_*
functions - POSIX
netinet/in.h
- Linux
ipv6
- Winsock
IPPROTO_IPV6
options - Apple
ip6
- FreeBSD
ip6
- NetBSD
ip6
- OpenBSD
ip6
- DragonFly BSD
ip6
- illumos
ip6
§References for get_tcp_*
and set_tcp_*
functions:
Enums§
- Timeout identifier for use with
set_socket_timeout
andget_socket_timeout
.
Functions§
getsockopt(fd, IPPROTO_IP, IP_FREEBIND)
getsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP)
getsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL)
getsockopt(fd, IPPROTO_IP, SO_ORIGINAL_DST)
getsockopt(fd, IPPROTO_IP, IP_RECVTOS)
getsockopt(fd, IPPROTO_IP, IP_TOS)
getsockopt(fd, IPPROTO_IP, IP_TTL)
getsockopt(fd, IPPROTO_IPV6, IPV6_FREEBIND)
getsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS)
getsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP)
getsockopt(fd, IPPROTO_IPV6, IP6T_SO_ORIGINAL_DST)
getsockopt(fd, IPPROTO_IPV6, IPV6_RECVTCLASS)
getsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS)
getsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS)
getsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY)
getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN)
getsockopt(fd, SOL_SOCKET, SO_BROADCAST)
getsockopt(fd, SOL_SOCKET, SO_COOKIE)
getsockopt(fd, SOL_SOCKET, SO_DOMAIN)
getsockopt(fd, SOL_SOCKET, SO_ERROR)
getsockopt(fd, SOL_SOCKET, SO_INCOMING_CPU)
getsockopt(fd, SOL_SOCKET, SO_KEEPALIVE)
getsockopt(fd, SOL_SOCKET, SO_LINGER)
getsockopt(fd, SOL_SOCKET, SO_OOBINLINE)
getsockopt(fd, SOL_SOCKET, SO_PASSCRED)
getsockopt(fd, SOL_SOCKET, SO_PEERCRED)
—Get credentials of Unix domain socket peer process.getsockopt(fd, SOL_SOCKET, SO_PROTOCOL)
getsockopt(fd, SOL_SOCKET, SO_RCVBUF)
getsockopt(fd, SOL_SOCKET, SO_REUSEADDR)
getsockopt(fd, SOL_SOCKET, SO_REUSEPORT)
getsockopt(fd, SOL_SOCKET, SO_SNDBUF)
getsockopt(fd, SOL_SOCKET, id)
—Get the sending or receiving timeout.getsockopt(fd, SOL_SOCKET, SO_TYPE)
—Returns the type of a socket.getsockopt(fd, IPPROTO_TCP, TCP_CONGESTION)
getsockopt(fd, IPPROTO_TCP, TCP_CORK)
getsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT)
getsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE)
getsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL)
getsockopt(fd, IPPROTO_TCP, TCP_NODELAY)
getsockopt(fd, IPPROTO_TCP, TCP_QUICKACK)
getsockopt(fd, IPPROTO_TCP, TCP_THIN_LINEAR_TIMEOUTS)
getsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT)
getsockopt(fd, SOL_XDP, XDP_MMAP_OFFSETS)
getsockopt(fd, SOL_XDP, XDP_OPTIONS)
getsockopt(fd, SOL_XDP, XDP_STATISTICS)
setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, multiaddr, interface)
setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, multiaddr, address, ifindex)
setsockopt(fd, IPPROTO_IP, IP_ADD_SOURCE_MEMBERSHIP, value)
setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, multiaddr, interface)
setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, multiaddr, interface)
setsockopt(fd, IPPROTO_IP, IP_DROP_SOURCE_MEMBERSHIP, value)
setsockopt(fd, IPPROTO_IP, IP_FREEBIND, value)
setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, value)
setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, value)
setsockopt(fd, IPPROTO_IP, IP_RECVTOS, value)
setsockopt(fd, IPPROTO_IP, IP_TOS, value)
setsockopt(fd, IPPROTO_IP, IP_TTL, value)
setsockopt(fd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, multiaddr, interface)
setsockopt(fd, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, multiaddr, interface)
setsockopt(fd, IPPROTO_IPV6, IPV6_FREEBIND, value)
setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, value)
setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, value)
setsockopt(fd, IPPROTO_IPV6, IPV6_RECVTCLASS, value)
setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, value)
setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, value)
setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, value)
setsockopt(fd, SOL_SOCKET, SO_BROADCAST, value)
setsockopt(fd, SOL_SOCKET, SO_INCOMING_CPU, value)
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, value)
setsockopt(fd, SOL_SOCKET, SO_LINGER, value)
setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, value)
setsockopt(fd, SOL_SOCKET, SO_PASSCRED, value)
setsockopt(fd, SOL_SOCKET, SO_RCVBUF, value)
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, value)
—Set whether local addresses may be reused inbind
.setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, value)
setsockopt(fd, SOL_SOCKET, SO_SNDBUF, value)
setsockopt(fd, SOL_SOCKET, id, value)
—Set the sending or receiving timeout.setsockopt(fd, IPPROTO_TCP, TCP_CONGESTION, value)
setsockopt(fd, IPPROTO_TCP, TCP_CORK, value)
setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, value)
setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, value)
setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, value)
setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, value)
setsockopt(fd, IPPROTO_TCP, TCP_QUICKACK, value)
setsockopt(fd, IPPROTO_TCP, TCP_THIN_LINEAR_TIMEOUTS, value)
setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, value)
setsockopt(fd, SOL_XDP, XDP_RX_RING, value)
setsockopt(fd, SOL_XDP, XDP_TX_RING, value)
setsockopt(fd, SOL_XDP, XDP_UMEM_COMPLETION_RING, value)
setsockopt(fd, SOL_XDP, XDP_UMEM_FILL_RING, value)
setsockopt(fd, SOL_XDP, XDP_UMEM_REG, value)