8354 sync regcomp(3C) with upstream (fix make catalog)
[unleashed/tickless.git] / usr / src / man / man3head / inet.h.3head
blobf43af72a524b5dac18068be2131246c1b4c63304
1 '\" te
2 .\"  Copyright (c) 1992, X/Open Company Limited  All Rights Reserved  Portions Copyright (c) 2002, 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
4 .\" http://www.opengroup.org/bookstore/.
5 .\" 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 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 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.
6 .\"  This notice shall appear on any product containing this material.
7 .\" 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.
8 .\" 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.
9 .\" 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]
10 .TH INET.H 3HEAD "Aug 30, 2002"
11 .SH NAME
12 inet.h, inet \- definitions for internet operations
13 .SH SYNOPSIS
14 .LP
15 .nf
16 \fB#include <arpa/inet.h>\fR
17 .fi
19 .SH DESCRIPTION
20 .sp
21 .LP
22 The <\fBarpa/inet.h\fR> header defines the type \fBin_port_t\fR, the type
23 \fBin_addr_t\fR, and the \fBin_addr\fR structure, as described in
24 \fBin.h\fR(3HEAD).
25 .sp
26 .LP
27 Inclusion of the <\fBarpa/inet.h\fR> header may also make visible all symbols
28 from \fBin.h\fR(3HEAD).
29 .sp
30 .LP
31 The following are declared as functions, and may also be defined as macros:
32 .sp
33 .in +2
34 .nf
35 in_addr_t       inet_addr(const char *);
36 in_addr_t       inet_lnaof(struct in_addr);
37 struct in_addr  inet_makeaddr(in_addr_t, in_addr_t);
38 in_addr_t       inet_netof(struct in_addr);
39 in_addr_t       inet_network(const char *);
40 char            *inet_ntoa(struct in_addr);
41 .fi
42 .in -2
44 .SS "Default"
45 .sp
46 .LP
47 For applications that do not require standard-conforming behavior (those that
48 use the socket interfaces described in section 3N of the reference manual; see
49 \fBIntro\fR(3) and \fBstandards\fR(5)), the following may be declared as
50 functions, or defined as macros, or both:
51 .sp
52 .in +2
53 .nf
54 uint32_t    htonl(uint32_t);
55 uint16_t    htons(uint16_t);
56 uint32_t    ntohl(uint32_t);
57 uint16_t    ntohs(uint16_t);
58 .fi
59 .in -2
61 .SS "Standard conforming"
62 .sp
63 .LP
64 For applications that require standard-conforming behavior (those that use the
65 socket interfaces described in section 3XN of the reference manual; see
66 \fBIntro\fR(3) and \fBstandards\fR(5)), the following may be declared as
67 functions, or defined as macros, or both:
68 .sp
69 .in +2
70 .nf
71 in_addr_t    htonl(in_addr_t);
72 in_port_t    htons(in_port_t);
73 in_addr_t    ntohl(in_addr_t);
74 in_port_t    ntohs(in_port_t);
75 .fi
76 .in -2
78 .SH ATTRIBUTES
79 .sp
80 .LP
81 See \fBattributes\fR(5) for descriptions of the following attributes:
82 .sp
84 .sp
85 .TS
86 box;
87 c | c
88 l | l .
89 ATTRIBUTE TYPE  ATTRIBUTE VALUE
91 Interface Stability     Standard
92 .TE
94 .SH SEE ALSO
95 .sp
96 .LP
97 \fBIntro\fR(3), \fBhtonl\fR(3SOCKET), \fBhtonl\fR(3XNET),
98 \fBinet_addr\fR(3SOCKET), \fBinet_addr\fR(3XNET), \fBin.h\fR(3HEAD),
99 \fBattributes\fR(5), \fBstandards\fR(5)