inet.4p (bbf215553c7233fbab8a0afdf1fac74c44781867) inet.4p (10d41d991988b6dfe2f102d139fb64152e1614ce)
1'\" te
2.\" Copyright 1989 AT&T
3.\" Copyright (C) 2000, Sun Microsystems, Inc. All Rights Reserved
4.\" 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.\" 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.\" 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 INET 4P "Aug 3, 2000"
8.SH NAME
9inet \- Internet protocol family
10.SH SYNOPSIS
1'\" te
2.\" Copyright 1989 AT&T
3.\" Copyright (C) 2000, Sun Microsystems, Inc. All Rights Reserved
4.\" 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.\" 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.\" 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 INET 4P "Aug 3, 2000"
8.SH NAME
9inet \- Internet protocol family
10.SH SYNOPSIS
11.LP
12.nf
13\fB#include <sys/types.h>\fR
14.fi
15
16.LP
17.nf
18\fB#include <netinet/in.h>\fR
19.fi
20
21.SH DESCRIPTION
11.nf
12\fB#include <sys/types.h>\fR
13.fi
14
15.LP
16.nf
17\fB#include <netinet/in.h>\fR
18.fi
19
20.SH DESCRIPTION
22.LP
23The Internet protocol family implements a collection of protocols which are
24centered around the Internet Protocol ("\fBIP\fR") and which share a common
25address format. The Internet family protocols can be accessed using the socket
26interface, where they support the \fBSOCK_STREAM\fR, \fBSOCK_DGRAM\fR, and
27\fBSOCK_RAW\fR socket types, or the Transport Level Interface (TLI), where they
28support the connectionless (\fBT_CLTS\fR) and connection oriented
29(\fBT_COTS_ORD\fR) service types.
30.SH PROTOCOLS
21The Internet protocol family implements a collection of protocols which are
22centered around the Internet Protocol ("\fBIP\fR") and which share a common
23address format. The Internet family protocols can be accessed using the socket
24interface, where they support the \fBSOCK_STREAM\fR, \fBSOCK_DGRAM\fR, and
25\fBSOCK_RAW\fR socket types, or the Transport Level Interface (TLI), where they
26support the connectionless (\fBT_CLTS\fR) and connection oriented
27(\fBT_COTS_ORD\fR) service types.
28.SH PROTOCOLS
31.LP
32The Internet protocol family is comprised of the Internet Protocol
33("\fBIP\fR"), the Address Resolution Protocol ("\fBARP\fR"), the Internet
34Control Message Protocol ("\fBICMP\fR"), the Transmission Control Protocol
35("\fBTCP\fR"), and the User Datagram Protocol ("\fBUDP\fR").
36.sp
37.LP
38\fBTCP\fR supports the socket interface's \fBSOCK_STREAM\fR abstraction and
39\fBTLI\fR's \fBT_COTS_ORD\fR service type. \fBUDP\fR supports the

--- 36 unchanged lines hidden (view full) ---

76.na
77\fB\fBSIOCGIFNETMASK\fR\fR
78.ad
79.RS 18n
80Get interface network mask.
81.RE
82
83.SH ADDRESSING
29The Internet protocol family is comprised of the Internet Protocol
30("\fBIP\fR"), the Address Resolution Protocol ("\fBARP\fR"), the Internet
31Control Message Protocol ("\fBICMP\fR"), the Transmission Control Protocol
32("\fBTCP\fR"), and the User Datagram Protocol ("\fBUDP\fR").
33.sp
34.LP
35\fBTCP\fR supports the socket interface's \fBSOCK_STREAM\fR abstraction and
36\fBTLI\fR's \fBT_COTS_ORD\fR service type. \fBUDP\fR supports the

--- 36 unchanged lines hidden (view full) ---

73.na
74\fB\fBSIOCGIFNETMASK\fR\fR
75.ad
76.RS 18n
77Get interface network mask.
78.RE
79
80.SH ADDRESSING
84.LP
85\fBIP\fR addresses are four byte quantities, stored in network byte order.
86\fBIP\fR addresses should be manipulated using the byte order conversion
87routines. See \fBbyteorder\fR(3C).
88.sp
89.LP
90Addresses in the Internet protocol family use the \fBsockaddr_in\fR structure,
91which has that following members:
92.sp

--- 4 unchanged lines hidden (view full) ---

97struct in_addr sin_addr;
98char sin_zero[8];
99.fi
100.in -2
101
102.sp
103.LP
104Library routines are provided to manipulate structures of this form; See
81\fBIP\fR addresses are four byte quantities, stored in network byte order.
82\fBIP\fR addresses should be manipulated using the byte order conversion
83routines. See \fBbyteorder\fR(3C).
84.sp
85.LP
86Addresses in the Internet protocol family use the \fBsockaddr_in\fR structure,
87which has that following members:
88.sp

--- 4 unchanged lines hidden (view full) ---

93struct in_addr sin_addr;
94char sin_zero[8];
95.fi
96.in -2
97
98.sp
99.LP
100Library routines are provided to manipulate structures of this form; See
105\fBinet\fR(3SOCKET).
101\fBinet\fR(3C).
106.sp
107.LP
108The \fBsin_addr\fR field of the \fBsockaddr_in\fR structure specifies a local
109or remote \fBIP\fR address. Each network interface has its own unique \fBIP\fR
110address. The special value \fBINADDR_ANY\fR may be used in this field to
111effect "wildcard" matching. Given in a \fBbind\fR(3SOCKET) call, this value
112leaves the local \fBIP\fR address of the socket unspecified, so that the socket
113will receive connections or messages directed at any of the valid \fBIP\fR

--- 33 unchanged lines hidden (view full) ---

147restriction by setting the \fBSO_REUSEADDR\fR socket option with
148\fBsetsockopt\fR (see \fBgetsockopt\fR(3SOCKET)).
149.sp
150.LP
151\fBTLI\fR applies somewhat different semantics to the binding of local port
152numbers. These semantics apply when Internet family protocols are used using
153the \fBTLI\fR.
154.SH SEE ALSO
102.sp
103.LP
104The \fBsin_addr\fR field of the \fBsockaddr_in\fR structure specifies a local
105or remote \fBIP\fR address. Each network interface has its own unique \fBIP\fR
106address. The special value \fBINADDR_ANY\fR may be used in this field to
107effect "wildcard" matching. Given in a \fBbind\fR(3SOCKET) call, this value
108leaves the local \fBIP\fR address of the socket unspecified, so that the socket
109will receive connections or messages directed at any of the valid \fBIP\fR

--- 33 unchanged lines hidden (view full) ---

143restriction by setting the \fBSO_REUSEADDR\fR socket option with
144\fBsetsockopt\fR (see \fBgetsockopt\fR(3SOCKET)).
145.sp
146.LP
147\fBTLI\fR applies somewhat different semantics to the binding of local port
148numbers. These semantics apply when Internet family protocols are used using
149the \fBTLI\fR.
150.SH SEE ALSO
155.LP
156.BR ioctl (2),
157.BR byteorder (3C),
158.BR gethostbyname (3NSL),
159.BR bind (3SOCKET),
160.BR connect (3SOCKET),
161.BR getnetbyname (3SOCKET),
162.BR getprotobyname (3SOCKET),
163.BR getservbyname (3SOCKET),

--- 6 unchanged lines hidden (view full) ---

170.BR ip (4P),
171.BR tcp (4P),
172.BR udp (4P)
173.sp
174.LP
175Network Information Center, \fIDDN Protocol Handbook\fR (3 vols.), Network
176Information Center, \fBSRI\fR International, Menlo Park, Calif., 1985.
177.SH NOTES
151.BR ioctl (2),
152.BR byteorder (3C),
153.BR gethostbyname (3NSL),
154.BR bind (3SOCKET),
155.BR connect (3SOCKET),
156.BR getnetbyname (3SOCKET),
157.BR getprotobyname (3SOCKET),
158.BR getservbyname (3SOCKET),

--- 6 unchanged lines hidden (view full) ---

165.BR ip (4P),
166.BR tcp (4P),
167.BR udp (4P)
168.sp
169.LP
170Network Information Center, \fIDDN Protocol Handbook\fR (3 vols.), Network
171Information Center, \fBSRI\fR International, Menlo Park, Calif., 1985.
172.SH NOTES
178.LP
179The Internet protocol support is subject to change as the Internet protocols
180develop. Users should not depend on details of the current implementation, but
181rather the services exported.
173The Internet protocol support is subject to change as the Internet protocols
174develop. Users should not depend on details of the current implementation, but
175rather the services exported.