---
name: "ldns_pkt_edns_data"
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_pkt_edns_data"
---

# ldns\_pkt\_edns\_data(3)

ldns\_pkt ends0 related functions

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

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

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

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

*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.

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

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

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

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

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

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

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

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

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

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

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

## 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*. And **perldoc Net::DNS**, **RFC1034**, **RFC1035**, **RFC4033**, **RFC4034**  and **RFC4035**.

## REMARKS

This manpage was automatically generated from the ldns source code.
