Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/getsockopt.2
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | |||||
Except as noted, each may be examined with | Except as noted, each may be examined with | ||||
.Fn getsockopt | .Fn getsockopt | ||||
and set with | and set with | ||||
.Fn setsockopt . | .Fn setsockopt . | ||||
.Bl -column SO_ACCEPTFILTER -offset indent | .Bl -column SO_ACCEPTFILTER -offset indent | ||||
.It Dv SO_DEBUG Ta "enables recording of debugging information" | .It Dv SO_DEBUG Ta "enables recording of debugging information" | ||||
.It Dv SO_REUSEADDR Ta "enables local address reuse" | .It Dv SO_REUSEADDR Ta "enables local address reuse" | ||||
.It Dv SO_REUSEPORT Ta "enables duplicate address and port bindings" | .It Dv SO_REUSEPORT Ta "enables duplicate address and port bindings" | ||||
.It Dv SO_REUSEPORT_LB Ta "enables duplicate address and port bindings with load balancing" | |||||
.It Dv SO_KEEPALIVE Ta "enables keep connections alive" | .It Dv SO_KEEPALIVE Ta "enables keep connections alive" | ||||
.It Dv SO_DONTROUTE Ta "enables routing bypass for outgoing messages" | .It Dv SO_DONTROUTE Ta "enables routing bypass for outgoing messages" | ||||
.It Dv SO_LINGER Ta "linger on close if data present" | .It Dv SO_LINGER Ta "linger on close if data present" | ||||
.It Dv SO_BROADCAST Ta "enables permission to transmit broadcast messages" | .It Dv SO_BROADCAST Ta "enables permission to transmit broadcast messages" | ||||
.It Dv SO_OOBINLINE Ta "enables reception of out-of-band data in band" | .It Dv SO_OOBINLINE Ta "enables reception of out-of-band data in band" | ||||
.It Dv SO_SNDBUF Ta "set buffer size for output" | .It Dv SO_SNDBUF Ta "set buffer size for output" | ||||
.It Dv SO_RCVBUF Ta "set buffer size for input" | .It Dv SO_RCVBUF Ta "set buffer size for input" | ||||
.It Dv SO_SNDLOWAT Ta "set minimum count for output" | .It Dv SO_SNDLOWAT Ta "set minimum count for output" | ||||
Show All 39 Lines | |||||
.Pp | .Pp | ||||
.Dv SO_REUSEPORT | .Dv SO_REUSEPORT | ||||
allows completely duplicate bindings by multiple processes | allows completely duplicate bindings by multiple processes | ||||
if they all set | if they all set | ||||
.Dv SO_REUSEPORT | .Dv SO_REUSEPORT | ||||
before binding the port. | before binding the port. | ||||
This option permits multiple instances of a program to each | This option permits multiple instances of a program to each | ||||
receive UDP/IP multicast or broadcast datagrams destined for the bound port. | receive UDP/IP multicast or broadcast datagrams destined for the bound port. | ||||
.Pp | |||||
.Dv SO_REUSEPORT_LB | |||||
allows completely duplicate bindings by multiple processes | |||||
if they all set | |||||
.Dv SO_REUSEPORT_LB | |||||
before binding the port. | |||||
Incoming TCP and UDP connections are distributed among the sharing | |||||
processes based on a hash function of local port number, foreign IP | |||||
address and port number. A maximum of 256 processes can share one socket. | |||||
.Pp | .Pp | ||||
.Dv SO_KEEPALIVE | .Dv SO_KEEPALIVE | ||||
enables the | enables the | ||||
periodic transmission of messages on a connected socket. | periodic transmission of messages on a connected socket. | ||||
Should the | Should the | ||||
connected party fail to respond to these messages, the connection is | connected party fail to respond to these messages, the connection is | ||||
considered broken and processes using the socket are notified via a | considered broken and processes using the socket are notified via a | ||||
.Dv SIGPIPE | .Dv SIGPIPE | ||||
▲ Show 20 Lines • Show All 359 Lines • Show Last 20 Lines |