Expand description
Socket options as used by setsockopt
and getsockopt
.
Structs§
- Accept
Conn - Returns a value indicating whether or not this socket has been marked to
accept connections with
listen(2)
. - AlgSet
Aead Auth Size - AlgSet
Key - Attach
Reuse Port Cbpf - To be used with
ReusePort
, we can then attach a BPF (classic) to set how the packets are assigned to the socket (e.g. cpu distribution). - Bind
ToDevice - Bind this socket to a particular device like “eth0”.
- Broadcast
- Set or get the broadcast flag.
- Dont
Route - Set or get the don’t route flag.
- Ip6t
Original Dst - IpMtu
- Fetch the current system-estimated Path MTU.
- Ipv4
Recv Err - Enable extended reliable error message passing.
- Ipv4Ttl
- Set or retrieve the current time-to-live field that is used in every packet sent from this socket.
- Ipv6
Dont Frag - Set “don’t fragment packet” flag on the IPv6 packet.
- Ipv6
Recv Err - Control receiving of asynchronous error options.
- Ipv6Ttl
- Set the unicast hop limit for the socket.
- Keep
Alive - Enable sending of keep-alive messages on connection-oriented sockets.
- Linger
- When enabled, a close(2) or shutdown(2) will not return until all queued messages for the socket have been successfully sent or the linger timeout has been reached.
- Mark
- Set the mark for each packet sent through this socket (similar to the netfilter MARK target but socket-based).
- OobInline
- If this option is enabled, out-of-band data is directly placed into the receive data stream.
- Pass
Cred - Enable or disable the receiving of the
SCM_CREDENTIALS
control message. - Peer
Credentials - Return the credentials of the foreign process connected to this socket.
- Peer
Pidfd - Return the pidfd of the foreign process connected to this socket.
- RcvBuf
- Sets or gets the maximum socket receive buffer in bytes.
- RcvBuf
Force - Using this socket option, a privileged (
CAP_NET_ADMIN
) process can perform the same task asSO_RCVBUF
, but thermem_max limit
can be overridden. - Receive
Timeout - Specify the receiving timeout until reporting an error.
- Receive
Timestamp - Enable or disable the receiving of the
SO_TIMESTAMP
control message. - Receive
Timestampns - Enable or disable the receiving of the
SO_TIMESTAMPNS
control message. - Reuse
Addr - Enables local address reuse
- Reuse
Port - Permits multiple AF_INET or AF_INET6 sockets to be bound to an identical socket address.
- RxqOvfl
- Indicates that an unsigned 32-bit value ancillary message (cmsg) should be attached to received skbs indicating the number of packets dropped by the socket since its creation.
- Send
Timeout - Specify the sending timeout until reporting an error.
- SndBuf
- Sets or gets the maximum socket send buffer in bytes.
- SndBuf
Force - Using this socket option, a privileged (
CAP_NET_ADMIN
) process can perform the same task asSO_SNDBUF
, but thewmem_max
limit can be overridden. - Sock
Type - Gets the socket type as an integer.
- Socket
Error - Get and clear the pending socket error.
- TcpMax
Seg - The maximum segment size for outgoing TCP packets.
- TcpNo
Delay - Used to disable Nagle’s algorithm.
- TcpRepair
- TcpTls
Rx - Set the Kernel TLS read parameters on the TCP socket.
- TcpTls
Tx - Set the Kernel TLS write parameters on the TCP socket.
- TcpUlp
- Set the Upper Layer Protocol (ULP) on the TCP socket.
- Timestamping
- Specifies exact type of timestamping information collected by the kernel Further reading
- TxTime
- Configures the behavior of time-based transmission of packets, for use
with the
TxTime
control message.
Enums§
- TlsCrypto
Info - Value used with the
TcpTlsTx
andTcpTlsRx
socket options.