1netdb.h(3HEAD)                      Headers                     netdb.h(3HEAD)
2
3
4

NAME

6       netdb.h, netdb - definitions for network database operations
7

SYNOPSIS

9       #include <netdb.h>
10
11

DESCRIPTION

13       The  <netdb.h> header defines the type in_port_t and the type in_addr_t
14       as described in in.h(3HEAD).
15
16
17       The <netdb.h> header defines the hostent structure  that  includes  the
18       following members:
19
20         char *h_name          /* official name of the host */
21         char **h_aliases      /* pointer to an array of pointers to
22                                  alternative host names, terminated
23                                  by a null pointer */
24         int  h_addrtype       /* address type */
25         int  h_length         /* length, in bytes, of the address */
26         char **h_addr_list    /* pointer to an array of pointers to
27                                  network addresses (in network byte
28                                  order)for the host, terminated by a
29                                  null pointer */
30
31
32
33       The  <netdb.h>  header  defines  the netent structure that includes the
34       following members:
35
36         char      *n_name     /* official, fully-qualified */
37                                  (including the domain) name
38                                  of the network */
39         char      **n_aliases /* pointer to an array of pointers to
40                                  alternative network names, terminated */
41                                  by a null pointer */
42         int       n_addrtype  /* the address type of the network */
43         in_addr_t n_net       /* the network number, in host byte order */
44
45
46
47       The <netdb.h> header defines the protoent structure that  includes  the
48       following members:
49
50         char *p_name         /* official name of the protocol */
51         char **p_aliases     /* pointer to an array of pointers to
52                                 alternative protocol names, terminated
53                                 by a null pointer */
54         int  p_proto         /* protocol number */
55
56
57
58       The  <netdb.h>  header  defines the servent structure that includes the
59       following members:
60
61         char *s_name         /* oficial name of the service */
62         char **s_aliases     /* pointer to an array of pointers to
63                                 alternativeservice names, terminated by
64                                 a null pointer */
65         int  s_port          /* port number at which the service
66                                 resides, in network byte order */
67         char *s_proto        /* name of the protocol to use when
68                                 contacting the service */
69
70
71
72       The <netdb.h> header defines the macro IPPORT_RESERVED with  the  value
73       of the highest reserved Internet port number.
74
75
76       The <netdb.h> header provides a declaration for h_errno:
77
78
79       extern int h_errno;
80
81
82       The <netdb.h> header defines the following macros for use as error val‐
83       ues for gethostbyaddr() and gethostbyname():
84
85
86
87
88       HOST_NOT_FOUND      NO_DATA
89       NO_RECOVERY         TRY_AGAIN
90
91
92
93       Inclusion of the <netdb.h> header may also  make  visible  all  symbols
94       from in.h(3HEAD).
95

ATTRIBUTES

97       See attributes(5) for descriptions of the following attributes:
98
99
100
101
102       ┌─────────────────────────────┬─────────────────────────────┐
103       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
104       ├─────────────────────────────┼─────────────────────────────┤
105       │Interface Stability          │Standard                     │
106       └─────────────────────────────┴─────────────────────────────┘
107

SEE ALSO

109       Intro(3), endhostent(3NSL), endhostent(3XNET), endnetent(3SOCKET), end‐
110       netent(3XNET),   endprotoent(3SOCKET),   endprotoent(3XNET),    endser‐
111       vent(3SOCKET),  endservent(3XNET),  in.h(3HEAD),  attributes(5),  stan‐
112       dards(5)
113
114
115
116SunOS 5.11                        10 Sep 2004                   netdb.h(3HEAD)
Impressum