Module nix::sys::socket::sockopt

source ·
Expand description

Socket options as used by setsockopt and getsockopt.

Structs§

  • Returns a value indicating whether or not this socket has been marked to accept connections with listen(2).
  • Bind this socket to a particular device like “eth0”.
  • Set or get the broadcast flag.
  • Set or get the don’t route flag.
  • Fetch the current system-estimated Path MTU.
  • Enable extended reliable error message passing.
  • Set or retrieve the current time-to-live field that is used in every packet sent from this socket.
  • Set “don’t fragment packet” flag on the IPv6 packet.
  • Control receiving of asynchronous error options.
  • Set the unicast hop limit for the socket.
  • Enable sending of keep-alive messages on connection-oriented sockets.
  • 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.
  • Set the mark for each packet sent through this socket (similar to the netfilter MARK target but socket-based).
  • If this option is enabled, out-of-band data is directly placed into the receive data stream.
  • Enable or disable the receiving of the SCM_CREDENTIALS control message.
  • Return the credentials of the foreign process connected to this socket.
  • Sets or gets the maximum socket receive buffer in bytes.
  • 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.
  • Specify the receiving timeout until reporting an error.
  • Enable or disable the receiving of the SO_TIMESTAMP control message.
  • Enable or disable the receiving of the SO_TIMESTAMPNS control message.
  • Enables local address reuse
  • Permits multiple AF_INET or AF_INET6 sockets to be bound to an identical socket address.
  • 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.
  • Specify the sending timeout until reporting an error.
  • Sets or gets the maximum socket send buffer in bytes.
  • 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.
  • Gets the socket type as an integer.
  • Get and clear the pending socket error.
  • The maximum segment size for outgoing TCP packets.
  • Specifies exact type of timestamping information collected by the kernel Further reading
  • Configures the behavior of time-based transmission of packets, for use with the TxTime control message.