h_errno

The h_errno variable returns the last name resolution error that occurred in the current thread.

Syntax

#include <netdb.h>
int h_errno

Description

The h_errno variable returns the last name resolution error that occurred in the current thread. These error codes are set by gethostname(), res_send(), res_query(), res_querydomain(), and res_search().

Return Values

The value -1 indicates an error code is unavailable. A non-zero, non-negative returned value is the TCP/IP error code.

Error Code

HOST _ NOT _ FOUND TRY _ AGAIN NO _ RECOVERY NO _ DATA NO _ ADDRESS

Related Calls


[Back: _getshort()]
[Next: htonl()]