ldns(3) Library Functions Manual ldns(3)

# [NAME](#NAME)

ldns\_dname\_new, ldns\_dname\_new\_frm\_str, ldns\_dname\_new\_frm\_data - create a dname

# [SYNOPSIS](#SYNOPSIS)

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

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

ldns\_rdf* ldns\_dname\_new(uint16\_t s, void \*data);

ldns\_rdf* ldns\_dname\_new\_frm\_str(const char \*str);

ldns\_rdf* ldns\_dname\_new\_frm\_data(uint16\_t size, const void \*data);

# [DESCRIPTION](#DESCRIPTION)

*ldns\_dname\_new*() Create a new dname rdf from a string. The data pointer is stored in the rdf, not a copy of the data  
**s**: the size of the new dname  
**\*data**: pointer to the actual data

Returns ldns\_rdf*

*ldns\_dname\_new\_frm\_str*() creates a new dname rdf from a string.  
**str**: string to use  
Returns ldns\_rdf* or NULL in case of an error

*ldns\_dname\_new\_frm\_data*() Create a new dname rdf from data (the data is copied)  
**size**: the size of the data  
**\*data**: pointer to the actual data

Returns ldns\_rdf*

# [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\_pkt\_query\_new\_frm\_str*, *ldns\_rdf\_new\_frm\_str*, *ldns\_rr\_new\_frm\_str*. 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_dname_new_frm_str(3) from ldns 1.9.2-r3 (Chainguard OS)
Source: https://github.com/NLnetLabs/ldns.git
