--- old/usr/src/man/man7p/ip.7p	Wed Sep 23 11:17:31 2020
+++ new/usr/src/man/man7p/ip.7p	Wed Sep 23 11:17:31 2020
@@ -1,10 +1,11 @@
 '\" 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
@@ -79,7 +80,7 @@
 .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 +100,7 @@
 .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 +110,7 @@
 .sp
 .ne 2
 .na
-\fB\fBIP_ADD_MEMBERSHIP\fR\fR
+\fBIP_ADD_MEMBERSHIP\fR
 .ad
 .RS 22n
 Join a multicast group.
@@ -118,7 +119,7 @@
 .sp
 .ne 2
 .na
-\fB\fBIP_DROP_MEMBERSHIP\fR\fR
+\fBIP_DROP_MEMBERSHIP\fR
 .ad
 .RS 22n
 Leave a multicast group.
@@ -127,7 +128,7 @@
 .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 +137,11 @@
 
 .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,19 +165,91 @@
 .RE
 
 .sp
+.LP
+The following options are boolean switches controlling the reception of
+ancillary data:
+
+.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
+.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 the value has
+changed.
+.RE
+
+.sp
 .LP
 The following options take a \fBstruct ip_mreq\fR as the parameter. The
 structure contains a multicast address which must be set to the \fBCLASS-D\fR
@@ -186,7 +259,7 @@
 .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 +270,7 @@
 .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 +280,7 @@
 .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 +290,7 @@
 .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 +305,7 @@
 .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 +314,7 @@
 .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 +325,7 @@
 .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 +335,7 @@
 .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 +344,7 @@
 .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 +354,7 @@
 .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 +372,7 @@
 .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 +385,7 @@
 .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 +396,7 @@
 .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,18 +409,9 @@
 .sp
 .ne 2
 .na
-\fB\fBIP_RECVIF\fR\fR
+\fBIP_TOS\fR
 .ad
 .RS 21n
-Receive the inbound interface index.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBIP_TOS\fR\fR
-.ad
-.RS 21n
 This option takes an integer argument as its input value. The least significant
 8 bits of the value are used to set the Type Of Service field in the IP header
 of the outgoing packets.
@@ -356,7 +420,7 @@
 .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
@@ -640,11 +704,12 @@
 .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), \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
@@ -662,7 +727,7 @@
 .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 +740,7 @@
 .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 +750,7 @@
 .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 +760,7 @@
 .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 +769,7 @@
 .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 +779,7 @@
 .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 +790,7 @@
 .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 +801,7 @@
 .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 +812,7 @@
 .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 +823,7 @@
 .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 +835,7 @@
 .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 +847,7 @@
 .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 +857,7 @@
 .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 +866,7 @@
 .sp
 .ne 2
 .na
-\fB\fBEINVAL\fR\fR
+\fBEINVAL\fR
 .ad
 .RS 17n
 Invalid length for \fBIP_OPTIONS\fR.
@@ -810,7 +875,7 @@
 .sp
 .ne 2
 .na
-\fB\fBEHOSTUNREACH\fR\fR
+\fBEHOSTUNREACH\fR
 .ad
 .RS 17n
 Invalid address for \fBIP_MULTICAST_IF\fR.
@@ -821,7 +886,7 @@
 .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 +896,7 @@
 .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 +905,7 @@
 .sp
 .ne 2
 .na
-\fB\fBEADDRINUSE\fR\fR
+\fBEADDRINUSE\fR
 .ad
 .RS 17n
 Address already joined for \fBIP_ADD_MEMBERSHIP\fR.
@@ -849,7 +914,7 @@
 .sp
 .ne 2
 .na
-\fB\fBENOENT\fR\fR
+\fBENOENT\fR
 .ad
 .RS 17n
 Address not joined for \fBIP_DROP_MEMBERSHIP\fR.
@@ -858,7 +923,7 @@
 .sp
 .ne 2
 .na
-\fB\fBENOPROTOOPT\fR\fR
+\fBENOPROTOOPT\fR
 .ad
 .RS 17n
 Invalid socket type.
@@ -867,7 +932,7 @@
 .sp
 .ne 2
 .na
-\fB\fBEPERM\fR\fR
+\fBEPERM\fR
 .ad
 .RS 17n
 No permissions.
