Module sockopt

Source
Expand description

Socket options as used by setsockopt and getsockopt.

Structs§

AcceptConn
Returns a value indicating whether or not this socket has been marked to accept connections with listen(2).
AlgSetAeadAuthSize
AlgSetKey
AttachReusePortCbpf
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).
BindToDevice
Bind this socket to a particular device like “eth0”.
Broadcast
Set or get the broadcast flag.
DontRoute
Set or get the don’t route flag.
Ip6tOriginalDst
IpMtu
Fetch the current system-estimated Path MTU.
Ipv4RecvErr
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.
Ipv6DontFrag
Set “don’t fragment packet” flag on the IPv6 packet.
Ipv6RecvErr
Control receiving of asynchronous error options.
Ipv6Ttl
Set the unicast hop limit for the socket.
KeepAlive
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.
PassCred
Enable or disable the receiving of the SCM_CREDENTIALS control message.
PeerCredentials
Return the credentials of the foreign process connected to this socket.
PeerPidfd
Return the pidfd of the foreign process connected to this socket.
RcvBuf
Sets or gets the maximum socket receive buffer in bytes.
RcvBufForce
Using this socket option, a privileged (CAP_NET_ADMIN) process can perform the same task as SO_RCVBUF, but the rmem_max limit can be overridden.
ReceiveTimeout
Specify the receiving timeout until reporting an error.
ReceiveTimestamp
Enable or disable the receiving of the SO_TIMESTAMP control message.
ReceiveTimestampns
Enable or disable the receiving of the SO_TIMESTAMPNS control message.
ReuseAddr
Enables local address reuse
ReusePort
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.
SendTimeout
Specify the sending timeout until reporting an error.
SndBuf
Sets or gets the maximum socket send buffer in bytes.
SndBufForce
Using this socket option, a privileged (CAP_NET_ADMIN) process can perform the same task as SO_SNDBUF, but the wmem_max limit can be overridden.
SockType
Gets the socket type as an integer.
SocketError
Get and clear the pending socket error.
TcpMaxSeg
The maximum segment size for outgoing TCP packets.
TcpNoDelay
Used to disable Nagle’s algorithm.
TcpRepair
TcpTlsRx
Set the Kernel TLS read parameters on the TCP socket.
TcpTlsTx
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§

TlsCryptoInfo
Value used with the TcpTlsTx and TcpTlsRx socket options.