Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
getdns_convert(3)		     getdns		       getdns_convert(3)

NAME
     getdns_convert,	     getdns_convert_dns_name_to_fqdn,	     getdns_con-
     vert_fqdn_to_dns_name -- convert dname between presentation- and  wire-for-
     mat

LIBRARY
     DNS Resolver library (libgetdns, -lgetdns)

SYNOPSIS
     #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)

DESCRIPTION
     Names  in DNS fields are stored in a fashion very different from the normal
     presentation format normally used in applications. The DNS  format  is  de-
     scribed 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-ter-
     minated 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-com-
	pressed  DNS  wire  format  name  (per	RFC   1035).	In   getdns_con-
	vert_dns_name_to_fqdn  storage	is  allocated using the system allocator
	(malloc) and must be freed by the caller.

RETURN VALUES
     Upon successful completion the function returns GETDNS_RETURN_GOOD

EXAMPLES
     TBD

SEE ALSO
     libgetdns(3)

getdns 1.7.3			  December 2015 	       getdns_convert(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=getdns_convert&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help