Deleted Added
full compact
getsockopt.2 (302408) getsockopt.2 (338617)
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 12 unchanged lines hidden (view full) ---

21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 12 unchanged lines hidden (view full) ---

21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95
29.\" $FreeBSD: stable/11/lib/libc/sys/getsockopt.2 249166 2013-04-05 18:09:43Z gnn $
29.\" $FreeBSD: stable/11/lib/libc/sys/getsockopt.2 338617 2018-09-12 18:52:18Z sobomax $
30.\"
31.Dd April 5, 2013
32.Dt GETSOCKOPT 2
33.Os
34.Sh NAME
35.Nm getsockopt ,
36.Nm setsockopt
37.Nd get and set options on sockets

--- 144 unchanged lines hidden (view full) ---

182.Fx :
183.Bl -column SO_LISTENINCQLEN -offset indent
184.It Dv SO_LABEL Ta "get MAC label of the socket (get only)"
185.It Dv SO_PEERLABEL Ta "get socket's peer's MAC label (get only)"
186.It Dv SO_LISTENQLIMIT Ta "get backlog limit of the socket (get only)"
187.It Dv SO_LISTENQLEN Ta "get complete queue length of the socket (get only)"
188.It Dv SO_LISTENINCQLEN Ta "get incomplete queue length of the socket (get only)"
189.It Dv SO_USER_COOKIE Ta "set the 'so_user_cookie' value for the socket (uint32_t, set only)"
30.\"
31.Dd April 5, 2013
32.Dt GETSOCKOPT 2
33.Os
34.Sh NAME
35.Nm getsockopt ,
36.Nm setsockopt
37.Nd get and set options on sockets

--- 144 unchanged lines hidden (view full) ---

182.Fx :
183.Bl -column SO_LISTENINCQLEN -offset indent
184.It Dv SO_LABEL Ta "get MAC label of the socket (get only)"
185.It Dv SO_PEERLABEL Ta "get socket's peer's MAC label (get only)"
186.It Dv SO_LISTENQLIMIT Ta "get backlog limit of the socket (get only)"
187.It Dv SO_LISTENQLEN Ta "get complete queue length of the socket (get only)"
188.It Dv SO_LISTENINCQLEN Ta "get incomplete queue length of the socket (get only)"
189.It Dv SO_USER_COOKIE Ta "set the 'so_user_cookie' value for the socket (uint32_t, set only)"
190.It Dv SO_TS_CLOCK Ta "set specific format of timestamp returned by SO_TIMESTAMP"
190.El
191.Pp
192.Dv SO_DEBUG
193enables debugging in the underlying protocol modules.
194.Pp
195.Dv SO_REUSEADDR
196indicates that the rules used in validating addresses supplied
197in a

--- 232 unchanged lines hidden (view full) ---

430for
431.Dv SO_TIMESTAMP
432and
433.Vt "struct bintime"
434for
435.Dv SO_BINTIME .
436The
437.Vt cmsghdr
191.El
192.Pp
193.Dv SO_DEBUG
194enables debugging in the underlying protocol modules.
195.Pp
196.Dv SO_REUSEADDR
197indicates that the rules used in validating addresses supplied
198in a

--- 232 unchanged lines hidden (view full) ---

431for
432.Dv SO_TIMESTAMP
433and
434.Vt "struct bintime"
435for
436.Dv SO_BINTIME .
437The
438.Vt cmsghdr
438fields have the following values for TIMESTAMP:
439fields have the following values for TIMESTAMP by default:
439.Bd -literal
440 cmsg_len = CMSG_LEN(sizeof(struct timeval));
441 cmsg_level = SOL_SOCKET;
442 cmsg_type = SCM_TIMESTAMP;
443.Ed
444.Pp
445and for
446.Dv SO_BINTIME :
447.Bd -literal
448 cmsg_len = CMSG_LEN(sizeof(struct bintime));
449 cmsg_level = SOL_SOCKET;
450 cmsg_type = SCM_BINTIME;
451.Ed
452.Pp
440.Bd -literal
441 cmsg_len = CMSG_LEN(sizeof(struct timeval));
442 cmsg_level = SOL_SOCKET;
443 cmsg_type = SCM_TIMESTAMP;
444.Ed
445.Pp
446and for
447.Dv SO_BINTIME :
448.Bd -literal
449 cmsg_len = CMSG_LEN(sizeof(struct bintime));
450 cmsg_level = SOL_SOCKET;
451 cmsg_type = SCM_BINTIME;
452.Ed
453.Pp
454Additional timestamp types are available by following
455.Dv SO_TIMESTAMP
456with
457.Dv SO_TS_CLOCK ,
458which requests specific timestamp format to be returned instead of
459.Dv SCM_TIMESTAMP when
460.Dv SO_TIMESTAMP is enabled.
461The following
462.Dv SO_TS_CLOCK
463values are recognized in
464.Fx :
465.Bl -column SO_TS_CLOCK -offset indent
466.It Dv SO_TS_REALTIME_MICRO Ta "realtime (SCM_TIMESTAMP, struct timeval), default"
467.It Dv SO_TS_BINTIME Ta "realtime (SCM_BINTIME, struct bintime)"
468.It Dv SO_TS_REALTIME Ta "realtime (SCM_REALTIME, struct timespec)"
469.It Dv SO_TS_MONOTONIC Ta "monotonic time (SCM_MONOTONIC, struct timespec)"
470.El
471.Pp
453.Dv SO_ACCEPTCONN ,
454.Dv SO_TYPE ,
455.Dv SO_PROTOCOL
456(and its alias
457.Dv SO_PROTOTYPE )
458and
459.Dv SO_ERROR
460are options used only with

--- 92 unchanged lines hidden ---
472.Dv SO_ACCEPTCONN ,
473.Dv SO_TYPE ,
474.Dv SO_PROTOCOL
475(and its alias
476.Dv SO_PROTOTYPE )
477and
478.Dv SO_ERROR
479are options used only with

--- 92 unchanged lines hidden ---