netdb.h File Reference

API published in:
API deprecated in:


#include <sys/_types.h>
#include <sys/cdefs.h>

Go to the source code of this file.


Data Structures

struct  hostent
struct  netent
struct  servent
struct  protoent
struct  addrinfo

Defines

#define _PATH_HEQUIV   "/etc/hosts.equiv"
#define _PATH_HOSTS   "/etc/hosts"
#define _PATH_NETWORKS   "/etc/networks"
#define _PATH_PROTOCOLS   "/etc/protocols"
#define _PATH_SERVICES   "/etc/services"
#define h_errno   (*__h_error())
#define h_addr   h_addr_list[0]
#define NETDB_INTERNAL   -1
#define NETDB_SUCCESS   0
#define HOST_NOT_FOUND   1
#define TRY_AGAIN   2
#define NO_RECOVERY   3
#define NO_DATA   4
#define NO_ADDRESS   NO_DATA
#define EAI_AGAIN   2
#define EAI_BADFLAGS   3
#define EAI_FAIL   4
#define EAI_FAMILY   5
#define EAI_MEMORY   6
#define EAI_NONAME   8
#define EAI_SERVICE   9
#define EAI_SOCKTYPE   10
#define EAI_SYSTEM   11
#define EAI_BADHINTS   12
#define EAI_PROTOCOL   13
#define EAI_MAX   14
#define AI_PASSIVE   0x00000001
#define AI_CANONNAME   0x00000002
#define AI_NUMERICHOST   0x00000004
#define AI_NUMERICSERV   0x00000008
#define AI_MASK
#define AI_ALL   0x00000100
#define AI_V4MAPPED_CFG   0x00000200
#define AI_ADDRCONFIG   0x00000400
#define AI_V4MAPPED   0x00000800
#define AI_DEFAULT   (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
#define NI_MAXHOST   1025
#define NI_MAXSERV   32
#define NI_NOFQDN   0x00000001
#define NI_NUMERICHOST   0x00000002
#define NI_NAMEREQD   0x00000004
#define NI_NUMERICSERV   0x00000008
#define NI_DGRAM   0x00000010
#define SCOPE_DELIMITER   '%'

Typedefs

typedef __size_t size_t
typedef __socklen_t socklen_t
typedef __uint32_t uint32_t

Functions

__BEGIN_DECLS void endhostent (void)
void endnetent (void)
void endnetgrent (void)
void endprotoent (void)
IMPORT_C void endservent (void)
void freehostent (struct hostent *)
IMPORT_C struct hostentgethostbyaddr (const char *, int, int)
IMPORT_C struct hostentgethostbyname (const char *)
hostentgethostbyname2 (const char *, int)
hostentgethostent (void)
hostentgetipnodebyaddr (const void *, size_t, int, int *)
hostentgetipnodebyname (const char *, int, int, int *)
netentgetnetbyaddr (uint32_t, int)
netentgetnetbyname (const char *)
netentgetnetent (void)
int getnetgrent (char **, char **, char **)
IMPORT_C struct protoentgetprotobyname (const char *)
IMPORT_C struct protoentgetprotobynumber (int)
protoentgetprotoent (void)
IMPORT_C struct serventgetservbyname (const char *, const char *)
IMPORT_C struct serventgetservbyport (int, const char *)
IMPORT_C struct serventgetservent (void)
void herror (const char *)
__const char * hstrerror (int)
int innetgr (const char *, const char *, const char *, const char *)
void sethostent (int)
void setnetent (int)
void setprotoent (int)
IMPORT_C int getaddrinfo (const char *, const char *, const struct addrinfo *, struct addrinfo **)
IMPORT_C int getnameinfo (const struct sockaddr *, socklen_t, char *, size_t, char *, size_t, int)
IMPORT_C void freeaddrinfo (struct addrinfo *)
IMPORT_C const char * gai_strerror (int)
void setnetgrent (const char *)
IMPORT_C void setservent (int)
int * __h_error (void)

Define Documentation

#define _PATH_HEQUIV   "/etc/hosts.equiv"
 
#define _PATH_HOSTS   "/etc/hosts"
 
#define _PATH_NETWORKS   "/etc/networks"
 
#define _PATH_PROTOCOLS   "/etc/protocols"
 
#define _PATH_SERVICES   "/etc/services"
 
#define AI_ADDRCONFIG   0x00000400
 
#define AI_ALL   0x00000100
 
#define AI_CANONNAME   0x00000002
 
#define AI_DEFAULT   (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
 
#define AI_MASK
 

Value:

#define AI_NUMERICHOST   0x00000004
 
#define AI_NUMERICSERV   0x00000008
 
#define AI_PASSIVE   0x00000001
 
#define AI_V4MAPPED   0x00000800
 
#define AI_V4MAPPED_CFG   0x00000200
 
#define EAI_AGAIN   2
 
#define EAI_BADFLAGS   3
 
#define EAI_BADHINTS   12
 
#define EAI_FAIL   4
 
#define EAI_FAMILY   5
 
#define EAI_MAX   14
 
#define EAI_MEMORY   6
 
#define EAI_NONAME   8
 
#define EAI_PROTOCOL   13
 
#define EAI_SERVICE   9
 
#define EAI_SOCKTYPE   10
 
#define EAI_SYSTEM   11
 
#define h_addr   h_addr_list[0]
 
#define h_errno   (*__h_error())
 
#define HOST_NOT_FOUND   1
 
#define NETDB_INTERNAL   -1
 
#define NETDB_SUCCESS   0
 
#define NI_DGRAM   0x00000010
 
#define NI_MAXHOST   1025
 
#define NI_MAXSERV   32
 
#define NI_NAMEREQD   0x00000004
 
#define NI_NOFQDN   0x00000001
 
#define NI_NUMERICHOST   0x00000002
 
#define NI_NUMERICSERV   0x00000008
 
#define NO_ADDRESS   NO_DATA
 
#define NO_DATA   4
 
#define NO_RECOVERY   3
 
#define SCOPE_DELIMITER   '%'
 
#define TRY_AGAIN   2
 

Typedef Documentation

typedef __size_t size_t
 
typedef __socklen_t socklen_t
 
typedef __uint32_t uint32_t
 

Function Documentation

int* __h_error void   ) 
 
__BEGIN_DECLS void endhostent void   ) 
 
void endnetent void   ) 
 
void endnetgrent void   ) 
 
void endprotoent void   ) 
 
IMPORT_C void endservent void   ) 
 
IMPORT_C void freeaddrinfo struct addrinfo  ) 
 
void freehostent struct hostent  ) 
 
IMPORT_C const char* gai_strerror int   ) 
 
IMPORT_C int getaddrinfo const char * ,
const char * ,
const struct addrinfo,
struct addrinfo ** 
 
IMPORT_C struct hostent* gethostbyaddr const char * ,
int ,
int 
 
IMPORT_C struct hostent* gethostbyname const char *   ) 
 
struct hostent* gethostbyname2 const char * ,
int 
 
struct hostent* gethostent void   ) 
 
struct hostent* getipnodebyaddr const void * ,
size_t ,
int ,
int * 
 
struct hostent* getipnodebyname const char * ,
int ,
int ,
int * 
 
IMPORT_C int getnameinfo const struct sockaddr,
socklen_t ,
char * ,
size_t ,
char * ,
size_t ,
int 
 
struct netent* getnetbyaddr uint32_t ,
int 
 
struct netent* getnetbyname const char *   ) 
 
struct netent* getnetent void   ) 
 
int getnetgrent char ** ,
char ** ,
char ** 
 
IMPORT_C struct protoent* getprotobyname const char *   ) 
 
IMPORT_C struct protoent* getprotobynumber int   ) 
 
struct protoent* getprotoent void   ) 
 
IMPORT_C struct servent* getservbyname const char * ,
const char * 
 
IMPORT_C struct servent* getservbyport int ,
const char * 
 
IMPORT_C struct servent* getservent void   ) 
 
void herror const char *   ) 
 
__const char* hstrerror int   ) 
 
int innetgr const char * ,
const char * ,
const char * ,
const char * 
 
void sethostent int   ) 
 
void setnetent int   ) 
 
void setnetgrent const char *   ) 
 
void setprotoent int   ) 
 
IMPORT_C void setservent int   ) 
 

Copyright © Nokia Corporation 2001-2008
Back to top