netdb

netdb

Functions

void endhostent ()
void endnetent ()
void endprotoent ()
void endservent ()
void freeaddrinfo ()
const char * gai_strerror ()
int getaddrinfo ()
struct hostent * gethostbyaddr ()
struct hostent * gethostbyname ()
int getnameinfo ()
struct netent * getnetbyaddr ()
struct netent * getnetbyname ()
struct netent * getnetent ()
struct protoent * getprotobyname ()
struct protoent * getprotobynumber ()
struct protoent * getprotoent ()
struct servent * getservbyname ()
struct servent * getservbyport ()
struct servent * getservent ()
struct hostent * gethostent ()
char * hstrerror ()
void sethostent ()
void setnetent ()
void setprotoent ()
void setservent ()

Types and Values

#define addrinfo
#define hostent
#define netent
#define protoent
#define servent
#define HOST_NOT_FOUND
#define NO_DATA
#define NO_RECOVERY
#define TRY_AGAIN
#define AI_NUMERICHOST
#define AI_NUMERICSERV
#define AI_PASSIVE
#define EAI_AGAIN
#define EAI_BADFLAGS
#define EAI_FAIL
#define EAI_FAMILY
#define EAI_MEMORY
#define EAI_NONAME
#define EAI_OVERFLOW
#define EAI_SERVICE
#define EAI_SOCKTYPE
#define EAI_SYSTEM
#define NI_NOFQDN
#define NI_NUMERICHOST
#define NI_NAMEREQD
#define NI_NUMERICSERV
#define NI_NUMERICSCOPE
#define NI_DGRAM
extern int h_errno

Description

Functions

endhostent ()

void
endhostent (void);

endnetent ()

void
endnetent (void);

endprotoent ()

void
endprotoent (void);

endservent ()

void
endservent (void);

freeaddrinfo ()

void
freeaddrinfo (struct addrinfo *ai);

gai_strerror ()

const char *
gai_strerror (int ecode);

getaddrinfo ()

int
getaddrinfo (char const *nodename,
             char const *servname,
             struct addrinfo const *hints,
             struct addrinfo **res);

gethostbyaddr ()

struct hostent *
gethostbyaddr (const void *addr,
               socklen_t len,
               int type);

gethostbyname ()

struct hostent *
gethostbyname (const char *name);

getnameinfo ()

int
getnameinfo (const struct sockaddr *sa,
             socklen_t salen,
             char *node,
             socklen_t nodelen,
             char *service,
             socklen_t servicelen,
             int flags);

getnetbyaddr ()

struct netent *
getnetbyaddr (uint32_t net,
              int type);

getnetbyname ()

struct netent *
getnetbyname (const char *name);

getnetent ()

struct netent *
getnetent (void);

getprotobyname ()

struct protoent *
getprotobyname (const char *name);

getprotobynumber ()

struct protoent *
getprotobynumber (int proto);

getprotoent ()

struct protoent *
getprotoent (void);

getservbyname ()

struct servent *
getservbyname (const char *name,
               const char *protocol);

getservbyport ()

struct servent *
getservbyport (int port,
               const char *protocol);

getservent ()

struct servent *
getservent (void);

gethostent ()

struct hostent *
gethostent (void);

hstrerror ()

char *
hstrerror (int errnum);

sethostent ()

void
sethostent (int stayopen);

setnetent ()

void
setnetent (int stayopen);

setprotoent ()

void
setprotoent (int stayopen);

setservent ()

void
setservent (int stayopen);

Types and Values

addrinfo

#  define addrinfo addrinfo

hostent

#  define hostent hostent

netent

#  define netent netent

protoent

#  define protoent protoent

servent

#  define servent servent

HOST_NOT_FOUND

# define HOST_NOT_FOUND			1

NO_DATA

# define NO_DATA			2

NO_RECOVERY

# define NO_RECOVERY			3

TRY_AGAIN

# define TRY_AGAIN			4

AI_NUMERICHOST

# define AI_NUMERICHOST			0x01

AI_NUMERICSERV

# define AI_NUMERICSERV			0x02

AI_PASSIVE

# define AI_PASSIVE			0x04

EAI_AGAIN

# define EAI_AGAIN			1

EAI_BADFLAGS

# define EAI_BADFLAGS			2

EAI_FAIL

# define EAI_FAIL			3

EAI_FAMILY

# define EAI_FAMILY			4

EAI_MEMORY

# define EAI_MEMORY			5

EAI_NONAME

# define EAI_NONAME			6

EAI_OVERFLOW

# define EAI_OVERFLOW			7

EAI_SERVICE

# define EAI_SERVICE			8

EAI_SOCKTYPE

# define EAI_SOCKTYPE			9

EAI_SYSTEM

# define EAI_SYSTEM			10

NI_NOFQDN

# define NI_NOFQDN			0x01

NI_NUMERICHOST

# define NI_NUMERICHOST			0x02

NI_NAMEREQD

# define NI_NAMEREQD			0x04

NI_NUMERICSERV

# define NI_NUMERICSERV			0x08

NI_NUMERICSCOPE

# define NI_NUMERICSCOPE		0x10

NI_DGRAM

# define NI_DGRAM			0x20

h_errno

extern int h_errno;