The dn_expand() call expands a compressed domain name to a full domain name.
Syntax
#include <types.h> #include <netinet\in.h> #include <arpa\nameser.h> #include <resolv.h> int dn_expand(msg, eomorig, comp_dn, exp_dn, length) u_char *msg; u_char *eomorig; u_char *comp_dn; u_char *exp_dn; int length;
Parameters
msg
Description
The dn_expand() call expands a compressed domain name to a full domain name, converting the expanded names to all uppercase letters. A client process compresses domain names to conserve space. Compression consists of removing the longest possible previously occurring suffixes. The dn_expand() call restores a domain name compressed by the dn_comp() call to its full size.
The dn_expand() call is one of a set of calls that form the resolver. The resolver is a group of functions that perform a translation between domain names and network addresses. Global information used by the resolver calls resides in the _res data structure. The <RESOLV.H> file contains the _res data structure definition. (See The _res Data Structure for more on the _res data structure.)
Return Values
When successful, the dn_expand() call returns the size of the expanded domain name. When unsuccessful, the call returns a value of -1.
Related Calls
dn_comp() dn_find()
dn_skipname()
putlong()
putshort()
res_init()
res_mkquery()
res_query()
res_search()
res_send()