ldns(3) Library Functions Manual ldns(3)

# [NAME](#NAME)

ldns\_dnssec\_name\_new, ldns\_dnssec\_name\_new\_frm\_rr, ldns\_dnssec\_name\_free, ldns\_dnssec\_name\_name, ldns\_dnssec\_name\_set\_name, ldns\_dnssec\_name\_set\_nsec, ldns\_dnssec\_name\_cmp, ldns\_dnssec\_name\_add\_rr, ldns\_dnssec\_name\_find\_rrset, ldns\_dnssec\_name\_print - functions for ldns\_dnssec\_name

# [SYNOPSIS](#SYNOPSIS)

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

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

ldns\_dnssec\_name* ldns\_dnssec\_name\_new(void);

ldns\_dnssec\_name* ldns\_dnssec\_name\_new\_frm\_rr(ldns\_rr \*rr);

void ldns\_dnssec\_name\_free(ldns\_dnssec\_name \*name);

ldns\_rdf* ldns\_dnssec\_name\_name(const ldns\_dnssec\_name \*name);

void ldns\_dnssec\_name\_set\_name(ldns\_dnssec\_name \*name, ldns\_rdf \*dname);

void ldns\_dnssec\_name\_set\_nsec(ldns\_dnssec\_name \*name, ldns\_rr \*nsec);

int ldns\_dnssec\_name\_cmp(const void \*a, const void \*b);

ldns\_status ldns\_dnssec\_name\_add\_rr(ldns\_dnssec\_name \*name, ldns\_rr \*rr);

ldns\_dnssec\_rrsets* ldns\_dnssec\_name\_find\_rrset(const ldns\_dnssec\_name \*name, ldns\_rr\_type type);

void ldns\_dnssec\_name\_print(FILE \*out, const ldns\_dnssec\_name \*name);

# [DESCRIPTION](#DESCRIPTION)

*ldns\_dnssec\_name\_new*() Create a new data structure for a dnssec name  
Returns the allocated structure

*ldns\_dnssec\_name\_new\_frm\_rr*() Create a new data structure for a dnssec name for the given RR

**rr**: the RR to derive properties from, and to add to the name

*ldns\_dnssec\_name\_free*() Frees the name structure and its rrs and rrsets. Individual ldns\_rr records therein are not freed

**name**: the structure to free

*ldns\_dnssec\_name\_name*() Returns the domain name of the given dnssec\_name structure

**name**: the dnssec name to get the domain name from  
Returns the domain name

*ldns\_dnssec\_name\_set\_name*() Sets the domain name of the given dnssec\_name structure

**name**: the dnssec name to set the domain name of  
**dname**: the domain name to set it to. This data is \*not* copied.

*ldns\_dnssec\_name\_set\_nsec*() Sets the [NSEC(3)](/man/os/ldns/NSEC.3) RR of the given dnssec\_name structure

**name**: the dnssec name to set the domain name of  
**nsec**: the nsec rr to set it to. This data is \*not* copied.

*ldns\_dnssec\_name\_cmp*() Compares the domain names of the two arguments in their canonical ordering.

**a**: The first dnssec\_name to compare  
**b**: The second dnssec\_name to compare  
Returns -1 if the domain name of a comes before that of b in canonical ordering, 1 if it is the other way around, and 0 if they are equal

*ldns\_dnssec\_name\_add\_rr*() Inserts the given rr at the right place in the current dnssec\_name No checking is done whether the name matches

**name**: The ldns\_dnssec\_name to add the RR to  
**rr**: The RR to add  
Returns LDNS\_STATUS\_OK on success and LDNS\_STATUS\_EQUAL\_ERR when and RR with equal ownername, class, type and rdata already exists, and an error code otherwise

*ldns\_dnssec\_name\_find\_rrset*() Find the RRset with the given type in within this name structure

**name**: the name to find the RRset in  
**type**: the type of the RRset to find  
Returns the RRset, or NULL if not present

*ldns\_dnssec\_name\_print*() Prints the RRs in the dnssec name structure to the given file descriptor

**out**: the file descriptor to print to  
**name**: the name structure to print the contents of

# [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\_dnssec\_zone*. 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_dnssec_name_name(3) from ldns 1.9.2-r3 (Chainguard OS)
Source: https://github.com/NLnetLabs/ldns.git
