Headers netdb.h(3HEAD)
NAME
netdb.h, netdb - definitions for network database operations
SYNOPSIS
#include
DESCRIPTION
The header defines the type inportt and the type
inaddrt as described in in.h(3HEAD).
The header defines the hostent structure that
includes the following members:
char *hname /* official name of the host */
char **haliases /* pointer to an array of pointers to
alternative host names, terminated
by a null pointer */
int haddrtype /* address type */
int hlength /* length, in bytes, of the address */
char **haddrlist /* pointer to an array of pointers to
network addresses (in network byte
order)for the host, terminated by a
null pointer */
The header defines the netent structure that
includes the following members:
char *nname /* official, fully-qualified */
(including the domain) name
of the network */
char **naliases /* pointer to an array of pointers to
alternative network names, terminated */
by a null pointer */
int naddrtype /* the address type of the network */
inaddrt nnet /* the network number, in host byte order */
The header defines the protoent structure that
includes the following members:
char *pname /* official name of the protocol */
char **paliases /* pointer to an array of pointers to
alternative protocol names, terminated
by a null pointer */
int pproto /* protocol number */
SunOS 5.11 Last change: 10 Sep 2004 1
Headers netdb.h(3HEAD)
The header defines the servent structure that
includes the following members:
char *sname /* oficial name of the service */
char **saliases /* pointer to an array of pointers to
alternativeservice names, terminated by
a null pointer */
int sport /* port number at which the service
resides, in network byte order */
char *sproto /* name of the protocol to use when
contacting the service */
The header defines the macro IPORTRESERVED with
the value of the highest reserved Internet port number.
The header provides a declaration for herrno:
extern int herrno;
The header defines the following macros for use as
error values for gethostbyaddr() and gethostbyname():
HOSTNOTFOUND NODATA
NORECOVERY TRYAGAIN
Inclusion of the header may also make visible all
symbols from in.h(3HEAD).
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Standard
SEE ALSO
SunOS 5.11 Last change: 10 Sep 2004 2
Headers netdb.h(3HEAD)
Intro(3), endhostent(3NSL), endhostent(3XNET),
endnetent(3SOCKET), endnetent(3XNET), endprotoent(3SOCKET),
endprotoent(3XNET), endservent(3SOCKET), endservent(3XNET),
in.h(3HEAD), attributes(5), standards(5)
SunOS 5.11 Last change: 10 Sep 2004 3
|