summaryrefslogtreecommitdiff
path: root/usr/src/man
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man')
-rw-r--r--usr/src/man/man3head/Makefile10
-rw-r--r--usr/src/man/man3head/socket.h.3head210
-rw-r--r--usr/src/man/man7p/ip.7p206
3 files changed, 221 insertions, 205 deletions
diff --git a/usr/src/man/man3head/Makefile b/usr/src/man/man3head/Makefile
index 8e1e75e6fb..e06cc32e57 100644
--- a/usr/src/man/man3head/Makefile
+++ b/usr/src/man/man3head/Makefile
@@ -114,6 +114,11 @@ MANFILES= acct.h.3head \
xlocale.h.3head
MANLINKS= \
+ CMSG_DATA.3head \
+ CMSG_FIRSTHDR.3head \
+ CMSG_LEN.3head \
+ CMSG_NXTHDR.3head \
+ CMSG_SPACE.3head \
LIST_CLASS_ENTRY.3head \
LIST_CLASS_HEAD.3head \
LIST_CONCAT.3head \
@@ -295,6 +300,11 @@ MANLINKS += acct.3head \
wordexp.3head \
xlocale.3head
+CMSG_DATA.3head := LINKSRC = socket.h.3head
+CMSG_FIRSTHDR.3head := LINKSRC = socket.h.3head
+CMSG_LEN.3head := LINKSRC = socket.h.3head
+CMSG_NXTHDR.3head := LINKSRC = socket.h.3head
+CMSG_SPACE.3head := LINKSRC = socket.h.3head
LIST_CLASS_ENTRY.3head := LINKSRC = queue.h.3head
LIST_CLASS_HEAD.3head := LINKSRC = queue.h.3head
LIST_CONCAT.3head := LINKSRC = queue.h.3head
diff --git a/usr/src/man/man3head/socket.h.3head b/usr/src/man/man3head/socket.h.3head
index 7324cbf1c5..676e2966b4 100644
--- a/usr/src/man/man3head/socket.h.3head
+++ b/usr/src/man/man3head/socket.h.3head
@@ -42,18 +42,17 @@
.\"
.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved.
.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
.\"
-.TH SOCKET.H 3HEAD "Jun 18, 2017"
+.TH SOCKET.H 3HEAD "Sep 18, 2020"
.SH NAME
-socket.h, socket \- Internet Protocol family
+socket.h, socket, CMSG_DATA, CMSG_FIRSTHDR, CMSG_LEN, CMSG_NXTHDR, CMSG_SPACE \- Internet Protocol family
.SH SYNOPSIS
-.LP
.nf
\fB#include <sys/socket.h>\fR
.fi
.SH DESCRIPTION
-.LP
The \fB<sys/socket.h>\fR header defines the unsigned integral type
\fBsa_family_t\fR through \fBtypedef\fR.
.sp
@@ -70,7 +69,6 @@ char sa_data[] /* socket address (variable-length
.in -2
.SS "\fBlibxnet\fR Interfaces"
-.LP
The \fB<sys/socket.h>\fR header defines the \fBmsghdr\fR structure for
\fBlibxnet\fR interfaces that includes the following members:
.sp
@@ -118,17 +116,17 @@ header defines the following macros for use as the \fBcmsg_type\fR values when
.sp
.ne 2
.na
-\fB\fBSCM_RIGHTS\fR\fR
+\fBSCM_RIGHTS\fR
.ad
.RS 14n
-Indicates that the data array contains the access rights to be sent or
-received.
+Indicates that the data array contains the access rights (set of open file
+descriptors) to be sent or received.
.RE
.sp
.ne 2
.na
-\fB\fBSCM_UCRED\fR\fR
+\fBSCM_UCRED\fR
.ad
.RS 14n
Indicates that the data array contains a \fBucred_t\fR to be received. The
@@ -138,17 +136,12 @@ was sent. This is a Sun-specific, Evolving interface. See \fBucred_get\fR(3C).
.sp
.LP
-The IPv4 data formats generally use the same values for data passed back in
-\fBcmsghdr\fR as for \fBsetsockopt()\fR to enable the feature. The IPv4 data
-formats are listed below with the associated payload for each.
+The IPv4 ancillary data formats are listed below by \fBcmsg_level\fR and
+\fBcmsg_type\fR, along with the associated payload for each.
.sp
.ne 2
.na
-\fB\fBIPPROTO_IP\fR\fR
-.ad
-.br
-.na
-\fB\fBIP_RECVDSTADDR\fR\fR
+\fBIPPROTO_IP\fR, \fBIP_RECVDSTADDR\fR \(em \fBSOCK_DGRAM\fR only
.ad
.sp .6
.RS 4n
@@ -158,11 +151,17 @@ formats are listed below with the associated payload for each.
.sp
.ne 2
.na
-\fB\fBIPPROTO_IP\fR\fR
+\fBIPPROTO_IP\fR, \fBIP_RECVIF\fR
.ad
-.br
+.sp .6
+.RS 4n
+\fBuint_t\fR, \fBifIndex\fR number
+.RE
+
+.sp
+.ne 2
.na
-\fB\fBIP_RECVOPTS\fR\fR
+\fBIPPROTO_IP\fR, \fBIP_RECVOPTS\fR \(em \fBSOCK_DGRAM\fR only
.ad
.sp .6
.RS 4n
@@ -172,25 +171,17 @@ variable-length IP options, up to 40 bytes
.sp
.ne 2
.na
-\fB\fBIPPROTO_IP\fR\fR
-.ad
-.br
-.na
-\fB\fBIP_RECVIF\fR\fR
+\fBIPPROTO_IP\fR, \fBIP_RECVPKTINFO\fR \(em \fBSOCK_DGRAM\fR only
.ad
.sp .6
.RS 4n
-\fBuint_t\fR, \fBifIndex\fR number
+\fBin_pktinfo_t\fR
.RE
.sp
.ne 2
.na
-\fB\fBIPPROTO_IP\fR\fR
-.ad
-.br
-.na
-\fB\fBIP_RECVSLLA\fR\fR
+\fBIPPROTO_IP\fR, \fBIP_RECVSLLA\fR \(em \fBSOCK_DGRAM\fR only
.ad
.sp .6
.RS 4n
@@ -200,147 +191,115 @@ variable-length IP options, up to 40 bytes
.sp
.ne 2
.na
-\fB\fBIPPROTO_IP\fR\fR
-.ad
-.br
-.na
-\fB\fBIP_RECVTTL\fR\fR
+\fBIPPROTO_IP\fR, \fBIP_RECVTTL\fR \(em \fBSOCK_DGRAM\fR only
.ad
.sp .6
.RS 4n
-\fBuint8_t\fR
+\fBuint8_t\fR, the IP TTL (time to live)
.RE
.sp
.ne 2
.na
-\fB\fBSOL_SOCKET\fR\fR
+\fBIPPROTO_IP\fR, \fBIP_RECVTOS\fR
.ad
-.br
+.sp .6
+.RS 4n
+\fBuint8_t\fR, the IP TOS (type of service)
+.RE
+
+.sp
+.ne 2
.na
-\fB\fBSO_RECVUCRED\fR\fR
+\fBSOL_SOCKET\fR, \fBSO_UCRED\fR
.ad
.sp .6
.RS 4n
-\fBucred_t\fR \(em \fBcmsghdr.cmsg_type\fR is \fBSCM_UCRED\fR, not
-\fBSO_RECVUCRED\fR
+\fBucred_t\fR
.RE
.sp
.LP
-The IPv6 data formats use different values for enabling the option and for
-passing the value back to the application. The IPv6 data formats are listed
-below with the associated payload for each.
+The IPv6 ancillary data formats are listed below by \fBcmsg_level\fR and
+\fBcmsg_type\fR, along with the associated payload for each.
.sp
.ne 2
.na
-\fB\fBIPPROTO_IPV6\fR\fR
-.ad
-.br
-.na
-\fB\fBIPV6_RECVPKTINFO\fR\fR
+\fBIPPROTO_IPV6\fR, \fBIPV6_PKTINFO\fR
.ad
.sp .6
.RS 4n
-\fBin_pktinfo\fR, \fBcmsg_type\fR \fBIPV6_PKTINFO\fR
+\fBin_pktinfo_t\fR
.RE
.sp
.ne 2
.na
-\fB\fBIPPROTO_IPV6\fR\fR
-.ad
-.br
-.na
-\fB\fBIPV6_RECVTCLASS\fR\fR
+\fBIPPROTO_IPV6\fR, \fBIPV6_TCLASS\fR
.ad
.sp .6
.RS 4n
-\fBuint_t\fR, \fBcmsg_type\fR \fBIPV6_TCLASS\fR
+\fBuint_t\fR
.RE
.sp
.ne 2
.na
-\fB\fBIPPROTO_IPV6\fR\fR
-.ad
-.br
-.na
-\fB\fBIPV6_RECVPATHMTU\fR\fR
+\fBIPPROTO_IPV6\fR, \fBIPV6_PATHMTU\fR
.ad
.sp .6
.RS 4n
-\fBip6_mtuinfo\fR, \fBcmsg_type\fR \fBIPV6_PATHMTU\fR
+\fBip6_mtuinfo\fR
.RE
.sp
.ne 2
.na
-\fB\fBIPPROTO_IPV6\fR\fR
-.ad
-.br
-.na
-\fB\fBIPV6_RECVHOPLIMIT\fR\fR
+\fBIPPROTO_IPV6\fR, \fBIPV6_HOPLIMIT\fR
.ad
.sp .6
.RS 4n
-\fBuint_t\fR, \fBcmsg_type\fR \fBIPV6_HOPLIMIT\fR
+\fBuint_t\fR
.RE
.sp
.ne 2
.na
-\fB\fBIPPROTO_IPV6\fR\fR
-.ad
-.br
-.na
-\fB\fBIPV6_RECVHOPOPTS\fR\fR
+\fBIPPROTO_IPV6\fR, \fBIPV6_HOPOPTS\fR
.ad
.sp .6
.RS 4n
-variable-length IPv6 options, \fBcmsg_type\fR \fBIPV6_HOPOPTS\fR
+variable-length IPv6 options
.RE
.sp
.ne 2
.na
-\fB\fBIPPROTO_IPV6\fR\fR
-.ad
-.br
-.na
-\fB\fBIPV6_RECVDSTOPTS\fR\fR
+\fBIPPROTO_IPV6\fR, \fBIPV6_DSTOPTS\fR
.ad
.sp .6
.RS 4n
-variable-length IPv6 options, \fBcmsg_type\fR \fBIPV6_DSTOPTS\fR
+variable-length IPv6 options
.RE
.sp
.ne 2
.na
-\fB\fBIPPROTO_IPV6\fR\fR
-.ad
-.br
-.na
-\fB\fBIPV6_RECVRTHDR\fR\fR
+\fBIPPROTO_IPV6\fR, \fBIPV6_RTHDR\fR
.ad
.sp .6
.RS 4n
-variable-length IPv6 options, \fBcmsg_type\fR \fBIPV6_RTHDR\fR
+variable-length IPv6 options
.RE
.sp
.ne 2
.na
-\fB\fBIPPROTO_IPV6\fR\fR
-.ad
-.br
-.na
-\fB\fBIPV6_RECVRTHDRDSTOPTS\fR\fR
+\fBIPPROTO_IPV6\fR, \fBIPV6_DSTOPTS\fR
.ad
.sp .6
.RS 4n
-variable-length IPv6 options, \fBcmsg_type\fR \fBIPV6_DSTOPTS\fR
+variable-length IPv6 options
.RE
.sp
@@ -431,7 +390,7 @@ The \fB<sys/socket.h>\fR header defines the following macros:
.sp
.ne 2
.na
-\fB\fBSOCK_DGRAM\fR\fR
+\fBSOCK_DGRAM\fR
.ad
.RS 18n
Datagram socket
@@ -440,7 +399,7 @@ Datagram socket
.sp
.ne 2
.na
-\fB\fBSOCK_STREAM\fR\fR
+\fBSOCK_STREAM\fR
.ad
.RS 18n
Byte-stream socket
@@ -449,7 +408,7 @@ Byte-stream socket
.sp
.ne 2
.na
-\fB\fBSOCK_SEQPACKET\fR\fR
+\fBSOCK_SEQPACKET\fR
.ad
.RS 18n
Sequenced-packet socket
@@ -462,7 +421,7 @@ The \fB<sys/socket.h>\fR header defines the following macros for use as the
.sp
.ne 2
.na
-\fB\fBSOL_SOCKET\fR\fR
+\fBSOL_SOCKET\fR
.ad
.RS 14n
Options to be accessed at the socket level, not the protocol level.
@@ -471,7 +430,7 @@ Options to be accessed at the socket level, not the protocol level.
.sp
.ne 2
.na
-\fB\fBSOL_ROUTE\fR\fR
+\fBSOL_ROUTE\fR
.ad
.RS 14n
Options to be accessed at the routing socket level, not the protocol level.
@@ -484,7 +443,7 @@ The \fB<sys/socket.h>\fR header defines the following macros for use as the
.sp
.ne 2
.na
-\fB\fBSO_DEBUG\fR\fR
+\fBSO_DEBUG\fR
.ad
.RS 17n
Debugging information is being recorded.
@@ -493,7 +452,7 @@ Debugging information is being recorded.
.sp
.ne 2
.na
-\fB\fBSO_ACCEPTCONN\fR\fR
+\fBSO_ACCEPTCONN\fR
.ad
.RS 17n
Socket is accepting connections.
@@ -502,7 +461,7 @@ Socket is accepting connections.
.sp
.ne 2
.na
-\fB\fBSO_BROADCAST\fR\fR
+\fBSO_BROADCAST\fR
.ad
.RS 17n
Transmission of broadcast messages is supported.
@@ -511,7 +470,7 @@ Transmission of broadcast messages is supported.
.sp
.ne 2
.na
-\fB\fBSO_REUSEADDR\fR\fR
+\fBSO_REUSEADDR\fR
.ad
.RS 17n
Reuse of local addresses is supported.
@@ -520,7 +479,7 @@ Reuse of local addresses is supported.
.sp
.ne 2
.na
-\fB\fBSO_KEEPALIVE\fR\fR
+\fBSO_KEEPALIVE\fR
.ad
.RS 17n
Connections are kept alive with periodic messages.
@@ -529,7 +488,7 @@ Connections are kept alive with periodic messages.
.sp
.ne 2
.na
-\fB\fBSO_LINGER\fR\fR
+\fBSO_LINGER\fR
.ad
.RS 17n
Socket lingers on close.
@@ -538,7 +497,7 @@ Socket lingers on close.
.sp
.ne 2
.na
-\fB\fBSO_OOBINLINE\fR\fR
+\fBSO_OOBINLINE\fR
.ad
.RS 17n
Out-of-band data is transmitted in line.
@@ -547,7 +506,7 @@ Out-of-band data is transmitted in line.
.sp
.ne 2
.na
-\fB\fBSO_SNDBUF\fR\fR
+\fBSO_SNDBUF\fR
.ad
.RS 17n
Send buffer size.
@@ -556,7 +515,7 @@ Send buffer size.
.sp
.ne 2
.na
-\fB\fBSO_RCVBUF\fR\fR
+\fBSO_RCVBUF\fR
.ad
.RS 17n
Receive buffer size.
@@ -565,7 +524,7 @@ Receive buffer size.
.sp
.ne 2
.na
-\fB\fBSO_ERROR\fR\fR
+\fBSO_ERROR\fR
.ad
.RS 17n
Socket error status.
@@ -574,7 +533,7 @@ Socket error status.
.sp
.ne 2
.na
-\fB\fBSO_TYPE\fR\fR
+\fBSO_TYPE\fR
.ad
.RS 17n
Socket type.
@@ -583,7 +542,7 @@ Socket type.
.sp
.ne 2
.na
-\fB\fBSO_RECVUCRED\fR\fR
+\fBSO_RECVUCRED\fR
.ad
.RS 17n
Request the reception of user credential ancillary data. This is a
@@ -593,7 +552,7 @@ Sun-specific, Evolving interface. See \fBucred_get\fR(3C).
.sp
.ne 2
.na
-\fB\fBSO_MAC_EXEMPT\fR\fR
+\fBSO_MAC_EXEMPT\fR
.ad
.RS 17n
Mandatory Access Control (\fBMAC\fR) exemption for unlabeled peers. This option
@@ -603,7 +562,7 @@ is available only if the system is configured with Trusted Extensions.
.sp
.ne 2
.na
-\fB\fBSO_ALLZONES\fR\fR
+\fBSO_ALLZONES\fR
.ad
.RS 17n
Bypass zone boundaries (privileged).
@@ -618,7 +577,7 @@ the flags parameter in \fBrecvfrom()\fR, \fBrecvmsg()\fR, \fBsendto()\fR, or
.sp
.ne 2
.na
-\fB\fBMSG_CTRUNC\fR\fR
+\fBMSG_CTRUNC\fR
.ad
.RS 15n
Control data truncated.
@@ -627,7 +586,7 @@ Control data truncated.
.sp
.ne 2
.na
-\fB\fBMSG_EOR\fR\fR
+\fBMSG_EOR\fR
.ad
.RS 15n
Terminates a record (if supported by the protocol).
@@ -636,7 +595,7 @@ Terminates a record (if supported by the protocol).
.sp
.ne 2
.na
-\fB\fBMSG_OOB\fR\fR
+\fBMSG_OOB\fR
.ad
.RS 15n
Out-of-band data.
@@ -645,7 +604,7 @@ Out-of-band data.
.sp
.ne 2
.na
-\fB\fBMSG_PEEK\fR\fR
+\fBMSG_PEEK\fR
.ad
.RS 15n
Leave received data in queue.
@@ -654,7 +613,7 @@ Leave received data in queue.
.sp
.ne 2
.na
-\fB\fBMSG_TRUNC\fR\fR
+\fBMSG_TRUNC\fR
.ad
.RS 15n
Normal data truncated.
@@ -663,7 +622,7 @@ Normal data truncated.
.sp
.ne 2
.na
-\fB\fBMSG_WAITALL\fR\fR
+\fBMSG_WAITALL\fR
.ad
.RS 15n
Wait for complete message.
@@ -672,7 +631,7 @@ Wait for complete message.
.sp
.ne 2
.na
-\fB\fBMSG_NOSIGNAL\fR\fR
+\fBMSG_NOSIGNAL\fR
.ad
.RS 15n
Do not generate \fBSIGPIPE\fR signal.
@@ -684,7 +643,7 @@ The \fB<sys/socket.h>\fR header defines the following macros:
.sp
.ne 2
.na
-\fB\fBAF_UNIX\fR\fR
+\fBAF_UNIX\fR
.ad
.RS 11n
UNIX domain sockets
@@ -693,7 +652,7 @@ UNIX domain sockets
.sp
.ne 2
.na
-\fB\fBAF_INET\fR\fR
+\fBAF_INET\fR
.ad
.RS 11n
Internet domain sockets
@@ -705,7 +664,7 @@ The \fB<sys/socket.h>\fR header defines the following macros:
.sp
.ne 2
.na
-\fB\fBSHUT_RD\fR\fR
+\fBSHUT_RD\fR
.ad
.RS 13n
Disables further receive operations.
@@ -714,7 +673,7 @@ Disables further receive operations.
.sp
.ne 2
.na
-\fB\fBSHUT_WR\fR\fR
+\fBSHUT_WR\fR
.ad
.RS 13n
Disables further send operations.
@@ -723,14 +682,13 @@ Disables further send operations.
.sp
.ne 2
.na
-\fB\fBSHUT_RDWR\fR\fR
+\fBSHUT_RDWR\fR
.ad
.RS 13n
Disables further send and receive operations.
.RE
.SS "\fBlibsocket\fR Interfaces"
-.LP
The \fB<sys/socket.h>\fR header defines the \fBmsghdr\fR structure for
\fBlibsocket\fR interfaces that includes the following members:
.sp
@@ -754,7 +712,6 @@ in \fBread\fR(2). The \fImsg_accrights\fR parameter specifies the buffer in
which access rights sent along with the message are received. The
\fImsg_accrightslen\fR specifies the length of the buffer.
.SH ATTRIBUTES
-.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -769,7 +726,6 @@ Interface Stability Standard
.TE
.SH SEE ALSO
-.LP
\fBaccept\fR(3SOCKET), \fBaccept\fR(3XNET), \fBbind\fR(3SOCKET),
\fBbind\fR(3XNET), \fBconnect\fR(3SOCKET), \fBconnect\fR(3XNET),
\fBgetpeername\fR(3SOCKET), \fBgetpeername\fR(3XNET), \fBgetpeerucred\fR(3C),
diff --git a/usr/src/man/man7p/ip.7p b/usr/src/man/man7p/ip.7p
index 27abc6a71b..b8c8d9a44d 100644
--- a/usr/src/man/man7p/ip.7p
+++ b/usr/src/man/man7p/ip.7p
@@ -1,14 +1,14 @@
'\" te
+.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2008 AT&T
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH IP 7P "Dec 3, 2008"
+.TH IP 7P "Sep 18, 2020"
.SH NAME
ip, IP \- Internet Protocol
.SH SYNOPSIS
-.LP
.nf
\fB#include <sys/socket.h>\fR
.fi
@@ -29,8 +29,6 @@ ip, IP \- Internet Protocol
.fi
.SH DESCRIPTION
-.sp
-.LP
IP is the internetwork datagram delivery protocol that is central to the
Internet protocol family. Programs may use \fBIP\fR through higher-level
protocols such as the Transmission Control Protocol (TCP) or the User Datagram
@@ -43,8 +41,6 @@ options defined in the IP specification may be set in outgoing datagrams.
Packets sent to or from this system may be subject to IPsec policy. See
\fBipsec\fR(7P) for more information.
.SH APPLICATION PROGRAMMING INTERFACE
-.sp
-.LP
The STREAMS driver \fB/dev/rawip\fR is the TLI transport provider that provides
raw access to IP.
.sp
@@ -79,7 +75,7 @@ The socket options supported at the IP level are:
.sp
.ne 2
.na
-\fB\fBIP_OPTIONS\fR\fR
+\fBIP_OPTIONS\fR
.ad
.RS 22n
IP options for outgoing datagrams. This socket option may be used to set IP
@@ -99,7 +95,7 @@ Internet family.
.sp
.ne 2
.na
-\fB\fBIP_SEC_OPT\fR\fR
+\fBIP_SEC_OPT\fR
.ad
.RS 22n
Enable or obtain IPsec security settings for this socket. For more details on
@@ -109,7 +105,7 @@ the protection services of IPsec, see \fBipsec\fR(7P).
.sp
.ne 2
.na
-\fB\fBIP_ADD_MEMBERSHIP\fR\fR
+\fBIP_ADD_MEMBERSHIP\fR
.ad
.RS 22n
Join a multicast group.
@@ -118,7 +114,7 @@ Join a multicast group.
.sp
.ne 2
.na
-\fB\fBIP_DROP_MEMBERSHIP\fR\fR
+\fBIP_DROP_MEMBERSHIP\fR
.ad
.RS 22n
Leave a multicast group.
@@ -127,7 +123,7 @@ Leave a multicast group.
.sp
.ne 2
.na
-\fB\fBIP_BOUND_IF\fR\fR
+\fBIP_BOUND_IF\fR
.ad
.RS 22n
Limit reception and transmission of packets to this interface. Takes an
@@ -136,11 +132,11 @@ integer as an argument. The integer is the selected interface index.
.sp
.LP
-The following options take \fBin_pktinfo_t\fR as the parameter:
+The following option takes \fBin_pktinfo_t\fR as the parameter:
.sp
.ne 2
.na
-\fB\fBIP_PKTINFO\fR\fR
+\fBIP_PKTINFO\fR
.ad
.sp .6
.RS 4n
@@ -164,16 +160,88 @@ send the packet out.
.RE
.sp
+.LP
+The following options are boolean switches controlling the reception of
+ancillary data. The option value is type \fBint\fR; a non-zero value
+enables the option whilst a zero value disables it.
+
+.sp
.ne 2
.na
-\fB\fBIP_RECVPKTINFO\fR\fR
+\fBIP_RECVDSTADDR\fR
.ad
-.sp .6
-.RS 4n
+.RS 22n
+When enabled on a SOCK_DGRAM socket, enables receipt of the destination
+IP address of the incoming packet. Returns \fBinaddr_t\fR as ancillary
+data.
+.RE
+
+.sp
+.ne 2
+.na
+\fBIP_RECVIF\fR
+.ad
+.RS 22n
+Enable/disable receipt of the inbound interface index. Returns \fBuint_t\fR as
+ancillary data.
+.RE
+
+.sp
+.ne 2
+.na
+\fBIP_RECVOPTS\fR
+.ad
+.RS 22n
+When enabled on a SOCK_DGRAM socket, enables receipt of the IP options
+from the incoming packet. Returns variable-length IP options, up to 40
+bytes, as ancillary data.
+.RE
+
+.sp
+.ne 2
+.na
+\fBIP_RECVPKTINFO\fR
+.ad
+.RS 22n
Enable/disable receipt of the index of the interface the packet arrived on, the
local address that was matched for reception, and the inbound packet's actual
-destination address. Takes boolean as the parameter. Returns struct
-in_pktinfo_t as ancillary data.
+destination address. Takes boolean as the parameter. Returns
+\fBin_pktinfo_t\fR as ancillary data.
+.RE
+
+.sp
+.ne 2
+.na
+\fBIP_RECVSLLA\fR
+.ad
+.RS 22n
+When enabled on a SOCK_DGRAM socket, enables receipt of the source link-layer
+address for the incoming packet. Returns \fBstruct sockaddr_dl\fR as
+ancillary data.
+.RE
+
+.sp
+.ne 2
+.na
+\fBIP_RECVTTL\fR
+.ad
+.RS 22n
+When enabled on a SOCK_DGRAM socket, the IP TTL (time to live) field for an
+incoming datagram is returned as \fBuint8_t\fR in ancillary data.
+.RE
+
+.sp
+.ne 2
+.na
+\fBIP_RECVTOS\fR
+.ad
+.RS 22n
+When enabled, the IP TOS (type of service) field is returned as \fBuint8_t\fR
+in ancillary data. For \fBSOCK_DGRAM\fR sockets, the ancillary data item is
+included for every call to \fBrecvmsg()\fR. For \fBSOCK_STREAM\fR sockets,
+where there is no direct mapping between received TCP segments and receive
+operations, the ancillary data item will only be present when this option
+is first enabled, and subsequently only if the value changes.
.RE
.sp
@@ -186,7 +254,7 @@ interface on which to join.
.sp
.ne 2
.na
-\fB\fBIP_BLOCK_SOURCE\fR\fR
+\fBIP_BLOCK_SOURCE\fR
.ad
.RS 29n
Block multicast packets whose source address matches the given source address.
@@ -197,7 +265,7 @@ MCAST_JOIN_GROUP.
.sp
.ne 2
.na
-\fB\fBIP_UNBLOCK_SOURCE\fR\fR
+\fBIP_UNBLOCK_SOURCE\fR
.ad
.RS 29n
Unblock (begin receiving) multicast packets which were previously blocked using
@@ -207,7 +275,7 @@ IP_BLOCK_SOURCE.
.sp
.ne 2
.na
-\fB\fBIP_ADD_SOURCE_MEMBERSHIP\fR\fR
+\fBIP_ADD_SOURCE_MEMBERSHIP\fR
.ad
.RS 29n
Begin receiving packets for the given multicast group whose source address
@@ -217,7 +285,7 @@ matches the specified address.
.sp
.ne 2
.na
-\fB\fBIP_DROP_SOURCE_MEMBERSHIP\fR\fR
+\fBIP_DROP_SOURCE_MEMBERSHIP\fR
.ad
.RS 29n
Stop receiving packets for the given multicast group whose source address
@@ -232,7 +300,7 @@ multicast address), an interface address, and a source address.
.sp
.ne 2
.na
-\fB\fBMCAST_JOIN_GROUP\fR\fR
+\fBMCAST_JOIN_GROUP\fR
.ad
.RS 28n
Join a multicast group. Functionally equivalent to IP_ADD_MEMBERSHIP.
@@ -241,7 +309,7 @@ Join a multicast group. Functionally equivalent to IP_ADD_MEMBERSHIP.
.sp
.ne 2
.na
-\fB\fBMCAST_BLOCK_SOURCE\fR\fR
+\fBMCAST_BLOCK_SOURCE\fR
.ad
.RS 28n
Block multicast packets whose source address matches the given source address.
@@ -252,7 +320,7 @@ MCAST_JOIN_GROUP.
.sp
.ne 2
.na
-\fB\fBMCAST_UNBLOCK_SOURCE\fR\fR
+\fBMCAST_UNBLOCK_SOURCE\fR
.ad
.RS 28n
Unblock (begin receiving) multicast packets which were previously blocked using
@@ -262,7 +330,7 @@ MCAST_BLOCK_SOURCE.
.sp
.ne 2
.na
-\fB\fBMCAST_LEAVE_GROUP\fR\fR
+\fBMCAST_LEAVE_GROUP\fR
.ad
.RS 28n
Leave a multicast group. Functionally equivalent to IP_DROP_MEMBERSHIP.
@@ -271,7 +339,7 @@ Leave a multicast group. Functionally equivalent to IP_DROP_MEMBERSHIP.
.sp
.ne 2
.na
-\fB\fBMCAST_JOIN_SOURCE_GROUP\fR\fR
+\fBMCAST_JOIN_SOURCE_GROUP\fR
.ad
.RS 28n
Begin receiving packets for the given multicast group whose source address
@@ -281,7 +349,7 @@ matches the specified address.
.sp
.ne 2
.na
-\fB\fBMCAST_LEAVE_SOURCE_GROUP\fR\fR
+\fBMCAST_LEAVE_SOURCE_GROUP\fR
.ad
.RS 28n
Stop receiving packets for the given multicast group whose source address
@@ -299,7 +367,7 @@ multicast address, and source address.
.sp
.ne 2
.na
-\fB\fBIP_MULTICAST_IF\fR\fR
+\fBIP_MULTICAST_IF\fR
.ad
.RS 21n
The outgoing interface for multicast packets. This option takes a \fBstruct\fR
@@ -312,7 +380,7 @@ behavior).
.sp
.ne 2
.na
-\fB\fBIP_MULTICAST_TTL\fR\fR
+\fBIP_MULTICAST_TTL\fR
.ad
.RS 21n
Time to live for multicast datagrams. This option takes an unsigned character
@@ -323,7 +391,7 @@ datagrams. The default is \fB1\fR.
.sp
.ne 2
.na
-\fB\fBIP_MULTICAST_LOOP\fR\fR
+\fBIP_MULTICAST_LOOP\fR
.ad
.RS 21n
Loopback for multicast datagrams. Normally multicast datagrams are delivered
@@ -336,16 +404,7 @@ sending zone.
.sp
.ne 2
.na
-\fB\fBIP_RECVIF\fR\fR
-.ad
-.RS 21n
-Receive the inbound interface index.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBIP_TOS\fR\fR
+\fBIP_TOS\fR
.ad
.RS 21n
This option takes an integer argument as its input value. The least significant
@@ -356,7 +415,7 @@ of the outgoing packets.
.sp
.ne 2
.na
-\fB\fBIP_NEXTHOP\fR\fR
+\fBIP_NEXTHOP\fR
.ad
.RS 21n
This option specifies the address of the onlink nexthop for traffic originating
@@ -474,8 +533,6 @@ set the \fB/dev/ip\fR variable, ip_multidata_outbound to 0. Note, the IP module
will only initiate Multi-Data Transmit if the network interface driver supports
it.
.SH PACKET EVENTS
-.sp
-.LP
Through the netinfo framework, this driver provides the following packet
events:
.sp
@@ -585,8 +642,6 @@ Pointer to the mblk_t with the IP header in it.
.RE
.SH NETWORK INTERFACE EVENTS
-.sp
-.LP
In addition to events describing packets as they move through the system, it is
also possible to receive notification of events relating to network interfaces.
These events are all reported back through the same callback. The list of
@@ -637,14 +692,13 @@ An address has changed on a logical interface.
.RE
.SH SEE ALSO
-.sp
-.LP
\fBifconfig\fR(1M), \fBrouteadm\fR(1M), \fBndd\fR(1M), \fBread\fR(2),
-\fBwrite\fR(2), \fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET),
-\fBgetsockopt\fR(3SOCKET), \fBrecv\fR(3SOCKET), \fBsend\fR(3SOCKET),
-\fBdefaultrouter\fR(4), \fBicmp\fR(7P), \fBif_tcp\fR(7P), \fBinet\fR(7P),
-\fBip6\fR(7P), \fBipsec\fR(7P), \fBrouting\fR(7P), \fBtcp\fR(7P),
-\fBudp\fR(7P), \fBnet_hook_register\fR(9F), \fBhook_pkt_event\fR(9S)
+\fBwrite\fR(2), \fBsocket.h\fR(3HEAD), \fBbind\fR(3SOCKET),
+\fBconnect\fR(3SOCKET), \fBgetsockopt\fR(3SOCKET), \fBrecv\fR(3SOCKET),
+\fBsend\fR(3SOCKET), \fBsetsockopt\fR(3SOCKET), \fBdefaultrouter\fR(4),
+\fBicmp\fR(7P), \fBif_tcp\fR(7P), \fBinet\fR(7P), \fBip\fR(7P), \fBip6\fR(7P),
+\fBipsec\fR(7P), \fBrouting\fR(7P), \fBtcp\fR(7P), \fBudp\fR(7P),
+\fBnet_hook_register\fR(9F), \fBhook_pkt_event\fR(9S)
.sp
.LP
Braden, R., \fIRFC 1122, Requirements for Internet Hosts \(mi Communication
@@ -656,13 +710,11 @@ Postel, J., \fIRFC 791, Internet Protocol \(mi DARPA Internet Program Protocol
Specification\fR, Information Sciences Institute, University of Southern
California, September 1981.
.SH DIAGNOSTICS
-.sp
-.LP
A socket operation may fail with one of the following errors returned:
.sp
.ne 2
.na
-\fB\fBEACCES\fR\fR
+\fBEACCES\fR
.ad
.RS 17n
A \fBbind()\fR operation was attempted with a "reserved" port number and the
@@ -675,7 +727,7 @@ PRIV_SYS_NET_CONFIG privilege.
.sp
.ne 2
.na
-\fB\fBEADDRINUSE\fR\fR
+\fBEADDRINUSE\fR
.ad
.RS 17n
A \fBbind()\fR operation was attempted on a socket with a network address/port
@@ -685,7 +737,7 @@ pair that has already been bound to another socket.
.sp
.ne 2
.na
-\fB\fBEADDRNOTAVAIL\fR\fR
+\fBEADDRNOTAVAIL\fR
.ad
.RS 17n
A \fBbind()\fR operation was attempted for an address that is not configured on
@@ -695,7 +747,7 @@ this machine.
.sp
.ne 2
.na
-\fB\fBEINVAL\fR\fR
+\fBEINVAL\fR
.ad
.RS 17n
A \fBsendmsg()\fR operation with a non-NULL \fBmsg_accrights\fR was attempted.
@@ -704,7 +756,7 @@ A \fBsendmsg()\fR operation with a non-NULL \fBmsg_accrights\fR was attempted.
.sp
.ne 2
.na
-\fB\fBEINVAL\fR\fR
+\fBEINVAL\fR
.ad
.RS 17n
A \fBgetsockopt()\fR or \fBsetsockopt()\fR operation with an unknown socket
@@ -714,7 +766,7 @@ option name was given.
.sp
.ne 2
.na
-\fB\fBEINVAL\fR\fR
+\fBEINVAL\fR
.ad
.RS 17n
A \fBgetsockopt()\fR or \fBsetsockopt()\fR operation was attempted with the
@@ -725,7 +777,7 @@ minimum value or longer than the option buffer provided.
.sp
.ne 2
.na
-\fB\fBEISCONN\fR\fR
+\fBEISCONN\fR
.ad
.RS 17n
A \fBconnect()\fR operation was attempted on a socket on which a
@@ -736,7 +788,7 @@ be successfully disconnected before making the new connection.
.sp
.ne 2
.na
-\fB\fBEISCONN\fR\fR
+\fBEISCONN\fR
.ad
.RS 17n
A \fBsendto()\fR or \fBsendmsg()\fR operation specifying an address to which
@@ -747,7 +799,7 @@ operation had already been performed.
.sp
.ne 2
.na
-\fB\fBEMSGSIZE\fR\fR
+\fBEMSGSIZE\fR
.ad
.RS 17n
A \fBsend()\fR, \fBsendto()\fR, or \fBsendmsg()\fR operation was attempted to
@@ -758,7 +810,7 @@ fragmented (such as broadcasts).
.sp
.ne 2
.na
-\fB\fBENETUNREACH\fR\fR
+\fBENETUNREACH\fR
.ad
.RS 17n
An attempt was made to establish a connection by means of \fBconnect()\fR, or
@@ -770,7 +822,7 @@ unreachable" message was received.
.sp
.ne 2
.na
-\fB\fBENOTCONN\fR\fR
+\fBENOTCONN\fR
.ad
.RS 17n
A \fBsend()\fR or \fBwrite()\fR operation, or a \fBsendto()\fR or
@@ -782,7 +834,7 @@ already been performed.
.sp
.ne 2
.na
-\fB\fBENOBUFS\fR\fR
+\fBENOBUFS\fR
.ad
.RS 17n
The system ran out of memory for fragmentation buffers or other internal data
@@ -792,7 +844,7 @@ structures.
.sp
.ne 2
.na
-\fB\fBENOBUFS\fR\fR
+\fBENOBUFS\fR
.ad
.RS 17n
\fBSO_SNDBUF\fR or \fBSO_RCVBUF\fR exceeds a system limit.
@@ -801,7 +853,7 @@ structures.
.sp
.ne 2
.na
-\fB\fBEINVAL\fR\fR
+\fBEINVAL\fR
.ad
.RS 17n
Invalid length for \fBIP_OPTIONS\fR.
@@ -810,7 +862,7 @@ Invalid length for \fBIP_OPTIONS\fR.
.sp
.ne 2
.na
-\fB\fBEHOSTUNREACH\fR\fR
+\fBEHOSTUNREACH\fR
.ad
.RS 17n
Invalid address for \fBIP_MULTICAST_IF\fR.
@@ -821,7 +873,7 @@ Invalid (offlink) nexthop address for IP_NEXTHOP.
.sp
.ne 2
.na
-\fB\fBEINVAL\fR\fR
+\fBEINVAL\fR
.ad
.RS 17n
Not a multicast address for \fBIP_ADD_MEMBERSHIP\fR and
@@ -831,7 +883,7 @@ Not a multicast address for \fBIP_ADD_MEMBERSHIP\fR and
.sp
.ne 2
.na
-\fB\fBEADDRNOTAVAIL\fR\fR
+\fBEADDRNOTAVAIL\fR
.ad
.RS 17n
Bad interface address for \fBIP_ADD_MEMBERSHIP\fR and \fBIP_DROP_MEMBERSHIP\fR.
@@ -840,7 +892,7 @@ Bad interface address for \fBIP_ADD_MEMBERSHIP\fR and \fBIP_DROP_MEMBERSHIP\fR.
.sp
.ne 2
.na
-\fB\fBEADDRINUSE\fR\fR
+\fBEADDRINUSE\fR
.ad
.RS 17n
Address already joined for \fBIP_ADD_MEMBERSHIP\fR.
@@ -849,7 +901,7 @@ Address already joined for \fBIP_ADD_MEMBERSHIP\fR.
.sp
.ne 2
.na
-\fB\fBENOENT\fR\fR
+\fBENOENT\fR
.ad
.RS 17n
Address not joined for \fBIP_DROP_MEMBERSHIP\fR.
@@ -858,7 +910,7 @@ Address not joined for \fBIP_DROP_MEMBERSHIP\fR.
.sp
.ne 2
.na
-\fB\fBENOPROTOOPT\fR\fR
+\fBENOPROTOOPT\fR
.ad
.RS 17n
Invalid socket type.
@@ -867,15 +919,13 @@ Invalid socket type.
.sp
.ne 2
.na
-\fB\fBEPERM\fR\fR
+\fBEPERM\fR
.ad
.RS 17n
No permissions.
.RE
.SH NOTES
-.sp
-.LP
Raw sockets should receive \fBICMP\fR error packets relating to the protocol;
currently such packets are simply discarded.
.sp