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

FreeBSD Manual Pages

  
 
  

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-
       format

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 for-
       mat 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.exam-
       ple.com".   getdns_convert_fqdn_to_dns_name() does the reverse: it con-
       verts 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_con-
	  vert_dns_name_to_fqdn	 storage is allocated using the	system alloca-
	  tor (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.1.1			 December 2015		     getdns_convert(3)

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | RETURN VALUES | EXAMPLES | SEE ALSO

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

home | help