Expands a compressed domain name.
#include <sys/types.h> #include <netinet/in.h> #include <arpa/nameser.h> #include <resolv.h>
int dn_expand (MessagePtr, EndofMesOrig, CompDomNam, ExpandDomNam, Length) u_char *MessagePtr, *EndOfMesOrig; u_char *CompDomNam, *ExpandDomNam; int Length;
The dn_expand subroutine 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 subroutine restores a domain name compressed by the dn_comp subroutine to its full size.
The dn_expand subroutine is one of a set of subroutines that form the resolver. The resolver is a set of functions that perform a translation between domain names and network addresses. Global information used by the resolver subroutines resides in the _res data structure. The /usr/include/resolv.h file contains the _res data structure definition.
Upon successful completion, the dn_expand subroutine returns the size of the expanded domain name.
If unsuccessful, the dn_expand subroutine returns a value of -1 to the calling program.
The dn_expand subroutine is part of Base Operating System (BOS) Runtime.
All applications containing the dn_expand subroutine must be compiled with _BSD set to a specific value. Acceptable values are 43 and 44. In addition, all socket applications must include the BSD libbsd.a library.
/etc/resolv.conf | |
Defines name server and domain name constants, structures, and values. |
The dn_comp subroutine, _getlong subroutine, getshort subroutine, putlong subroutine, putshort subroutine, res_init subroutine, res_mkquery subroutine, res_query subroutine, res_search subroutine, res_send subroutine.
TCP/IP Name Resolution in AIX Version 4.3 System Management Guide: Communications and Networks.
Sockets Overview, and Understanding Domain Name Resolution in AIX Version 4.3 Communications Programming Concepts.