1 .\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved.
2 .\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
4 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
5 .\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
6 .\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
7 .\" This notice shall appear on any product containing this material.
8 .\" 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.
9 .\" 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.
10 .\" 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]
17 .Nd Internet Protocol family
23 header defines the unsigned integral type
32 structure that includes the following members:
33 .Bd -literal -offset indent
34 sa_family_t sa_family /* address family */
35 char sa_data[] /* socket address (variable-length
42 structure that includes the following members:
43 .Bd -literal -offset indent
44 void *msg_name /* optional address */
45 socklen_t msg_namelen /* size of address */
46 struct iovec *msg_iov /* scatter/gather array */
47 int msg_iovlen /* members in msg_iov */
48 void *msg_control /* ancillary data, see below */
49 socklen_t msg_controllen /* ancillary data buffer len */
50 int msg_flags /* flags on received message */
57 structure that includes the following members:
58 .Bd -literal -offset indent
59 socklen_t cmsg_len /* data byte count, including hdr */
60 int cmsg_level /* originating protocol */
61 int cmsg_type /* protocol-specific type */
64 Ancillary data consists of a sequence of pairs, each consisting of a
66 structure followed by a data array. The data array contains the ancillary data
69 structure contains descriptive information that allows an application to
70 correctly parse the data.
74 will be legal values for the level argument to the
80 type is supported for level
83 Ancillary data is also possible at the socket level. The
85 header defines the following macros for use as the
93 Indicates that the data array contains the access rights to be sent or
96 Indicates that the data array contains a
100 is the credential of the sending process at the time the message was sent. This
101 is a Sun-specific, Evolving interface. See
105 The IPv4 data formats generally use the same values for data passed back in
109 to enable the feature. The IPv4 data formats are listed below with the
110 associated payload for each.
112 .It Dv IPPROTO_IP IP_RECVDSTADDR
115 .It Dv IPPROTO_IP IP_RECVOPTS
116 variable-length IP options, up to 40 bytes
117 .It Dv IPPROTO_IP IP_RECVIF
121 .It Dv IPPROTO_IP IP_RECVSLLA
122 .Vt struct sockaddr_dl ,
124 .It Dv IPPROTO_IP IP_RECVTTL
126 .It Dv SOL_SOCKET SO_RECVUCRED
129 .Va cmsghdr.cmsg_type
136 The IPv6 data formats use different values for enabling the option and for
137 passing the value back to the application. The IPv6 data formats are listed
138 below with the associated payload for each.
140 .It Dv IPPROTO_IPV6 IPV6_RECVPKTINFO
144 .It Dv IPPROTO_IPV6 IPV6_RECVTCLASS
148 .It Dv IPPROTO_IPV6 IPV6_RECVPATHMTU
152 .It Dv IPPROTO_IPV6 IPV6_RECVHOPLIMIT
156 .It Dv IPPROTO_IPV6 IPV6_RECVHOPOPTS
157 variable-length IPv6 options,
160 .It Dv IPPROTO_IPV6 IPV6_RECVDSTOPTS
161 variable-length IPv6 options,
164 .It Dv IPPROTO_IPV6 IPV6_RECVRTHDR
165 variable-length IPv6 options,
168 .It Dv IPPROTO_IPV6 IPV6_RECVRTHDRDSTOPTS
169 variable-length IPv6 options,
176 header defines the following macros to gain access to the data arrays in the
177 ancillary data associated with a message header:
186 header defines the linger structure that includes the following members:
187 .Bd -literal -offset indent
188 int l_onoff /* indicates whether linger option is enabled */
189 int l_linger /* linger time, in seconds */
194 header defines the following macros:
200 .It Dv SOCK_SEQPACKET
201 Sequenced-packet socket
206 header defines the following macros for use as the
214 Options to be accessed at the socket level, not the protocol level.
216 Options to be accessed at the routing socket level, not the protocol level.
221 header defines the following macros for use as the
230 Debugging information is being recorded.
232 Socket is accepting connections.
234 Transmission of broadcast messages is supported.
236 Reuse of local addresses is supported.
238 Connections are kept alive with periodic messages.
240 Socket lingers on close.
242 Out-of-band data is transmitted in line.
252 Request the reception of user credential ancillary data. This is a
253 Sun-specific, Evolving interface. See
256 Bypass zone boundaries (privileged).
261 header defines the following macros for use as the valid values for the
265 structure, or the flags parameter in
274 Control data truncated.
276 Terminates a record (if supported by the protocol).
280 Leave received data in queue.
282 Normal data truncated.
284 Wait for complete message.
286 Do not generate the SIGPIPE signal.
291 header defines the following macros:
296 Internet domain sockets
301 header defines the following macros:
304 Disables further receive operations.
306 Disables further send operations.
308 Disables further send and receive operations.
312 .Xr getpeerucred 3C ,
316 .Xr connect 3SOCKET ,
317 .Xr getpeername 3SOCKET ,
318 .Xr getsockname 3SOCKET ,
319 .Xr getsockopt 3SOCKET ,
322 .Xr recvfrom 3SOCKET ,
323 .Xr recvmsg 3SOCKET ,
325 .Xr sendmsg 3SOCKET ,
327 .Xr setsockopt 3SOCKET ,
328 .Xr shutdown 3SOCKET ,
329 .Xr sockaddr 3SOCKET ,
331 .Xr socketpair 3SOCKET ,
335 .Xr getpeername 3XNET ,
336 .Xr getsockname 3XNET ,
337 .Xr getsockopt 3XNET ,
345 .Xr setsockopt 3XNET ,
347 .Xr socketpair 3XNET ,