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
          +++ new/usr/src/man/man7p/ip.7p
   1    1  '\" te
        2 +.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
   2    3  .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
   3    4  .\" Copyright 2008 AT&T
   4    5  .\" 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.
   5    6  .\" 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.
   6    7  .\" 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]
   7      -.TH IP 7P "Dec 3, 2008"
        8 +.TH IP 7P "Sep 18, 2020"
   8    9  .SH NAME
   9   10  ip, IP \- Internet Protocol
  10   11  .SH SYNOPSIS
  11   12  .LP
  12   13  .nf
  13   14  \fB#include <sys/socket.h>\fR
  14   15  .fi
  15   16  
  16   17  .LP
  17   18  .nf
↓ open down ↓ 54 lines elided ↑ open up ↑
  72   73  has a broadcast destination address. Since an applicaton cannot send down
  73   74  fragments (as IP assigns the IP ID), Fragment Offset is always 0. The IP
  74   75  Checksum field is computed by IP. None of the data beyond the IP header are
  75   76  changed, including the application-provided transport header.
  76   77  .sp
  77   78  .LP
  78   79  The socket options supported at the IP level are:
  79   80  .sp
  80   81  .ne 2
  81   82  .na
  82      -\fB\fBIP_OPTIONS\fR\fR
       83 +\fBIP_OPTIONS\fR
  83   84  .ad
  84   85  .RS 22n
  85   86  IP options for outgoing datagrams. This socket option may be used to set IP
  86   87  options to be included in each outgoing datagram. IP options to be sent are set
  87   88  with \fBsetsockopt()\fR (see \fBgetsockopt\fR(3SOCKET)). The
  88   89  \fBgetsockopt\fR(3SOCKET) call returns the IP options set in the last
  89   90  \fBsetsockopt()\fR call. IP options on received datagrams are visible to user
  90   91  programs only using raw IP sockets. The format of IP options given in
  91   92  \fBsetsockopt()\fR matches those defined in the IP specification with one
  92   93  exception: the list of addresses for the source routing options must include
  93   94  the first-hop gateway at the beginning of the list of gateways. The first-hop
  94   95  gateway address will be extracted from the option list and the size adjusted
  95   96  accordingly before use. IP options may be used with any socket type in the
  96   97  Internet family.
  97   98  .RE
  98   99  
  99  100  .sp
 100  101  .ne 2
 101  102  .na
 102      -\fB\fBIP_SEC_OPT\fR\fR
      103 +\fBIP_SEC_OPT\fR
 103  104  .ad
 104  105  .RS 22n
 105  106  Enable or obtain IPsec security settings for this socket. For more details on
 106  107  the protection services of IPsec, see \fBipsec\fR(7P).
 107  108  .RE
 108  109  
 109  110  .sp
 110  111  .ne 2
 111  112  .na
 112      -\fB\fBIP_ADD_MEMBERSHIP\fR\fR
      113 +\fBIP_ADD_MEMBERSHIP\fR
 113  114  .ad
 114  115  .RS 22n
 115  116  Join a multicast group.
 116  117  .RE
 117  118  
 118  119  .sp
 119  120  .ne 2
 120  121  .na
 121      -\fB\fBIP_DROP_MEMBERSHIP\fR\fR
      122 +\fBIP_DROP_MEMBERSHIP\fR
 122  123  .ad
 123  124  .RS 22n
 124  125  Leave a multicast group.
 125  126  .RE
 126  127  
 127  128  .sp
 128  129  .ne 2
 129  130  .na
 130      -\fB\fBIP_BOUND_IF\fR\fR
      131 +\fBIP_BOUND_IF\fR
 131  132  .ad
 132  133  .RS 22n
 133  134  Limit  reception and transmission of packets to this interface. Takes an
 134  135  integer as an argument. The integer is the selected interface index.
 135  136  .RE
 136  137  
 137  138  .sp
 138  139  .LP
 139      -The following options take \fBin_pktinfo_t\fR as the parameter:
      140 +The following option takes \fBin_pktinfo_t\fR as the parameter:
 140  141  .sp
 141  142  .ne 2
 142  143  .na
 143      -\fB\fBIP_PKTINFO\fR\fR
      144 +\fBIP_PKTINFO\fR
 144  145  .ad
 145  146  .sp .6
 146  147  .RS 4n
 147  148  Set the source address and/or transmit interface of  the packet(s).  Note that
 148  149  the IP_BOUND_IF socket option takes precedence over the interface index passed
 149  150  in IP_PKTINFO.
 150  151  .sp
 151  152  .in +2
 152  153  .nf
 153  154  struct in_pktinfo {
↓ open down ↓ 3 lines elided ↑ open up ↑
 157  158  } in_pktinfo_t;
 158  159  .fi
 159  160  .in -2
 160  161  
 161  162  When passed in (on transmit) via ancillary data with IP_PKTINFO, ipi_spec_dst
 162  163  is used as the source address and ipi_ifindex is used as the interface index to
 163  164  send the packet out.
 164  165  .RE
 165  166  
 166  167  .sp
      168 +.LP
      169 +The following options are boolean switches controlling the reception of
      170 +ancillary data:
      171 +
      172 +.sp
 167  173  .ne 2
 168  174  .na
 169      -\fB\fBIP_RECVPKTINFO\fR\fR
      175 +\fBIP_RECVDSTADDR\fR
 170  176  .ad
 171      -.sp .6
 172      -.RS 4n
      177 +.RS 22n
      178 +When enabled on a SOCK_DGRAM socket, enables receipt of the destination
      179 +IP address of the incoming packet. Returns \fBinaddr_t\fR as ancillary
      180 +data.
      181 +.RE
      182 +
      183 +.sp
      184 +.ne 2
      185 +.na
      186 +\fBIP_RECVIF\fR
      187 +.ad
      188 +.RS 22n
      189 +Enable/disable receipt of the inbound interface index. Returns \fBuint_t\fR as
      190 +ancillary data.
      191 +.RE
      192 +
      193 +.sp
      194 +.ne 2
      195 +.na
      196 +\fBIP_RECVOPTS\fR
      197 +.ad
      198 +.RS 22n
      199 +When enabled on a SOCK_DGRAM socket, enables receipt of the IP options
      200 +from the incoming packet. Returns variable-length IP options, up to 40
      201 +bytes, as ancillary data.
      202 +.RE
      203 +
      204 +.sp
      205 +.ne 2
      206 +.na
      207 +\fBIP_RECVPKTINFO\fR
      208 +.ad
      209 +.RS 22n
 173  210  Enable/disable receipt of the index of the interface the packet arrived on, the
 174  211  local address that was matched for reception, and the inbound packet's actual
 175      -destination address. Takes boolean as the parameter.  Returns struct
 176      -in_pktinfo_t as ancillary data.
      212 +destination address. Takes boolean as the parameter.  Returns
      213 +\fBin_pktinfo_t\fR as ancillary data.
 177  214  .RE
      215 +.RE
 178  216  
 179  217  .sp
      218 +.ne 2
      219 +.na
      220 +\fBIP_RECVSLLA\fR
      221 +.ad
      222 +.RS 22n
      223 +When enabled on a SOCK_DGRAM socket, enables receipt of the source link-layer
      224 +address for the incoming packet. Returns \fBstruct sockaddr_dl\fR as
      225 +ancillary data.
      226 +.RE
      227 +
      228 +.sp
      229 +.ne 2
      230 +.na
      231 +\fBIP_RECVTTL\fR
      232 +.ad
      233 +.RS 22n
      234 +When enabled on a SOCK_DGRAM socket, the IP TTL (time to live) field for an
      235 +incoming datagram is returned as \fBuint8_t\fR in ancillary data.
      236 +.RE
      237 +
      238 +.sp
      239 +.ne 2
      240 +.na
      241 +\fBIP_RECVTOS\fR
      242 +.ad
      243 +.RS 22n
      244 +When enabled, the IP TOS (type of service) field is returned as \fBuint8_t\fR
      245 +in ancillary data. For \fBSOCK_DGRAM\fR sockets, the ancillary data item is
      246 +included for every call to \fBrecvmsg()\fR. For \fBSOCK_STREAM\fR sockets,
      247 +where there is no direct mapping between received TCP segments and receive
      248 +operations, the ancillary data item will only be present when the value has
      249 +changed.
      250 +.RE
      251 +
      252 +.sp
 180  253  .LP
 181  254  The following options take a \fBstruct ip_mreq\fR as the parameter. The
 182  255  structure contains a multicast address which must be set to the \fBCLASS-D\fR
 183  256  \fBIP\fR multicast address and an interface address. Normally the interface
 184  257  address is set to \fBINADDR_ANY\fR which causes the kernel to choose the
 185  258  interface on which to join.
 186  259  .sp
 187  260  .ne 2
 188  261  .na
 189      -\fB\fBIP_BLOCK_SOURCE\fR\fR
      262 +\fBIP_BLOCK_SOURCE\fR
 190  263  .ad
 191  264  .RS 29n
 192  265  Block multicast packets whose source address matches the given source address.
 193  266  The specified group must be joined previously using IP_ADD_MEMBERSHIP or
 194  267  MCAST_JOIN_GROUP.
 195  268  .RE
 196  269  
 197  270  .sp
 198  271  .ne 2
 199  272  .na
 200      -\fB\fBIP_UNBLOCK_SOURCE\fR\fR
      273 +\fBIP_UNBLOCK_SOURCE\fR
 201  274  .ad
 202  275  .RS 29n
 203  276  Unblock (begin receiving) multicast packets which were previously blocked using
 204  277  IP_BLOCK_SOURCE.
 205  278  .RE
 206  279  
 207  280  .sp
 208  281  .ne 2
 209  282  .na
 210      -\fB\fBIP_ADD_SOURCE_MEMBERSHIP\fR\fR
      283 +\fBIP_ADD_SOURCE_MEMBERSHIP\fR
 211  284  .ad
 212  285  .RS 29n
 213  286  Begin receiving packets for the given multicast group whose source address
 214  287  matches the specified address.
 215  288  .RE
 216  289  
 217  290  .sp
 218  291  .ne 2
 219  292  .na
 220      -\fB\fBIP_DROP_SOURCE_MEMBERSHIP\fR\fR
      293 +\fBIP_DROP_SOURCE_MEMBERSHIP\fR
 221  294  .ad
 222  295  .RS 29n
 223  296  Stop receiving packets for the given multicast group whose source address
 224  297  matches the specified address.
 225  298  .RE
 226  299  
 227  300  .sp
 228  301  .LP
 229  302  The following options take a \fBstruct ip_mreq_source\fR as the parameter. The
 230  303  structure contains a multicast address (which must be set to the CLASS-D IP
 231  304  multicast address), an interface address, and a source address.
 232  305  .sp
 233  306  .ne 2
 234  307  .na
 235      -\fB\fBMCAST_JOIN_GROUP\fR\fR
      308 +\fBMCAST_JOIN_GROUP\fR
 236  309  .ad
 237  310  .RS 28n
 238  311  Join a multicast group. Functionally equivalent to IP_ADD_MEMBERSHIP.
 239  312  .RE
 240  313  
 241  314  .sp
 242  315  .ne 2
 243  316  .na
 244      -\fB\fBMCAST_BLOCK_SOURCE\fR\fR
      317 +\fBMCAST_BLOCK_SOURCE\fR
 245  318  .ad
 246  319  .RS 28n
 247  320  Block multicast packets whose source address matches the given source address.
 248  321  The specified group must be joined previously using IP_ADD_MEMBERSHIP or
 249  322  MCAST_JOIN_GROUP.
 250  323  .RE
 251  324  
 252  325  .sp
 253  326  .ne 2
 254  327  .na
 255      -\fB\fBMCAST_UNBLOCK_SOURCE\fR\fR
      328 +\fBMCAST_UNBLOCK_SOURCE\fR
 256  329  .ad
 257  330  .RS 28n
 258  331  Unblock (begin receiving) multicast packets which were previously blocked using
 259  332  MCAST_BLOCK_SOURCE.
 260  333  .RE
 261  334  
 262  335  .sp
 263  336  .ne 2
 264  337  .na
 265      -\fB\fBMCAST_LEAVE_GROUP\fR\fR
      338 +\fBMCAST_LEAVE_GROUP\fR
 266  339  .ad
 267  340  .RS 28n
 268  341  Leave a multicast group. Functionally equivalent to IP_DROP_MEMBERSHIP.
 269  342  .RE
 270  343  
 271  344  .sp
 272  345  .ne 2
 273  346  .na
 274      -\fB\fBMCAST_JOIN_SOURCE_GROUP\fR\fR
      347 +\fBMCAST_JOIN_SOURCE_GROUP\fR
 275  348  .ad
 276  349  .RS 28n
 277  350  Begin receiving packets for the given multicast group whose source address
 278  351  matches the specified address.
 279  352  .RE
 280  353  
 281  354  .sp
 282  355  .ne 2
 283  356  .na
 284      -\fB\fBMCAST_LEAVE_SOURCE_GROUP\fR\fR
      357 +\fBMCAST_LEAVE_SOURCE_GROUP\fR
 285  358  .ad
 286  359  .RS 28n
 287  360  Stop receiving packets for the given multicast group whose source address
 288  361  matches the specified address.
 289  362  .RE
 290  363  
 291  364  .sp
 292  365  .LP
 293  366  The following options take a struct \fBgroup_req\fR or struct
 294  367  \fBgroup_source_req\fR as the parameter. The `\fBgroup_req\fR structure
 295  368  contains an interface index and a multicast address which must be set to the
 296  369  CLASS-D multicast address. The \fBgroup_source_req\fR structure is used for
 297  370  those options which include a source address. It contains an interface index,
 298  371  multicast address, and source address.
 299  372  .sp
 300  373  .ne 2
 301  374  .na
 302      -\fB\fBIP_MULTICAST_IF\fR\fR
      375 +\fBIP_MULTICAST_IF\fR
 303  376  .ad
 304  377  .RS 21n
 305  378  The outgoing interface for multicast packets. This option takes a \fBstruct\fR
 306  379  \fBin_addr\fR as an argument, and it selects that interface for outgoing IP
 307  380  multicast packets. If the address specified is \fBINADDR_ANY\fR, it uses the
 308  381  unicast routing table to select the outgoing interface (which is the default
 309  382  behavior).
 310  383  .RE
 311  384  
 312  385  .sp
 313  386  .ne 2
 314  387  .na
 315      -\fB\fBIP_MULTICAST_TTL\fR\fR
      388 +\fBIP_MULTICAST_TTL\fR
 316  389  .ad
 317  390  .RS 21n
 318  391  Time to live for multicast datagrams. This option takes an unsigned character
 319  392  as an argument. Its value is the TTL that IP uses on outgoing multicast
 320  393  datagrams. The default is \fB1\fR.
 321  394  .RE
 322  395  
 323  396  .sp
 324  397  .ne 2
 325  398  .na
 326      -\fB\fBIP_MULTICAST_LOOP\fR\fR
      399 +\fBIP_MULTICAST_LOOP\fR
 327  400  .ad
 328  401  .RS 21n
 329  402  Loopback for multicast  datagrams. Normally multicast  datagrams are delivered
 330  403  to members on the sending host (or sending zone). Setting the unsigned
 331  404  character argument to 0 causes the opposite behavior, meaning that when
 332  405  multiple zones are present, the datagrams are delivered to all zones except the
 333  406  sending zone.
 334  407  .RE
 335  408  
 336  409  .sp
 337  410  .ne 2
 338  411  .na
 339      -\fB\fBIP_RECVIF\fR\fR
      412 +\fBIP_TOS\fR
 340  413  .ad
 341  414  .RS 21n
 342      -Receive the inbound interface index.
 343      -.RE
 344      -
 345      -.sp
 346      -.ne 2
 347      -.na
 348      -\fB\fBIP_TOS\fR\fR
 349      -.ad
 350      -.RS 21n
 351  415  This option takes an integer argument as its input value. The least significant
 352  416  8 bits of the value are used to set the Type Of Service field in the IP header
 353  417  of the outgoing packets.
 354  418  .RE
 355  419  
 356  420  .sp
 357  421  .ne 2
 358  422  .na
 359      -\fB\fBIP_NEXTHOP\fR\fR
      423 +\fBIP_NEXTHOP\fR
 360  424  .ad
 361  425  .RS 21n
 362  426  This option specifies the address of the onlink nexthop for traffic originating
 363  427  from that socket. It causes the routing table to be bypassed and outgoing
 364  428  traffic is sent directly to the specified nexthop. This option takes an
 365  429  ipaddr_t argument representing the IPv4 address of the nexthop as the input
 366  430  value. The IP_NEXTHOP option takes precedence over IPOPT_LSRR. IP_BOUND_IF and
 367  431  SO_DONTROUTE take precedence over IP_NEXTHOP. This option has no meaning for
 368  432  broadcast and multicast packets. The application must ensure that the specified
 369  433  nexthop is alive. An application may want to specify the IP_NEXTHOP option on a
↓ open down ↓ 263 lines elided ↑ open up ↑
 633  697  \fBaddress change\fR
 634  698  .ad
 635  699  .RS 18n
 636  700  An address has changed on a logical  interface.
 637  701  .RE
 638  702  
 639  703  .SH SEE ALSO
 640  704  .sp
 641  705  .LP
 642  706  \fBifconfig\fR(1M), \fBrouteadm\fR(1M), \fBndd\fR(1M), \fBread\fR(2),
 643      -\fBwrite\fR(2), \fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET),
 644      -\fBgetsockopt\fR(3SOCKET), \fBrecv\fR(3SOCKET), \fBsend\fR(3SOCKET),
 645      -\fBdefaultrouter\fR(4), \fBicmp\fR(7P), \fBif_tcp\fR(7P), \fBinet\fR(7P),
 646      -\fBip6\fR(7P), \fBipsec\fR(7P), \fBrouting\fR(7P), \fBtcp\fR(7P),
 647      -\fBudp\fR(7P), \fBnet_hook_register\fR(9F), \fBhook_pkt_event\fR(9S)
      707 +\fBwrite\fR(2), \fBsocket.h\fR(3HEAD), \fBbind\fR(3SOCKET),
      708 +\fBconnect\fR(3SOCKET), \fBgetsockopt\fR(3SOCKET), \fBrecv\fR(3SOCKET),
      709 +\fBsend\fR(3SOCKET), \fBdefaultrouter\fR(4), \fBicmp\fR(7P), \fBif_tcp\fR(7P),
      710 +\fBinet\fR(7P), \fBip\fR(7P), \fBip6\fR(7P), \fBipsec\fR(7P),
      711 +\fBrouting\fR(7P), \fBtcp\fR(7P), \fBudp\fR(7P), \fBnet_hook_register\fR(9F),
      712 +\fBhook_pkt_event\fR(9S)
 648  713  .sp
 649  714  .LP
 650  715  Braden, R., \fIRFC 1122, Requirements for Internet Hosts \(mi Communication
 651  716  Layers\fR, Information Sciences Institute, University of Southern California,
 652  717  October 1989.
 653  718  .sp
 654  719  .LP
 655  720  Postel, J., \fIRFC 791, Internet Protocol \(mi DARPA Internet Program Protocol
 656  721  Specification\fR, Information Sciences Institute, University of Southern
 657  722  California, September 1981.
 658  723  .SH DIAGNOSTICS
 659  724  .sp
 660  725  .LP
 661  726  A socket operation may fail with one of the following errors returned:
 662  727  .sp
 663  728  .ne 2
 664  729  .na
 665      -\fB\fBEACCES\fR\fR
      730 +\fBEACCES\fR
 666  731  .ad
 667  732  .RS 17n
 668  733  A \fBbind()\fR operation was attempted with a "reserved" port number and the
 669  734  effective user ID of the process was not the privileged user.
 670  735  .sp
 671  736  Setting the IP_NEXTHOP was attempted by a process lacking the
 672  737  PRIV_SYS_NET_CONFIG privilege.
 673  738  .RE
 674  739  
 675  740  .sp
 676  741  .ne 2
 677  742  .na
 678      -\fB\fBEADDRINUSE\fR\fR
      743 +\fBEADDRINUSE\fR
 679  744  .ad
 680  745  .RS 17n
 681  746  A \fBbind()\fR operation was attempted on a socket with a network address/port
 682  747  pair that has already been bound to another socket.
 683  748  .RE
 684  749  
 685  750  .sp
 686  751  .ne 2
 687  752  .na
 688      -\fB\fBEADDRNOTAVAIL\fR\fR
      753 +\fBEADDRNOTAVAIL\fR
 689  754  .ad
 690  755  .RS 17n
 691  756  A \fBbind()\fR operation was attempted for an address that is not configured on
 692  757  this machine.
 693  758  .RE
 694  759  
 695  760  .sp
 696  761  .ne 2
 697  762  .na
 698      -\fB\fBEINVAL\fR\fR
      763 +\fBEINVAL\fR
 699  764  .ad
 700  765  .RS 17n
 701  766  A \fBsendmsg()\fR operation with a non-NULL \fBmsg_accrights\fR was attempted.
 702  767  .RE
 703  768  
 704  769  .sp
 705  770  .ne 2
 706  771  .na
 707      -\fB\fBEINVAL\fR\fR
      772 +\fBEINVAL\fR
 708  773  .ad
 709  774  .RS 17n
 710  775  A \fBgetsockopt()\fR or \fBsetsockopt()\fR operation with an unknown socket
 711  776  option name was given.
 712  777  .RE
 713  778  
 714  779  .sp
 715  780  .ne 2
 716  781  .na
 717      -\fB\fBEINVAL\fR\fR
      782 +\fBEINVAL\fR
 718  783  .ad
 719  784  .RS 17n
 720  785  A \fBgetsockopt()\fR or \fBsetsockopt()\fR operation was attempted with the
 721  786  \fBIP\fR option field improperly formed; an option field was shorter than the
 722  787  minimum value or longer than the option buffer provided.
 723  788  .RE
 724  789  
 725  790  .sp
 726  791  .ne 2
 727  792  .na
 728      -\fB\fBEISCONN\fR\fR
      793 +\fBEISCONN\fR
 729  794  .ad
 730  795  .RS 17n
 731  796  A \fBconnect()\fR operation was attempted on a socket on which a
 732  797  \fBconnect()\fR operation had already been performed, and the socket could not
 733  798  be successfully disconnected before making the new connection.
 734  799  .RE
 735  800  
 736  801  .sp
 737  802  .ne 2
 738  803  .na
 739      -\fB\fBEISCONN\fR\fR
      804 +\fBEISCONN\fR
 740  805  .ad
 741  806  .RS 17n
 742  807  A \fBsendto()\fR or \fBsendmsg()\fR operation specifying an address to which
 743  808  the message should be sent was attempted on a socket on which a \fBconnect()\fR
 744  809  operation had already been performed.
 745  810  .RE
 746  811  
 747  812  .sp
 748  813  .ne 2
 749  814  .na
 750      -\fB\fBEMSGSIZE\fR\fR
      815 +\fBEMSGSIZE\fR
 751  816  .ad
 752  817  .RS 17n
 753  818  A \fBsend()\fR, \fBsendto()\fR, or \fBsendmsg()\fR operation was attempted to
 754  819  send a datagram that was too large for an interface, but was not allowed to be
 755  820  fragmented (such as broadcasts).
 756  821  .RE
 757  822  
 758  823  .sp
 759  824  .ne 2
 760  825  .na
 761      -\fB\fBENETUNREACH\fR\fR
      826 +\fBENETUNREACH\fR
 762  827  .ad
 763  828  .RS 17n
 764  829  An attempt was made to establish a connection by means of \fBconnect()\fR, or
 765  830  to send a datagram by means of \fBsendto()\fR or \fBsendmsg()\fR, where there
 766  831  was no matching entry in the routing table; or if an ICMP "destination
 767  832  unreachable" message was received.
 768  833  .RE
 769  834  
 770  835  .sp
 771  836  .ne 2
 772  837  .na
 773      -\fB\fBENOTCONN\fR\fR
      838 +\fBENOTCONN\fR
 774  839  .ad
 775  840  .RS 17n
 776  841  A \fBsend()\fR or \fBwrite()\fR operation, or a \fBsendto()\fR or
 777  842  \fBsendmsg()\fR operation not specifying an address to which the message should
 778  843  be sent, was attempted on a socket on which a \fBconnect()\fR operation had not
 779  844  already been performed.
 780  845  .RE
 781  846  
 782  847  .sp
 783  848  .ne 2
 784  849  .na
 785      -\fB\fBENOBUFS\fR\fR
      850 +\fBENOBUFS\fR
 786  851  .ad
 787  852  .RS 17n
 788  853  The system ran out of memory for fragmentation buffers or other internal data
 789  854  structures.
 790  855  .RE
 791  856  
 792  857  .sp
 793  858  .ne 2
 794  859  .na
 795      -\fB\fBENOBUFS\fR\fR
      860 +\fBENOBUFS\fR
 796  861  .ad
 797  862  .RS 17n
 798  863  \fBSO_SNDBUF\fR or \fBSO_RCVBUF\fR exceeds a system limit.
 799  864  .RE
 800  865  
 801  866  .sp
 802  867  .ne 2
 803  868  .na
 804      -\fB\fBEINVAL\fR\fR
      869 +\fBEINVAL\fR
 805  870  .ad
 806  871  .RS 17n
 807  872  Invalid length for \fBIP_OPTIONS\fR.
 808  873  .RE
 809  874  
 810  875  .sp
 811  876  .ne 2
 812  877  .na
 813      -\fB\fBEHOSTUNREACH\fR\fR
      878 +\fBEHOSTUNREACH\fR
 814  879  .ad
 815  880  .RS 17n
 816  881  Invalid address for \fBIP_MULTICAST_IF\fR.
 817  882  .sp
 818  883  Invalid (offlink) nexthop address for IP_NEXTHOP.
 819  884  .RE
 820  885  
 821  886  .sp
 822  887  .ne 2
 823  888  .na
 824      -\fB\fBEINVAL\fR\fR
      889 +\fBEINVAL\fR
 825  890  .ad
 826  891  .RS 17n
 827  892  Not a multicast address for \fBIP_ADD_MEMBERSHIP\fR and
 828  893  \fBIP_DROP_MEMBERSHIP\fR.
 829  894  .RE
 830  895  
 831  896  .sp
 832  897  .ne 2
 833  898  .na
 834      -\fB\fBEADDRNOTAVAIL\fR\fR
      899 +\fBEADDRNOTAVAIL\fR
 835  900  .ad
 836  901  .RS 17n
 837  902  Bad interface address for \fBIP_ADD_MEMBERSHIP\fR and \fBIP_DROP_MEMBERSHIP\fR.
 838  903  .RE
 839  904  
 840  905  .sp
 841  906  .ne 2
 842  907  .na
 843      -\fB\fBEADDRINUSE\fR\fR
      908 +\fBEADDRINUSE\fR
 844  909  .ad
 845  910  .RS 17n
 846  911  Address already joined for \fBIP_ADD_MEMBERSHIP\fR.
 847  912  .RE
 848  913  
 849  914  .sp
 850  915  .ne 2
 851  916  .na
 852      -\fB\fBENOENT\fR\fR
      917 +\fBENOENT\fR
 853  918  .ad
 854  919  .RS 17n
 855  920  Address not joined for \fBIP_DROP_MEMBERSHIP\fR.
 856  921  .RE
 857  922  
 858  923  .sp
 859  924  .ne 2
 860  925  .na
 861      -\fB\fBENOPROTOOPT\fR\fR
      926 +\fBENOPROTOOPT\fR
 862  927  .ad
 863  928  .RS 17n
 864  929  Invalid socket type.
 865  930  .RE
 866  931  
 867  932  .sp
 868  933  .ne 2
 869  934  .na
 870      -\fB\fBEPERM\fR\fR
      935 +\fBEPERM\fR
 871  936  .ad
 872  937  .RS 17n
 873  938  No permissions.
 874  939  .RE
 875  940  
 876  941  .SH NOTES
 877  942  .sp
 878  943  .LP
 879  944  Raw sockets should receive \fBICMP\fR error packets relating to the protocol;
 880  945  currently such packets are simply discarded.
 881  946  .sp
 882  947  .LP
 883  948  Users of higher-level protocols such as \fBTCP\fR and \fBUDP\fR should be able
 884  949  to see received IP options.
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX