ldns(3) Library Functions Manual ldns(3)

# [NAME](#NAME)

ldns\_pkt\_edns, ldns\_pkt\_edns\_udp\_size, ldns\_pkt\_edns\_extended\_rcode, ldns\_pkt\_edns\_version, ldns\_pkt\_edns\_z, ldns\_pkt\_edns\_data, ldns\_pkt\_set\_edns\_udp\_size, ldns\_pkt\_set\_edns\_extended\_rcode, ldns\_pkt\_set\_edns\_version, ldns\_pkt\_set\_edns\_z, ldns\_pkt\_set\_edns\_data - ldns\_pkt ends0 related functions

# [SYNOPSIS](#SYNOPSIS)

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

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

bool ldns\_pkt\_edns(const ldns\_pkt \*packet);

uint16\_t ldns\_pkt\_edns\_udp\_size(const ldns\_pkt \*packet);

uint8\_t ldns\_pkt\_edns\_extended\_rcode(const ldns\_pkt \*packet);

uint8\_t ldns\_pkt\_edns\_version(const ldns\_pkt \*packet);

uint16\_t ldns\_pkt\_edns\_z(const ldns\_pkt \*packet);

ldns\_rdf* ldns\_pkt\_edns\_data(const ldns\_pkt \*packet);

void ldns\_pkt\_set\_edns\_udp\_size(ldns\_pkt \*packet, uint16\_t s);

void ldns\_pkt\_set\_edns\_extended\_rcode(ldns\_pkt \*packet, uint8\_t c);

void ldns\_pkt\_set\_edns\_version(ldns\_pkt \*packet, uint8\_t v);

void ldns\_pkt\_set\_edns\_z(ldns\_pkt \*packet, uint16\_t z);

void ldns\_pkt\_set\_edns\_data(ldns\_pkt \*packet, ldns\_rdf \*data);

# [DESCRIPTION](#DESCRIPTION)

*ldns\_pkt\_edns*() returns true if this packet needs and EDNS rr to be sent. At the moment the only reason is an expected packet size larger than 512 bytes, but for instance dnssec would be a good reason too.

**packet**: the packet to check  
Returns true if packet needs edns rr

*ldns\_pkt\_edns\_udp\_size*() return the packet's edns udp size  
**packet**: the packet  
Returns the size

*ldns\_pkt\_edns\_extended\_rcode*() return the packet's edns extended rcode  
**packet**: the packet  
Returns the rcode

*ldns\_pkt\_edns\_version*() return the packet's edns version  
**packet**: the packet  
Returns the version

*ldns\_pkt\_edns\_z*() return the packet's edns z value  
**packet**: the packet  
Returns the z value

*ldns\_pkt\_edns\_data*() return the packet's EDNS data  
**packet**: the packet  
Returns the data

*ldns\_pkt\_set\_edns\_udp\_size*() Set the packet's edns udp size  
**packet**: the packet  
**s**: the size

*ldns\_pkt\_set\_edns\_extended\_rcode*() Set the packet's edns extended rcode  
**packet**: the packet  
**c**: the code

*ldns\_pkt\_set\_edns\_version*() Set the packet's edns version  
**packet**: the packet  
**v**: the version

*ldns\_pkt\_set\_edns\_z*() Set the packet's edns z value  
**packet**: the packet  
**z**: the value

*ldns\_pkt\_set\_edns\_data*() Set the packet's EDNS data  
**packet**: the packet  
**data**: the data

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