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