8354 sync regcomp(3C) with upstream (fix make catalog)
[unleashed/tickless.git] / usr / src / man / man3head / netdb.h.3head
blob4e7f5706f5f1b1353f08ff9dcc3c76d17f089407
1 '\" te
2 .\" Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.  Portions Copyright (c) 2004, 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 NETDB.H 3HEAD "Sep 10, 2004"
11 .SH NAME
12 netdb.h, netdb \- definitions for network database operations
13 .SH SYNOPSIS
14 .LP
15 .nf
16 \fB#include <netdb.h>\fR
17 .fi
19 .SH DESCRIPTION
20 .sp
21 .LP
22 The <\fBnetdb.h\fR> header defines the type \fBin_port_t\fR and the type
23 \fBin_addr_t\fR as described in \fBin.h\fR(3HEAD).
24 .sp
25 .LP
26 The <\fBnetdb.h\fR> header defines the \fBhostent\fR structure that includes
27 the following members:
28 .sp
29 .in +2
30 .nf
31 char *h_name          /* official name of the host */
32 char **h_aliases      /* pointer to an array of pointers to
33                          alternative host names, terminated
34                          by a null pointer */
35 int  h_addrtype       /* address type */
36 int  h_length         /* length, in bytes, of the address */
37 char **h_addr_list    /* pointer to an array of pointers to
38                          network addresses (in network byte
39                          order)for the host, terminated by a
40                          null pointer */
41 .fi
42 .in -2
44 .sp
45 .LP
46 The <\fBnetdb.h\fR> header defines the \fBnetent\fR structure that includes the
47 following members:
48 .sp
49 .in +2
50 .nf
51 char      *n_name     /* official, fully-qualified */
52                          (including the domain) name
53                          of the network */
54 char      **n_aliases /* pointer to an array of pointers to
55                          alternative network names, terminated */
56                          by a null pointer */
57 int       n_addrtype  /* the address type of the network */
58 in_addr_t n_net       /* the network number, in host byte order */
59 .fi
60 .in -2
62 .sp
63 .LP
64 The <\fBnetdb.h\fR> header defines the \fBprotoent\fR structure that includes
65 the following members:
66 .sp
67 .in +2
68 .nf
69 char *p_name         /* official name of the protocol */
70 char **p_aliases     /* pointer to an array of pointers to
71                         alternative protocol names, terminated
72                         by a null pointer */
73 int  p_proto         /* protocol number */
74 .fi
75 .in -2
77 .sp
78 .LP
79 The <\fBnetdb.h\fR> header defines the \fBservent\fR structure that includes
80 the following members:
81 .sp
82 .in +2
83 .nf
84 char *s_name         /* oficial name of the service */
85 char **s_aliases     /* pointer to an array of pointers to
86                         alternativeservice names, terminated by
87                         a null pointer */
88 int  s_port          /* port number at which the service
89                         resides, in network byte order */
90 char *s_proto        /* name of the protocol to use when
91                         contacting the service */
92 .fi
93 .in -2
95 .sp
96 .LP
97 The <\fBnetdb.h\fR> header defines the macro \fBIPPORT_RESERVED\fR with the
98 value of the highest reserved Internet port number.
99 .sp
101 The <\fBnetdb.h\fR> header provides a declaration for \fBh_errno\fR:
104 extern int h_errno;
107 The <\fBnetdb.h\fR> header defines the following macros for use as error values
108 for \fBgethostbyaddr()\fR and \fBgethostbyname()\fR:
113 l l
114 l l .
115 \fBHOST_NOT_FOUND\fR    \fBNO_DATA\fR
116 \fBNO_RECOVERY\fR       \fBTRY_AGAIN\fR
121 Inclusion of the <\fBnetdb.h\fR> header may also make visible all symbols from
122 \fBin.h\fR(3HEAD).
123 .SH ATTRIBUTES
126 See \fBattributes\fR(5) for descriptions of the following attributes:
131 box;
132 c | c
133 l | l .
134 ATTRIBUTE TYPE  ATTRIBUTE VALUE
136 Interface Stability     Standard
139 .SH SEE ALSO
142 \fBIntro\fR(3), \fBendhostent\fR(3NSL), \fBendhostent\fR(3XNET),
143 \fBendnetent\fR(3SOCKET), \fBendnetent\fR(3XNET), \fBendprotoent\fR(3SOCKET),
144 \fBendprotoent\fR(3XNET), \fBendservent\fR(3SOCKET), \fBendservent\fR(3XNET),
145 \fBin.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5)