Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4578 → Rev 4704

/branches/network/uspace/srv/net/include/netdb.h
63,13 → 63,45
#define h_addr h_addr_list[ 0 ]
};
 
#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */
#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
#define NO_DATA 4 /* Valid name, no data record of requested type */
#define NO_ADDRESS NO_DATA /* no address, look for MX record */
/** @name Host entry address types definitions.
*/
/*@{*/
 
/** Authoritative Answer Host not found address type.
*/
#define HOST_NOT_FOUND 1
 
/** Non-Authoritive Host not found, or SERVERFAIL address type.
*/
#define TRY_AGAIN 2
 
/** Non recoverable errors, FORMERR, REFUSED, NOTIMP address type.
*/
#define NO_RECOVERY 3
 
/** Valid name, no data record of requested type address type.
*/
#define NO_DATA 4
 
/** No address, look for MX record address type.
*/
#define NO_ADDRESS NO_DATA
 
/*@}*/
 
/** Returns host entry by the host address.
* \todo address type?
* @param address The host address. Input parameter.
* @param len The address length. Input parameter.
* @param type The address type. Input parameter.
* @returns Host entry information.
*/
struct hostent * gethostbyaddr( const void * address, int len, int type );
 
/** Returns host entry by the host name.
* @param name The host name. Input parameter.
* @returns Host entry information.
*/
struct hostent * gethostbyname( const char * name );
 
#endif