ldns(3) Library Functions Manual ldns(3)

# [NAME](#NAME)

ldns\_rr2str, ldns\_pkt2str, ldns\_rdf2str, ldns\_rr\_list2str, ldns\_key2str - functions for conversions to string

# [SYNOPSIS](#SYNOPSIS)

#include &lt;stdint.h&gt;  
#include &lt;stdbool.h&gt;

#include &lt;ldns/ldns.h&gt;

char* ldns\_rr2str(const ldns\_rr \*rr);

char* ldns\_pkt2str(const ldns\_pkt \*pkt);

char* ldns\_rdf2str(const ldns\_rdf \*rdf);

char* ldns\_rr\_list2str(const ldns\_rr\_list \*rr\_list);

char* ldns\_key2str(const ldns\_key \*k);

# [DESCRIPTION](#DESCRIPTION)

*ldns\_rr2str*() Converts the data in the resource record to presentation format and returns that as a char \*. Remember to free it.

**rr**: The rdata field to convert  
Returns null terminated char * data, or NULL on error

*ldns\_pkt2str*() Converts the data in the DNS packet to presentation format and returns that as a char \*. Remember to free it.

**pkt**: The rdata field to convert  
Returns null terminated char * data, or NULL on error

*ldns\_rdf2str*() Converts the data in the rdata field to presentation format and returns that as a char \*. Remember to free it.

**rdf**: The rdata field to convert  
Returns null terminated char * data, or NULL on error

*ldns\_rr\_list2str*() Converts a list of resource records to presentation format and returns that as a char \*. Remember to free it.

**rr\_list**: the rr\_list to convert to text  
Returns null terminated char * data, or NULL on error

*ldns\_key2str*() Converts a private key to the test presentation fmt and returns that as a char \*. Remember to free it.

**k**: the key to convert to text  
Returns null terminated char * data, or NULL on error

# [AUTHOR](#AUTHOR)

The ldns team at NLnet Labs.

# [REPORTING BUGS](#REPORTING_BUGS)

Please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues

# [COPYRIGHT](#COPYRIGHT)

Copyright (c) 2004 - 2006 NLnet Labs.

Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# [SEE ALSO](#SEE_ALSO)

*ldns\_rr\_print*, *ldns\_rdf\_print*, *ldns\_pkt\_print*, *ldns\_rr\_list\_print*, *ldns\_resolver\_print*, *ldns\_zone\_print*. And **perldoc Net::DNS**, **RFC1034**, **RFC1035**, **RFC4033**, **RFC4034** and **RFC4035**.

# [REMARKS](#REMARKS)

This manpage was automatically generated from the ldns source code.

30 May 2006

---

Document: ldns_rdf2str(3) from ldns 1.9.2-r2 (Chainguard OS)
Source: https://github.com/NLnetLabs/ldns.git
