9103 opengroup acknowledgement should be properly formatted in man pages
[unleashed.git] / usr / src / man / man3head / netdb.h.3head
blob4c8545f53386ce9ff5a306cf47e7526cb16e875e
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
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document.  The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
30 .\"
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
35 .\"
36 .\" When distributing Covered Code, include this CDDL HEADER in each
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) 2004, Sun Microsystems, Inc.  All Rights Reserved.
45 .\"
46 .TH NETDB.H 3HEAD "Sep 10, 2004"
47 .SH NAME
48 netdb.h, netdb \- definitions for network database operations
49 .SH SYNOPSIS
50 .LP
51 .nf
52 \fB#include <netdb.h>\fR
53 .fi
55 .SH DESCRIPTION
56 .sp
57 .LP
58 The <\fBnetdb.h\fR> header defines the type \fBin_port_t\fR and the type
59 \fBin_addr_t\fR as described in \fBin.h\fR(3HEAD).
60 .sp
61 .LP
62 The <\fBnetdb.h\fR> header defines the \fBhostent\fR structure that includes
63 the following members:
64 .sp
65 .in +2
66 .nf
67 char *h_name          /* official name of the host */
68 char **h_aliases      /* pointer to an array of pointers to
69                          alternative host names, terminated
70                          by a null pointer */
71 int  h_addrtype       /* address type */
72 int  h_length         /* length, in bytes, of the address */
73 char **h_addr_list    /* pointer to an array of pointers to
74                          network addresses (in network byte
75                          order)for the host, terminated by a
76                          null pointer */
77 .fi
78 .in -2
80 .sp
81 .LP
82 The <\fBnetdb.h\fR> header defines the \fBnetent\fR structure that includes the
83 following members:
84 .sp
85 .in +2
86 .nf
87 char      *n_name     /* official, fully-qualified */
88                          (including the domain) name
89                          of the network */
90 char      **n_aliases /* pointer to an array of pointers to
91                          alternative network names, terminated */
92                          by a null pointer */
93 int       n_addrtype  /* the address type of the network */
94 in_addr_t n_net       /* the network number, in host byte order */
95 .fi
96 .in -2
98 .sp
99 .LP
100 The <\fBnetdb.h\fR> header defines the \fBprotoent\fR structure that includes
101 the following members:
103 .in +2
105 char *p_name         /* official name of the protocol */
106 char **p_aliases     /* pointer to an array of pointers to
107                         alternative protocol names, terminated
108                         by a null pointer */
109 int  p_proto         /* protocol number */
111 .in -2
115 The <\fBnetdb.h\fR> header defines the \fBservent\fR structure that includes
116 the following members:
118 .in +2
120 char *s_name         /* oficial name of the service */
121 char **s_aliases     /* pointer to an array of pointers to
122                         alternativeservice names, terminated by
123                         a null pointer */
124 int  s_port          /* port number at which the service
125                         resides, in network byte order */
126 char *s_proto        /* name of the protocol to use when
127                         contacting the service */
129 .in -2
133 The <\fBnetdb.h\fR> header defines the macro \fBIPPORT_RESERVED\fR with the
134 value of the highest reserved Internet port number.
137 The <\fBnetdb.h\fR> header provides a declaration for \fBh_errno\fR:
140 extern int h_errno;
143 The <\fBnetdb.h\fR> header defines the following macros for use as error values
144 for \fBgethostbyaddr()\fR and \fBgethostbyname()\fR:
149 l l
150 l l .
151 \fBHOST_NOT_FOUND\fR    \fBNO_DATA\fR
152 \fBNO_RECOVERY\fR       \fBTRY_AGAIN\fR
157 Inclusion of the <\fBnetdb.h\fR> header may also make visible all symbols from
158 \fBin.h\fR(3HEAD).
159 .SH ATTRIBUTES
162 See \fBattributes\fR(5) for descriptions of the following attributes:
167 box;
168 c | c
169 l | l .
170 ATTRIBUTE TYPE  ATTRIBUTE VALUE
172 Interface Stability     Standard
175 .SH SEE ALSO
178 \fBIntro\fR(3), \fBendhostent\fR(3NSL), \fBendhostent\fR(3XNET),
179 \fBendnetent\fR(3SOCKET), \fBendnetent\fR(3XNET), \fBendprotoent\fR(3SOCKET),
180 \fBendprotoent\fR(3XNET), \fBendservent\fR(3SOCKET), \fBendservent\fR(3XNET),
181 \fBin.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5)