HP-UX Reference (11i v2 03/08) - 3 Library Functions N-Z (vol 7)
r
resolver(3N) resolver(3N)
dn_comp() Compresses the domain name exp_dn and stores it in comp_dn. The size of the
compressed name is returned or −1 if there were errors. length is the size of the
array pointed to by comp_dn. The compression uses an array of pointers dnptrs to
previously compressed names in the current message. The first pointer points to to
the beginning of the message and the list ends with NULL. The limit to the array is
specified by lastdnptr . A side effect of
dn_comp() is to update the list of pointers
for labels inserted into the message as the name is compressed. If dnptr is NULL,
names are not compressed. If lastdnptr is NULL, the list of labels is not updated.
dn_expand() Expands the compressed domain name comp_dn to a full domain name. The
compressed name is contained in a query or reply message; msg is a pointer to the
beginning of the message. The uncompressed name is placed in the buffer indicated
by exp_dn which is of size length. The size of compressed name is returned or −1if
there was an error.
Obsolescent Routine
herror() herror() supports existing applications to print an error message describing
a failure. ANSI applications must specify the following definition for
her-
ror():
void herror(const char *);
The argument string s is printed first, followed by a colon, a blank, the mes-
sage, and a new-line. herror() may be removed in future releases.
RETURN VALUE
Error return status from
res_search() is indicated by a return value of −1. The external integer
h_errno can then be checked to see whether this is a temporary failure or an invalid or unknown host.
In a multithreaded application using kernel thread, a thread specific
h_errno is allocated for each
thread.
ERRORS
h_errno can have the following values:
HOST_NOT_FOUND No such host is known.
TRY_AGAIN This is usually a temporary error and means that the local server did not
receive a response from an authoritative server. A retry at some later time
may succeed.
NO_RECOVERY Some unexpected server failure was encountered. This is a non-recoverable
error.
NO_DATA The name is known to the name server, but there is no data of the requested
type associated with this name; this is not a temporary error. Another type of
request to the name server using this domain name will result in an answer.
WARNINGS
The
_res.options field should be modified only by using set_resfield() call, and should not be
manipulated directly. h_errno is referenced as an extern int for non-threaded applications and is
defined as function call macro for multithreaded applications in file /usr/include/netdb.h
. Appli-
cations which reference
h_errno should include /usr/include/netdb.h.
_res is referenced as an extern struct _res_state for non-threaded applications and is defined
as function call macro for multithreaded application in file /usr/include/resolv.h
. Applications
which reference
_res should include /usr/include/resolv.h.
AUTHOR
These resolver routines were developed by the University of California, Berkeley.
FILES
/etc/resolv.conf Resolver configuration file.
SEE ALSO
named(1M), gethostent(3N), resolver(4), hostname(5), thread_safety(5), RFC1034, RFC1035, RFC1535.
HP-UX 11i Version 2: August 2003 − 4 − Hewlett-Packard Company Section 3−−863