GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
getdns_convert(3) getdns getdns_convert(3)

getdns_convert, getdns_convert_dns_name_to_fqdn, getdns_convert_fqdn_to_dns_name -- convert dname between presentation- and wire-format

DNS Resolver library (libgetdns, -lgetdns)

#include <getdns.h>

getdns_return_t
getdns_convert_dns_name_to_fqdn (const getdns_bindata *dns_name_wire_fmt,

char **fqdn_as_string)

getdns_return_t
getdns_convert_fqdn_to_dns_name (char *fqdn_as_string,

const getdns_bindata **dns_name_wire_fmt)

Names in DNS fields are stored in a fashion very different from the normal presentation format normally used in applications. The DNS format is described in the first paragraph in Section 3.1 of RFC 1035; the presentation format here is a null-terminated string with interior dots. These helper functions only work with names in the DNS format that are not compressed. They are useful for converting domain names in the replies_tree to and from the FQDN presentation format.

getdns_convert_dns_name_to_fqdn() converts a domain name in DNS format to the presentation format. For example, the hex sequence 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 would be converted to "www.example.com". getdns_convert_fqdn_to_dns_name() does the reverse: it converts a null-terminated string in FQDN format to bytes in DNS format.

dns_name_wire_fmt The non-compressed DNS wire format name (per RFC 1035) in a bindata structure that will be converted to/from an fqdn. In getdns_convert_fqdn_to_dns_name storage is allocated using the system allocator (malloc) and must be freed by the caller.

fqdn_as_string a null terminated string to be converted to/from non-compressed DNS wire format name (per RFC 1035). In getdns_convert_dns_name_to_fqdn storage is allocated using the system allocator (malloc) and must be freed by the caller.

Upon successful completion the function returns GETDNS_RETURN_GOOD

TBD

libgetdns(3)

December 2015 getdns 1.5.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.