---
name: "ldns_dname_new"
section: "3"
platform: "linux"
package: "ldns"
version: "1.9.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ldns_dname_new"
---

# ldns\_dname\_new(3)

create a dname

## NAME

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

## SYNOPSIS

\#include \<stdint.h\>\
 \#include \<stdbool.h\>\

\#include \<ldns/ldns.h\>

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

*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 .br **s**: the size of the new dname .br **\*data**: pointer to the actual data

.br Returns ldns\_rdf\*

*ldns\_dname\_new\_frm\_str*() creates a new dname rdf from a string. .br **str**: string to use .br 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) .br **size**: the size of the data .br **\*data**: pointer to the actual data

.br Returns ldns\_rdf\*

## AUTHOR

The ldns team at NLnet Labs.

## REPORTING BUGS

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

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

*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

This manpage was automatically generated from the ldns source code.
