Expand a compressed Internet domain name
#include <sys/types.h> #include <netinet/in.h> #include <arpa/nameser.h> #include <resolv.h> int dn_expand( const u_char * msg, const u_char * eomorig, const u_char * comp_dn, char * exp_dn, int length );
The dn_expand() function is a low-level routine used by res_query() to expand the compressed domain name, comp_dn, to a full domain name.
The compressed name is contained in a query or reply message.
Based on:
RFC 974, RFC 1032, RFC 1033, RFC 1034, RFC 1035
The size of the compressed domain name (not the expanded name), in bytes, or -1 if an error occurs.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |