Print this page
13175 Add support for IP_RECVTOS
13182 CMSG_ macros should have man pages
Change-ID: I784aa36cfd3c17e3cccbf1fd329fa7e69b663ef9

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man7p/ip.7p.man.txt
          +++ new/usr/src/man/man7p/ip.7p.man.txt
↓ open down ↓ 100 lines elided ↑ open up ↑
 101  101                               Leave a multicast group.
 102  102  
 103  103  
 104  104         IP_BOUND_IF
 105  105                               Limit  reception and transmission of packets to
 106  106                               this interface. Takes an integer as an argument.
 107  107                               The integer is the selected interface index.
 108  108  
 109  109  
 110  110  
 111      -       The following options take in_pktinfo_t as the parameter:
      111 +       The following option takes in_pktinfo_t as the parameter:
 112  112  
 113  113         IP_PKTINFO
 114  114  
 115  115             Set the source address and/or transmit interface of  the packet(s).
 116  116             Note that the IP_BOUND_IF socket option takes precedence over the
 117  117             interface index passed in IP_PKTINFO.
 118  118  
 119  119               struct in_pktinfo {
 120  120                  unsigned int ipi_ifindex;/* send/recv interface index */
 121  121                  struct in_addr ipi_spec_dst;/* matched source addr. */
 122  122                  struct in_addr ipi_addr;/* src/dst addr. in IP hdr */
 123  123               } in_pktinfo_t;
 124  124  
 125  125             When passed in (on transmit) via ancillary data with IP_PKTINFO,
 126  126             ipi_spec_dst is used as the source address and ipi_ifindex is used
 127  127             as the interface index to send the packet out.
 128  128  
 129  129  
      130 +
      131 +       The following options are boolean switches controlling the reception of
      132 +       ancillary data:
      133 +
      134 +
      135 +       IP_RECVDSTADDR
      136 +                             When enabled on a SOCK_DGRAM socket, enables
      137 +                             receipt of the destination IP address of the
      138 +                             incoming packet. Returns inaddr_t as ancillary
      139 +                             data.
      140 +
      141 +
      142 +       IP_RECVIF
      143 +                             Enable/disable receipt of the inbound interface
      144 +                             index. Returns uint_t as ancillary data.
      145 +
      146 +
      147 +       IP_RECVOPTS
      148 +                             When enabled on a SOCK_DGRAM socket, enables
      149 +                             receipt of the IP options from the incoming
      150 +                             packet. Returns variable-length IP options, up to
      151 +                             40 bytes, as ancillary data.
      152 +
      153 +
 130  154         IP_RECVPKTINFO
      155 +                             Enable/disable receipt of the index of the
      156 +                             interface the packet arrived on, the local
      157 +                             address that was matched for reception, and the
      158 +                             inbound packet's actual destination address.
      159 +                             Takes boolean as the parameter.  Returns
      160 +                             in_pktinfo_t as ancillary data.
 131  161  
 132      -           Enable/disable receipt of the index of the interface the packet
 133      -           arrived on, the local address that was matched for reception, and
 134      -           the inbound packet's actual destination address. Takes boolean as
 135      -           the parameter.  Returns struct in_pktinfo_t as ancillary data.
 136  162  
      163 +       IP_RECVSLLA
      164 +                             When enabled on a SOCK_DGRAM socket, enables
      165 +                             receipt of the source link-layer address for the
      166 +                             incoming packet. Returns struct sockaddr_dl as
      167 +                             ancillary data.
 137  168  
 138  169  
      170 +       IP_RECVTTL
      171 +                             When enabled on a SOCK_DGRAM socket, the IP TTL
      172 +                             (time to live) field for an incoming datagram is
      173 +                             returned as uint8_t in ancillary data.
      174 +
      175 +
      176 +       IP_RECVTOS
      177 +                             When enabled, the IP TOS (type of service) field
      178 +                             is returned as uint8_t in ancillary data. For
      179 +                             SOCK_DGRAM sockets, the ancillary data item is
      180 +                             included for every call to recvmsg(). For
      181 +                             SOCK_STREAM sockets, where there is no direct
      182 +                             mapping between received TCP segments and receive
      183 +                             operations, the ancillary data item will only be
      184 +                             present when the value has changed.
      185 +
      186 +
      187 +
 139  188         The following options take a struct ip_mreq as the parameter. The
 140  189         structure contains a multicast address which must be set to the CLASS-D
 141  190         IP multicast address and an interface address. Normally the interface
 142  191         address is set to INADDR_ANY which causes the kernel to choose the
 143  192         interface on which to join.
 144  193  
 145  194         IP_BLOCK_SOURCE
 146  195                                      Block multicast packets whose source
 147  196                                      address matches the given source address.
 148  197                                      The specified group must be joined
↓ open down ↓ 89 lines elided ↑ open up ↑
 238  287         IP_MULTICAST_LOOP
 239  288                              Loopback for multicast  datagrams. Normally
 240  289                              multicast  datagrams are delivered to members on
 241  290                              the sending host (or sending zone). Setting the
 242  291                              unsigned character argument to 0 causes the
 243  292                              opposite behavior, meaning that when multiple
 244  293                              zones are present, the datagrams are delivered to
 245  294                              all zones except the sending zone.
 246  295  
 247  296  
 248      -       IP_RECVIF
 249      -                            Receive the inbound interface index.
 250      -
 251      -
 252  297         IP_TOS
 253  298                              This option takes an integer argument as its input
 254  299                              value. The least significant 8 bits of the value
 255  300                              are used to set the Type Of Service field in the
 256  301                              IP header of the outgoing packets.
 257  302  
 258  303  
 259  304         IP_NEXTHOP
 260  305                              This option specifies the address of the onlink
 261  306                              nexthop for traffic originating from that socket.
↓ open down ↓ 213 lines elided ↑ open up ↑
 475  520         down
 476  521                           There are no logical interfaces expecting to receive
 477  522                           packets.
 478  523  
 479  524  
 480  525         address change
 481  526                           An address has changed on a logical  interface.
 482  527  
 483  528  
 484  529  SEE ALSO
 485      -       ifconfig(1M), routeadm(1M), ndd(1M), read(2), write(2), bind(3SOCKET),
 486      -       connect(3SOCKET), getsockopt(3SOCKET), recv(3SOCKET), send(3SOCKET),
 487      -       defaultrouter(4), icmp(7P), if_tcp(7P), inet(7P), ip6(7P), ipsec(7P),
 488      -       routing(7P), tcp(7P), udp(7P), net_hook_register(9F),
 489      -       hook_pkt_event(9S)
      530 +       ifconfig(1M), routeadm(1M), ndd(1M), read(2), write(2),
      531 +       socket.h(3HEAD), bind(3SOCKET), connect(3SOCKET), getsockopt(3SOCKET),
      532 +       recv(3SOCKET), send(3SOCKET), defaultrouter(4), icmp(7P), if_tcp(7P),
      533 +       inet(7P), ip(7P), ip6(7P), ipsec(7P), routing(7P), tcp(7P), udp(7P),
      534 +       net_hook_register(9F), hook_pkt_event(9S)
 490  535  
 491  536  
 492  537         Braden, R., RFC 1122, Requirements for Internet Hosts - Communication
 493  538         Layers, Information Sciences Institute, University of Southern
 494  539         California, October 1989.
 495  540  
 496  541  
 497  542         Postel, J., RFC 791, Internet Protocol - DARPA Internet Program
 498  543         Protocol Specification, Information Sciences Institute, University of
 499  544         Southern California, September 1981.
↓ open down ↓ 123 lines elided ↑ open up ↑
 623  668  NOTES
 624  669         Raw sockets should receive ICMP error packets relating to the protocol;
 625  670         currently such packets are simply discarded.
 626  671  
 627  672  
 628  673         Users of higher-level protocols such as TCP and UDP should be able to
 629  674         see received IP options.
 630  675  
 631  676  
 632  677  
 633      -                               December 3, 2008                         IP(7P)
      678 +                              September 18, 2020                        IP(7P)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX