include/netdb.h File Reference

Go to the source code of this file.

Data Structures

struct  hostent
 Resolver host structure. More...

Defines

#define _ABLE_CLIB_NETDB_H   1
#define NETDB_INTERNAL   -1
 Value for h_errno meaning internal error, see errno.
#define NETDB_SUCCESS   0
 Value for h_errno meaning success.
#define HOST_NOT_FOUND   1
 Value for h_errno meaning 'host not found'.
#define TRY_AGAIN   2
 Value for h_errno meaning 'non-authoritative failure'.
#define NO_RECOVERY   3
 Value for h_errno meaning 'unrecoverable error'.
#define NO_DATA   4
 Value for h_errno meaning 'no data of requested type found'.
#define NO_ADDRESS   NO_DATA
#define h_addr   h_addr_list[0]
#define sethostent(stayopen)
#define endhostent()

Functions

struct hostentgethostbyname (const char *name)
 Look up a host by name and return a hostent structure.
struct hostentgethostbyaddr (const void *addr, socklen_t len, int type)
 Look up a host by address and return a hostent structure.
void herror (const char *s)
 Print the error in h_errno to stderr.
const char * hstrerror (int err)
 Return a pointer to a static string representing err.

Variables

int h_errno
 Equivalent of errno for gethostbyname etc.


Define Documentation

#define _ABLE_CLIB_NETDB_H   1

 
#define endhostent (  ) 

#define h_addr   h_addr_list[0]

#define HOST_NOT_FOUND   1

Value for h_errno meaning 'host not found'.

#define NETDB_INTERNAL   -1

Value for h_errno meaning internal error, see errno.

#define NETDB_SUCCESS   0

Value for h_errno meaning success.

#define NO_ADDRESS   NO_DATA

See also:
NO_DATA

#define NO_DATA   4

Value for h_errno meaning 'no data of requested type found'.

#define NO_RECOVERY   3

Value for h_errno meaning 'unrecoverable error'.

#define sethostent ( stayopen   ) 

#define TRY_AGAIN   2

Value for h_errno meaning 'non-authoritative failure'.


Function Documentation

struct hostent* gethostbyaddr ( const void *  addr,
socklen_t  len,
int  type 
) [read]

Look up a host by address and return a hostent structure.

Parameters:
addr The address to look up.
len The length of the address to look up.
type The type (E.g. AF_INET) of the address to look up.
Returns:
A pointer to a static host structure which will remain valid only until the next call to this or gethostbyname.

struct hostent* gethostbyname ( const char *  name  )  [read]

Look up a host by name and return a hostent structure.

Parameters:
name The DNS name to lookup.
Returns:
A pointer to a static host structure which will remain valid only until the next call to this or gethostbyaddr.

void herror ( const char *  s  ) 

Print the error in h_errno to stderr.

const char* hstrerror ( int  err  ) 

Return a pointer to a static string representing err.


Variable Documentation

int h_errno

Equivalent of errno for gethostbyname etc.


Generated on Tue Jan 20 14:28:56 2009 for ABLE LIBC by  doxygen 1.5.6