herror()

print the message associated with the value of h_errno to standard error

Synopsis:

#include <netdb.h>

void herror( const char *prefix );

Description:

The herror() function prints the message corresponding to the error number contained in h_errno to stderr. The h_errno variable can be set by the following functions:

If the prefix string is non-NULL, it's printed, followed by a colon and a space. The error message is printed with a trailing newline. One of the following messages could be printed:

HOST_NOT_FOUND
No such host is known.
NO_DATA
The name is known to the name server, but has no IP address associated with it-this isn't a temporary error. Another type of request to the name server using this domain name will result in an answer (e.g. a mail-forwarder may be registered for this domain).
NO_RECOVERY
Some unexpected server failure was encountered. This is a nonrecoverable error.
TRY_AGAIN
This is usually a temporary error and means that the local server didn't receive a response from an authoritative server. A retry at some later time may succeed.

Classification:

UNIX

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

gethostbyaddr(), gethostbyname(), res_query(), res_search()