Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/getsockopt.2
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 | .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd June 3, 2020 | .Dd February 8, 2021 | ||||
.Dt GETSOCKOPT 2 | .Dt GETSOCKOPT 2 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm getsockopt , | .Nm getsockopt , | ||||
.Nm setsockopt | .Nm setsockopt | ||||
.Nd get and set options on sockets | .Nd get and set options on sockets | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libc | .Lb libc | ||||
▲ Show 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | |||||
.It Dv SO_TIMESTAMP Ta "enables reception of a timestamp with datagrams" | .It Dv SO_TIMESTAMP Ta "enables reception of a timestamp with datagrams" | ||||
.It Dv SO_BINTIME Ta "enables reception of a timestamp with datagrams" | .It Dv SO_BINTIME Ta "enables reception of a timestamp with datagrams" | ||||
.It Dv SO_ACCEPTCONN Ta "get listening status of the socket (get only)" | .It Dv SO_ACCEPTCONN Ta "get listening status of the socket (get only)" | ||||
.It Dv SO_DOMAIN Ta "get the domain of the socket (get only)" | .It Dv SO_DOMAIN Ta "get the domain of the socket (get only)" | ||||
.It Dv SO_TYPE Ta "get the type of the socket (get only)" | .It Dv SO_TYPE Ta "get the type of the socket (get only)" | ||||
.It Dv SO_PROTOCOL Ta "get the protocol number for the socket (get only)" | .It Dv SO_PROTOCOL Ta "get the protocol number for the socket (get only)" | ||||
.It Dv SO_PROTOTYPE Ta "SunOS alias for the Linux SO_PROTOCOL (get only)" | .It Dv SO_PROTOTYPE Ta "SunOS alias for the Linux SO_PROTOCOL (get only)" | ||||
.It Dv SO_ERROR Ta "get and clear error on the socket (get only)" | .It Dv SO_ERROR Ta "get and clear error on the socket (get only)" | ||||
.It Dv SO_RERROR Ta "enables receive error reporting" | |||||
.It Dv SO_SETFIB Ta "set the associated FIB (routing table) for the socket (set only)" | .It Dv SO_SETFIB Ta "set the associated FIB (routing table) for the socket (set only)" | ||||
.El | .El | ||||
.Pp | .Pp | ||||
The following options are recognized in | The following options are recognized in | ||||
.Fx : | .Fx : | ||||
.Bl -column SO_LISTENINCQLEN -offset indent | .Bl -column SO_LISTENINCQLEN -offset indent | ||||
.It Dv SO_LABEL Ta "get MAC label of the socket (get only)" | .It Dv SO_LABEL Ta "get MAC label of the socket (get only)" | ||||
.It Dv SO_PEERLABEL Ta "get socket's peer's MAC label (get only)" | .It Dv SO_PEERLABEL Ta "get socket's peer's MAC label (get only)" | ||||
▲ Show 20 Lines • Show All 321 Lines • ▼ Show 20 Lines | |||||
and | and | ||||
.Dv AF_INET6 | .Dv AF_INET6 | ||||
address families. | address families. | ||||
.Dv SO_ERROR | .Dv SO_ERROR | ||||
returns any pending error on the socket and clears | returns any pending error on the socket and clears | ||||
the error status. | the error status. | ||||
It may be used to check for asynchronous errors on connected | It may be used to check for asynchronous errors on connected | ||||
datagram sockets or for other asynchronous errors. | datagram sockets or for other asynchronous errors. | ||||
.Dv SO_RERROR | |||||
indicates that receive buffer overflows should be handled as errors. | |||||
Historically receive buffer overflows have been ignored and programs | |||||
could not tell if they missed messages or messages had been truncated | |||||
because of overflows. | |||||
bcr: You need to make a line break after the sentence stop here. | |||||
Since programs historically do not expect to get receive overflow errors, | |||||
this behavior is not the default. | |||||
.Pp | .Pp | ||||
.Dv SO_LABEL | .Dv SO_LABEL | ||||
returns the MAC label of the socket. | returns the MAC label of the socket. | ||||
.Dv SO_PEERLABEL | .Dv SO_PEERLABEL | ||||
returns the MAC label of the socket's peer. | returns the MAC label of the socket's peer. | ||||
Note that your kernel must be compiled with MAC support. | Note that your kernel must be compiled with MAC support. | ||||
See | See | ||||
.Xr mac 3 | .Xr mac 3 | ||||
▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines |
You need to make a line break after the sentence stop here.