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/man3head/socket.h.3head
          +++ new/usr/src/man/man3head/socket.h.3head
↓ open down ↓ 34 lines elided ↑ open up ↑
  35   35  .\"
  36   36  .\" When distributing Covered Code, include this CDDL HEADER in each
  37   37  .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  38   38  .\" If applicable, add the following below this CDDL HEADER, with the
  39   39  .\" fields enclosed by brackets "[]" replaced with your own identifying
  40   40  .\" information: Portions Copyright [yyyy] [name of copyright owner]
  41   41  .\"
  42   42  .\"
  43   43  .\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved.
  44   44  .\" Portions Copyright (c) 2009, Sun Microsystems, Inc.  All Rights Reserved.
       45 +.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
  45   46  .\"
  46      -.TH SOCKET.H 3HEAD "Jun 18, 2017"
       47 +.TH SOCKET.H 3HEAD "Sep 18, 2020"
  47   48  .SH NAME
  48      -socket.h, socket \- Internet Protocol family
       49 +socket.h, socket, CMSG_DATA, CMSG_FIRSTHDR, CMSG_LEN, CMSG_NXTHDR, CMSG_SPACE \- Internet Protocol family
  49   50  .SH SYNOPSIS
  50      -.LP
  51   51  .nf
  52   52  \fB#include <sys/socket.h>\fR
  53   53  .fi
  54   54  
  55   55  .SH DESCRIPTION
  56      -.LP
  57   56  The \fB<sys/socket.h>\fR header defines the unsigned integral type
  58   57  \fBsa_family_t\fR through \fBtypedef\fR.
  59   58  .sp
  60   59  .LP
  61   60  The \fB<sys/socket.h>\fR header defines the \fBsockaddr\fR structure that
  62   61  includes the following members:
  63   62  .sp
  64   63  .in +2
  65   64  .nf
  66   65  sa_family_t   sa_family     /* address family */
  67   66  char          sa_data[]     /* socket   address (variable-length
  68   67                                  data) */
  69   68  .fi
  70   69  .in -2
  71   70  
  72   71  .SS "\fBlibxnet\fR Interfaces"
  73      -.LP
  74   72  The \fB<sys/socket.h>\fR header defines the \fBmsghdr\fR structure for
  75   73  \fBlibxnet\fR interfaces that includes the following members:
  76   74  .sp
  77   75  .in +2
  78   76  .nf
  79   77  void            *msg_name         /* optional address */
  80   78  socklen_t       msg_namelen       /* size of address */
  81   79  struct iovec    *msg_iov          /* scatter/gather array */
  82   80  int             msg_iovlen        /* members in msg_iov */
  83   81  void            *msg_control      /* ancillary data, see below */
↓ open down ↓ 27 lines elided ↑ open up ↑
 111  109  the \fBgetsockopt()\fR and \fBsetsockopt()\fR functions. The \fBSCM_RIGHTS\fR
 112  110  type is supported for level \fBSOL_SOCKET\fR.
 113  111  .sp
 114  112  .LP
 115  113  Ancillary data is also possible at the socket level. The \fB<sys/socket.h>\fR
 116  114  header defines the following macros for use as the \fBcmsg_type\fR values when
 117  115  \fBcmsg_level\fR is \fBSOL_SOCKET\fR.
 118  116  .sp
 119  117  .ne 2
 120  118  .na
 121      -\fB\fBSCM_RIGHTS\fR\fR
      119 +\fBSCM_RIGHTS\fR
 122  120  .ad
 123  121  .RS 14n
 124      -Indicates that the data array contains the access rights to be sent or
 125      -received.
      122 +Indicates that the data array contains the access rights (set of open file
      123 +descriptors) to be sent or received.
 126  124  .RE
 127  125  
 128  126  .sp
 129  127  .ne 2
 130  128  .na
 131      -\fB\fBSCM_UCRED\fR\fR
      129 +\fBSCM_UCRED\fR
 132  130  .ad
 133  131  .RS 14n
 134  132  Indicates that the data array contains a \fBucred_t\fR to be received. The
 135  133  \fBucred_t\fR is the credential of the sending process at the time the message
 136  134  was sent. This is a Sun-specific, Evolving interface. See \fBucred_get\fR(3C).
 137  135  .RE
 138  136  
 139  137  .sp
 140  138  .LP
 141      -The IPv4 data formats generally use the same values for data passed back in
 142      -\fBcmsghdr\fR as for \fBsetsockopt()\fR to enable the feature. The IPv4 data
 143      -formats are listed below with the associated payload for each.
      139 +The IPv4 ancillary data formats are listed below by \fBcmsg_level\fR and
      140 +\fBcmsg_type\fR, along with the associated payload for each.
 144  141  .sp
 145  142  .ne 2
 146  143  .na
 147      -\fB\fBIPPROTO_IP\fR\fR
      144 +\fBIPPROTO_IP\fR, \fBIP_RECVDSTADDR\fR \(em \fBSOCK_DGRAM\fR only
 148  145  .ad
 149      -.br
 150      -.na
 151      -\fB\fBIP_RECVDSTADDR\fR\fR
 152      -.ad
 153  146  .sp .6
 154  147  .RS 4n
 155  148  \fBipaddr_t\fR, IP address
 156  149  .RE
 157  150  
 158  151  .sp
 159  152  .ne 2
 160  153  .na
 161      -\fB\fBIPPROTO_IP\fR\fR
      154 +\fBIPPROTO_IP\fR, \fBIP_RECVIF\fR
 162  155  .ad
 163      -.br
      156 +.sp .6
      157 +.RS 4n
      158 +\fBuint_t\fR, \fBifIndex\fR number
      159 +.RE
      160 +
      161 +.sp
      162 +.ne 2
 164  163  .na
 165      -\fB\fBIP_RECVOPTS\fR\fR
      164 +\fBIPPROTO_IP\fR, \fBIP_RECVOPTS\fR \(em \fBSOCK_DGRAM\fR only
 166  165  .ad
 167  166  .sp .6
 168  167  .RS 4n
 169  168  variable-length IP options, up to 40 bytes
 170  169  .RE
 171  170  
 172  171  .sp
 173  172  .ne 2
 174  173  .na
 175      -\fB\fBIPPROTO_IP\fR\fR
      174 +\fBIPPROTO_IP\fR, \fBIP_RECVPKTINFO\fR \(em \fBSOCK_DGRAM\fR only
 176  175  .ad
 177      -.br
 178      -.na
 179      -\fB\fBIP_RECVIF\fR\fR
 180      -.ad
 181  176  .sp .6
 182  177  .RS 4n
 183      -\fBuint_t\fR, \fBifIndex\fR number
      178 +\fBin_pktinfo_t\fR
 184  179  .RE
 185  180  
 186  181  .sp
 187  182  .ne 2
 188  183  .na
 189      -\fB\fBIPPROTO_IP\fR\fR
      184 +\fBIPPROTO_IP\fR, \fBIP_RECVSLLA\fR \(em \fBSOCK_DGRAM\fR only
 190  185  .ad
 191      -.br
 192      -.na
 193      -\fB\fBIP_RECVSLLA\fR\fR
 194      -.ad
 195  186  .sp .6
 196  187  .RS 4n
 197  188  \fBstruct sockaddr_dl\fR, link layer address
 198  189  .RE
 199  190  
 200  191  .sp
 201  192  .ne 2
 202  193  .na
 203      -\fB\fBIPPROTO_IP\fR\fR
      194 +\fBIPPROTO_IP\fR, \fBIP_RECVTTL\fR \(em \fBSOCK_DGRAM\fR only
 204  195  .ad
 205      -.br
      196 +.sp .6
      197 +.RS 4n
      198 +\fBuint8_t\fR, the IP TTL (time to live)
      199 +.RE
      200 +
      201 +.sp
      202 +.ne 2
 206  203  .na
 207      -\fB\fBIP_RECVTTL\fR\fR
      204 +\fBIPPROTO_IP\fR, \fBIP_RECVTOS\fR
 208  205  .ad
 209  206  .sp .6
 210  207  .RS 4n
 211      -\fBuint8_t\fR
      208 +\fBuint8_t\fR, the IP TOS (type of service)
 212  209  .RE
 213  210  
 214  211  .sp
 215  212  .ne 2
 216  213  .na
 217      -\fB\fBSOL_SOCKET\fR\fR
      214 +\fBSOL_SOCKET\fR, \fBSO_UCRED\fR
 218  215  .ad
 219      -.br
 220      -.na
 221      -\fB\fBSO_RECVUCRED\fR\fR
 222      -.ad
 223  216  .sp .6
 224  217  .RS 4n
 225      -\fBucred_t\fR \(em \fBcmsghdr.cmsg_type\fR is \fBSCM_UCRED\fR, not
 226      -\fBSO_RECVUCRED\fR
      218 +\fBucred_t\fR
 227  219  .RE
 228  220  
 229  221  .sp
 230  222  .LP
 231      -The IPv6 data formats use different values for enabling the option and for
 232      -passing the value back to the application. The IPv6 data formats are listed
 233      -below with the associated payload for each.
      223 +The IPv6 ancillary data formats are listed below by \fBcmsg_level\fR and
      224 +\fBcmsg_type\fR, along with the associated payload for each.
 234  225  .sp
 235  226  .ne 2
 236  227  .na
 237      -\fB\fBIPPROTO_IPV6\fR\fR
      228 +\fBIPPROTO_IPV6\fR, \fBIPV6_PKTINFO\fR
 238  229  .ad
 239      -.br
 240      -.na
 241      -\fB\fBIPV6_RECVPKTINFO\fR\fR
 242      -.ad
 243  230  .sp .6
 244  231  .RS 4n
 245      -\fBin_pktinfo\fR, \fBcmsg_type\fR \fBIPV6_PKTINFO\fR
      232 +\fBin_pktinfo_t\fR
 246  233  .RE
 247  234  
 248  235  .sp
 249  236  .ne 2
 250  237  .na
 251      -\fB\fBIPPROTO_IPV6\fR\fR
      238 +\fBIPPROTO_IPV6\fR, \fBIPV6_TCLASS\fR
 252  239  .ad
 253      -.br
 254      -.na
 255      -\fB\fBIPV6_RECVTCLASS\fR\fR
 256      -.ad
 257  240  .sp .6
 258  241  .RS 4n
 259      -\fBuint_t\fR, \fBcmsg_type\fR \fBIPV6_TCLASS\fR
      242 +\fBuint_t\fR
 260  243  .RE
 261  244  
 262  245  .sp
 263  246  .ne 2
 264  247  .na
 265      -\fB\fBIPPROTO_IPV6\fR\fR
      248 +\fBIPPROTO_IPV6\fR, \fBIPV6_PATHMTU\fR
 266  249  .ad
 267      -.br
 268      -.na
 269      -\fB\fBIPV6_RECVPATHMTU\fR\fR
 270      -.ad
 271  250  .sp .6
 272  251  .RS 4n
 273      -\fBip6_mtuinfo\fR, \fBcmsg_type\fR \fBIPV6_PATHMTU\fR
      252 +\fBip6_mtuinfo\fR
 274  253  .RE
 275  254  
 276  255  .sp
 277  256  .ne 2
 278  257  .na
 279      -\fB\fBIPPROTO_IPV6\fR\fR
      258 +\fBIPPROTO_IPV6\fR, \fBIPV6_HOPLIMIT\fR
 280  259  .ad
 281      -.br
 282      -.na
 283      -\fB\fBIPV6_RECVHOPLIMIT\fR\fR
 284      -.ad
 285  260  .sp .6
 286  261  .RS 4n
 287      -\fBuint_t\fR, \fBcmsg_type\fR \fBIPV6_HOPLIMIT\fR
      262 +\fBuint_t\fR
 288  263  .RE
 289  264  
 290  265  .sp
 291  266  .ne 2
 292  267  .na
 293      -\fB\fBIPPROTO_IPV6\fR\fR
      268 +\fBIPPROTO_IPV6\fR, \fBIPV6_HOPOPTS\fR
 294  269  .ad
 295      -.br
 296      -.na
 297      -\fB\fBIPV6_RECVHOPOPTS\fR\fR
 298      -.ad
 299  270  .sp .6
 300  271  .RS 4n
 301      -variable-length IPv6 options, \fBcmsg_type\fR \fBIPV6_HOPOPTS\fR
      272 +variable-length IPv6 options
 302  273  .RE
 303  274  
 304  275  .sp
 305  276  .ne 2
 306  277  .na
 307      -\fB\fBIPPROTO_IPV6\fR\fR
      278 +\fBIPPROTO_IPV6\fR, \fBIPV6_DSTOPTS\fR
 308  279  .ad
 309      -.br
 310      -.na
 311      -\fB\fBIPV6_RECVDSTOPTS\fR\fR
 312      -.ad
 313  280  .sp .6
 314  281  .RS 4n
 315      -variable-length IPv6 options, \fBcmsg_type\fR \fBIPV6_DSTOPTS\fR
      282 +variable-length IPv6 options
 316  283  .RE
 317  284  
 318  285  .sp
 319  286  .ne 2
 320  287  .na
 321      -\fB\fBIPPROTO_IPV6\fR\fR
      288 +\fBIPPROTO_IPV6\fR, \fBIPV6_RTHDR\fR
 322  289  .ad
 323      -.br
 324      -.na
 325      -\fB\fBIPV6_RECVRTHDR\fR\fR
 326      -.ad
 327  290  .sp .6
 328  291  .RS 4n
 329      -variable-length IPv6 options, \fBcmsg_type\fR \fBIPV6_RTHDR\fR
      292 +variable-length IPv6 options
 330  293  .RE
 331  294  
 332  295  .sp
 333  296  .ne 2
 334  297  .na
 335      -\fB\fBIPPROTO_IPV6\fR\fR
      298 +\fBIPPROTO_IPV6\fR, \fBIPV6_DSTOPTS\fR
 336  299  .ad
 337      -.br
 338      -.na
 339      -\fB\fBIPV6_RECVRTHDRDSTOPTS\fR\fR
 340      -.ad
 341  300  .sp .6
 342  301  .RS 4n
 343      -variable-length IPv6 options, \fBcmsg_type\fR \fBIPV6_DSTOPTS\fR
      302 +variable-length IPv6 options
 344  303  .RE
 345  304  
 346  305  .sp
 347  306  .LP
 348  307  The \fB<sys/socket.h>\fR header defines the following macros to gain access to
 349  308  the data arrays in the ancillary data associated with a message header:
 350  309  .sp
 351  310  .ne 2
 352  311  .na
 353  312  \fB\fBCMSG_DATA(\fR\fIcmsg\fR)\fR
↓ open down ↓ 70 lines elided ↑ open up ↑
 424  383  int   l_linger  /* linger time, in seconds */
 425  384  .fi
 426  385  .in -2
 427  386  
 428  387  .sp
 429  388  .LP
 430  389  The \fB<sys/socket.h>\fR header defines the following macros:
 431  390  .sp
 432  391  .ne 2
 433  392  .na
 434      -\fB\fBSOCK_DGRAM\fR\fR
      393 +\fBSOCK_DGRAM\fR
 435  394  .ad
 436  395  .RS 18n
 437  396  Datagram socket
 438  397  .RE
 439  398  
 440  399  .sp
 441  400  .ne 2
 442  401  .na
 443      -\fB\fBSOCK_STREAM\fR\fR
      402 +\fBSOCK_STREAM\fR
 444  403  .ad
 445  404  .RS 18n
 446  405  Byte-stream socket
 447  406  .RE
 448  407  
 449  408  .sp
 450  409  .ne 2
 451  410  .na
 452      -\fB\fBSOCK_SEQPACKET\fR\fR
      411 +\fBSOCK_SEQPACKET\fR
 453  412  .ad
 454  413  .RS 18n
 455  414  Sequenced-packet socket
 456  415  .RE
 457  416  
 458  417  .sp
 459  418  .LP
 460  419  The \fB<sys/socket.h>\fR header defines the following macros for use as the
 461  420  \fIlevel\fR argument of \fBsetsockopt()\fR and \fBgetsockopt()\fR.
 462  421  .sp
 463  422  .ne 2
 464  423  .na
 465      -\fB\fBSOL_SOCKET\fR\fR
      424 +\fBSOL_SOCKET\fR
 466  425  .ad
 467  426  .RS 14n
 468  427  Options to be accessed at the socket level, not the protocol level.
 469  428  .RE
 470  429  
 471  430  .sp
 472  431  .ne 2
 473  432  .na
 474      -\fB\fBSOL_ROUTE\fR\fR
      433 +\fBSOL_ROUTE\fR
 475  434  .ad
 476  435  .RS 14n
 477  436  Options to be accessed at the routing socket level, not the protocol level.
 478  437  .RE
 479  438  
 480  439  .sp
 481  440  .LP
 482  441  The \fB<sys/socket.h>\fR header defines the following macros for use as the
 483  442  \fIoption_name\fR argument of \fBgetsockopt()\fR or \fBsetsockopt()\fR calls:
 484  443  .sp
 485  444  .ne 2
 486  445  .na
 487      -\fB\fBSO_DEBUG\fR\fR
      446 +\fBSO_DEBUG\fR
 488  447  .ad
 489  448  .RS 17n
 490  449  Debugging information is being recorded.
 491  450  .RE
 492  451  
 493  452  .sp
 494  453  .ne 2
 495  454  .na
 496      -\fB\fBSO_ACCEPTCONN\fR\fR
      455 +\fBSO_ACCEPTCONN\fR
 497  456  .ad
 498  457  .RS 17n
 499  458  Socket is accepting connections.
 500  459  .RE
 501  460  
 502  461  .sp
 503  462  .ne 2
 504  463  .na
 505      -\fB\fBSO_BROADCAST\fR\fR
      464 +\fBSO_BROADCAST\fR
 506  465  .ad
 507  466  .RS 17n
 508  467  Transmission of broadcast messages is supported.
 509  468  .RE
 510  469  
 511  470  .sp
 512  471  .ne 2
 513  472  .na
 514      -\fB\fBSO_REUSEADDR\fR\fR
      473 +\fBSO_REUSEADDR\fR
 515  474  .ad
 516  475  .RS 17n
 517  476  Reuse of local addresses is supported.
 518  477  .RE
 519  478  
 520  479  .sp
 521  480  .ne 2
 522  481  .na
 523      -\fB\fBSO_KEEPALIVE\fR\fR
      482 +\fBSO_KEEPALIVE\fR
 524  483  .ad
 525  484  .RS 17n
 526  485  Connections are kept alive with periodic messages.
 527  486  .RE
 528  487  
 529  488  .sp
 530  489  .ne 2
 531  490  .na
 532      -\fB\fBSO_LINGER\fR\fR
      491 +\fBSO_LINGER\fR
 533  492  .ad
 534  493  .RS 17n
 535  494  Socket lingers on close.
 536  495  .RE
 537  496  
 538  497  .sp
 539  498  .ne 2
 540  499  .na
 541      -\fB\fBSO_OOBINLINE\fR\fR
      500 +\fBSO_OOBINLINE\fR
 542  501  .ad
 543  502  .RS 17n
 544  503  Out-of-band data is transmitted in line.
 545  504  .RE
 546  505  
 547  506  .sp
 548  507  .ne 2
 549  508  .na
 550      -\fB\fBSO_SNDBUF\fR\fR
      509 +\fBSO_SNDBUF\fR
 551  510  .ad
 552  511  .RS 17n
 553  512  Send buffer size.
 554  513  .RE
 555  514  
 556  515  .sp
 557  516  .ne 2
 558  517  .na
 559      -\fB\fBSO_RCVBUF\fR\fR
      518 +\fBSO_RCVBUF\fR
 560  519  .ad
 561  520  .RS 17n
 562  521  Receive buffer size.
 563  522  .RE
 564  523  
 565  524  .sp
 566  525  .ne 2
 567  526  .na
 568      -\fB\fBSO_ERROR\fR\fR
      527 +\fBSO_ERROR\fR
 569  528  .ad
 570  529  .RS 17n
 571  530  Socket error status.
 572  531  .RE
 573  532  
 574  533  .sp
 575  534  .ne 2
 576  535  .na
 577      -\fB\fBSO_TYPE\fR\fR
      536 +\fBSO_TYPE\fR
 578  537  .ad
 579  538  .RS 17n
 580  539  Socket type.
 581  540  .RE
 582  541  
 583  542  .sp
 584  543  .ne 2
 585  544  .na
 586      -\fB\fBSO_RECVUCRED\fR\fR
      545 +\fBSO_RECVUCRED\fR
 587  546  .ad
 588  547  .RS 17n
 589  548  Request the reception of user credential ancillary data. This is a
 590  549  Sun-specific, Evolving interface. See \fBucred_get\fR(3C).
 591  550  .RE
 592  551  
 593  552  .sp
 594  553  .ne 2
 595  554  .na
 596      -\fB\fBSO_MAC_EXEMPT\fR\fR
      555 +\fBSO_MAC_EXEMPT\fR
 597  556  .ad
 598  557  .RS 17n
 599  558  Mandatory Access Control (\fBMAC\fR) exemption for unlabeled peers. This option
 600  559  is available only if the system is configured with Trusted Extensions.
 601  560  .RE
 602  561  
 603  562  .sp
 604  563  .ne 2
 605  564  .na
 606      -\fB\fBSO_ALLZONES\fR\fR
      565 +\fBSO_ALLZONES\fR
 607  566  .ad
 608  567  .RS 17n
 609  568  Bypass zone boundaries (privileged).
 610  569  .RE
 611  570  
 612  571  .sp
 613  572  .LP
 614  573  The \fB<sys/socket.h>\fR header defines the following macros for use as the
 615  574  valid values for the \fBmsg_flags\fR field in the \fBmsghdr\fR structure, or
 616  575  the flags parameter in \fBrecvfrom()\fR, \fBrecvmsg()\fR, \fBsendto()\fR, or
 617  576  \fBsendmsg()\fR calls:
 618  577  .sp
 619  578  .ne 2
 620  579  .na
 621      -\fB\fBMSG_CTRUNC\fR\fR
      580 +\fBMSG_CTRUNC\fR
 622  581  .ad
 623  582  .RS 15n
 624  583  Control data truncated.
 625  584  .RE
 626  585  
 627  586  .sp
 628  587  .ne 2
 629  588  .na
 630      -\fB\fBMSG_EOR\fR\fR
      589 +\fBMSG_EOR\fR
 631  590  .ad
 632  591  .RS 15n
 633  592  Terminates a record (if supported by the protocol).
 634  593  .RE
 635  594  
 636  595  .sp
 637  596  .ne 2
 638  597  .na
 639      -\fB\fBMSG_OOB\fR\fR
      598 +\fBMSG_OOB\fR
 640  599  .ad
 641  600  .RS 15n
 642  601  Out-of-band data.
 643  602  .RE
 644  603  
 645  604  .sp
 646  605  .ne 2
 647  606  .na
 648      -\fB\fBMSG_PEEK\fR\fR
      607 +\fBMSG_PEEK\fR
 649  608  .ad
 650  609  .RS 15n
 651  610  Leave received data in queue.
 652  611  .RE
 653  612  
 654  613  .sp
 655  614  .ne 2
 656  615  .na
 657      -\fB\fBMSG_TRUNC\fR\fR
      616 +\fBMSG_TRUNC\fR
 658  617  .ad
 659  618  .RS 15n
 660  619  Normal data truncated.
 661  620  .RE
 662  621  
 663  622  .sp
 664  623  .ne 2
 665  624  .na
 666      -\fB\fBMSG_WAITALL\fR\fR
      625 +\fBMSG_WAITALL\fR
 667  626  .ad
 668  627  .RS 15n
 669  628  Wait for complete message.
 670  629  .RE
 671  630  
 672  631  .sp
 673  632  .ne 2
 674  633  .na
 675      -\fB\fBMSG_NOSIGNAL\fR\fR
      634 +\fBMSG_NOSIGNAL\fR
 676  635  .ad
 677  636  .RS 15n
 678  637  Do not generate \fBSIGPIPE\fR signal.
 679  638  .RE
 680  639  
 681  640  .sp
 682  641  .LP
 683  642  The \fB<sys/socket.h>\fR header defines the following macros:
 684  643  .sp
 685  644  .ne 2
 686  645  .na
 687      -\fB\fBAF_UNIX\fR\fR
      646 +\fBAF_UNIX\fR
 688  647  .ad
 689  648  .RS 11n
 690  649  UNIX domain sockets
 691  650  .RE
 692  651  
 693  652  .sp
 694  653  .ne 2
 695  654  .na
 696      -\fB\fBAF_INET\fR\fR
      655 +\fBAF_INET\fR
 697  656  .ad
 698  657  .RS 11n
 699  658  Internet domain sockets
 700  659  .RE
 701  660  
 702  661  .sp
 703  662  .LP
 704  663  The \fB<sys/socket.h>\fR header defines the following macros:
 705  664  .sp
 706  665  .ne 2
 707  666  .na
 708      -\fB\fBSHUT_RD\fR\fR
      667 +\fBSHUT_RD\fR
 709  668  .ad
 710  669  .RS 13n
 711  670  Disables further receive operations.
 712  671  .RE
 713  672  
 714  673  .sp
 715  674  .ne 2
 716  675  .na
 717      -\fB\fBSHUT_WR\fR\fR
      676 +\fBSHUT_WR\fR
 718  677  .ad
 719  678  .RS 13n
 720  679  Disables further send operations.
 721  680  .RE
 722  681  
 723  682  .sp
 724  683  .ne 2
 725  684  .na
 726      -\fB\fBSHUT_RDWR\fR\fR
      685 +\fBSHUT_RDWR\fR
 727  686  .ad
 728  687  .RS 13n
 729  688  Disables further send and receive operations.
 730  689  .RE
 731  690  
 732  691  .SS "\fBlibsocket\fR Interfaces"
 733      -.LP
 734  692  The \fB<sys/socket.h>\fR header defines the \fBmsghdr\fR structure for
 735  693  \fBlibsocket\fR interfaces that includes the following members:
 736  694  .sp
 737  695  .in +2
 738  696  .nf
 739  697  void           *msg_name        /* optional address */
 740  698  socklen_t      msg_namelen      /* size of address */
 741  699  struct iovec   *msg_iov         /* scatter/gather array */
 742  700  int            msg_iovlen       /* # elements in msg_iov */
 743  701  caddr_t        msg_accrights    /* access rights sent/received */
↓ open down ↓ 3 lines elided ↑ open up ↑
 747  705  .sp
 748  706  .LP
 749  707  The \fImsg_name\fR and \fImsg_namelen\fR parameters specify the destination
 750  708  address when the socket is unconnected The \fImsg_name\fR can be specified as a
 751  709  \fINULL\fR pointer if no names are desired or required. The \fImsg_iov\fR and
 752  710  \fImsg_iovlen\fR parameters describe the scatter-gather locations, as described
 753  711  in \fBread\fR(2). The \fImsg_accrights\fR parameter specifies the buffer in
 754  712  which access rights sent along with the message are received. The
 755  713  \fImsg_accrightslen\fR specifies the length of the buffer.
 756  714  .SH ATTRIBUTES
 757      -.LP
 758  715  See \fBattributes\fR(5) for descriptions of the following attributes:
 759  716  .sp
 760  717  
 761  718  .sp
 762  719  .TS
 763  720  box;
 764  721  c | c
 765  722  l | l .
 766  723  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 767  724  _
 768  725  Interface Stability     Standard
 769  726  .TE
 770  727  
 771  728  .SH SEE ALSO
 772      -.LP
 773  729  \fBaccept\fR(3SOCKET), \fBaccept\fR(3XNET), \fBbind\fR(3SOCKET),
 774  730  \fBbind\fR(3XNET), \fBconnect\fR(3SOCKET), \fBconnect\fR(3XNET),
 775  731  \fBgetpeername\fR(3SOCKET), \fBgetpeername\fR(3XNET), \fBgetpeerucred\fR(3C),
 776  732  \fBgetsockname\fR(3SOCKET), \fBgetsockname\fR(3XNET),
 777  733  \fBgetsockopt\fR(3SOCKET), \fBgetsockopt\fR(3XNET), \fBlibsocket\fR(3LIB),
 778  734  \fBlisten\fR(3SOCKET), \fBlisten\fR(3XNET), \fBrecv\fR(3SOCKET),
 779  735  \fBrecv\fR(3XNET), \fBrecvfrom\fR(3SOCKET), \fBrecvfrom\fR(3XNET),
 780  736  \fBrecvmsg\fR(3SOCKET), \fBrecvmsg\fR(3XNET), \fBsend\fR(3SOCKET),
 781  737  \fBsend\fR(3XNET), \fBsendmsg\fR(3SOCKET), \fBsendmsg\fR(3XNET),
 782  738  \fBsendto\fR(3SOCKET), \fBsendto\fR(3XNET), \fBsetsockopt\fR(3SOCKET),
 783  739  \fBsetsockopt\fR(3XNET), \fBshutdown\fR(3SOCKET), \fBshutdown\fR(3XNET),
 784  740  \fBsockaddr\fR(3SOCKET),
 785  741  \fBsocket\fR(3SOCKET), \fBsocket\fR(3XNET), \fBsocketpair\fR(3SOCKET),
 786  742  \fBsocketpair\fR(3XNET), \fBucred_get\fR(3C), \fBattributes\fR(5),
 787  743  \fBstandards\fR(5)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX