ldns(3)
πΈ NAME πΈ
okay so bestie, this is the ldns(3) manual page, and it's literally all about the setter girlies β the functions that set attributes on an ldns_pkt π
Meet the whole squad (yes, all of them, no skips):
ldns_pkt_set_flagsldns_pkt_set_idldns_pkt_set_qrldns_pkt_set_aaldns_pkt_set_tcldns_pkt_set_rdldns_pkt_set_cdldns_pkt_set_raldns_pkt_set_adldns_pkt_set_opcodeldns_pkt_set_rcodeldns_pkt_set_qdcountldns_pkt_set_ancountldns_pkt_set_nscountldns_pkt_set_arcountldns_pkt_set_answerfromldns_pkt_set_querytimeldns_pkt_set_sizeldns_pkt_set_section_countldns_pkt_set_tsig
β¦and their collective job is to set ldns_pkt attributes. That's it, that's the gig β¨
β¨ SYNOPSIS β¨
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
bool ldns_pkt_set_flags(ldns_pkt *pkt, uint16_t flags);
void ldns_pkt_set_id(ldns_pkt *p, uint16_t id);
void ldns_pkt_set_qr(ldns_pkt *p, bool b);
void ldns_pkt_set_aa(ldns_pkt *p, bool b);
void ldns_pkt_set_tc(ldns_pkt *p, bool b);
void ldns_pkt_set_rd(ldns_pkt *p, bool b);
void ldns_pkt_set_cd(ldns_pkt *p, bool b);
void ldns_pkt_set_ra(ldns_pkt *p, bool b);
void ldns_pkt_set_ad(ldns_pkt *p, bool b);
void ldns_pkt_set_opcode(ldns_pkt *p, ldns_pkt_opcode c);
void ldns_pkt_set_rcode(ldns_pkt *p, uint8_t c);
void ldns_pkt_set_qdcount(ldns_pkt *p, uint16_t c);
void ldns_pkt_set_ancount(ldns_pkt *p, uint16_t c);
void ldns_pkt_set_nscount(ldns_pkt *p, uint16_t c);
void ldns_pkt_set_arcount(ldns_pkt *p, uint16_t c);
void ldns_pkt_set_answerfrom(ldns_pkt *p, ldns_rdf *r);
void ldns_pkt_set_querytime(ldns_pkt *p, uint32_t t);
void ldns_pkt_set_size(ldns_pkt *p, size_t s);
void ldns_pkt_set_section_count(ldns_pkt *p, ldns_pkt_section s, uint16_t x);
void ldns_pkt_set_tsig(ldns_pkt *p, ldns_rr *t);
π DESCRIPTION π
okay so here's the thing, every single one of these takes a packet p (or pkt, she's quirky like that) and justβ¦ sets a thing on it. one job. iconic behavior. no notes. π«Ά
ldns_pkt_set_flags()
sets the flags in a packet.
pkt: the packet to operate onflags: ORed values:LDNS_QR| LDNS_ARfor instance- Returns true on success otherwise false
ldns_pkt_set_id()
Set the packet's id.
p: the packetid: the id to set
ldns_pkt_set_qr()
Set the packet's qr bit.
p: the packetb: the value to set (boolean)
ldns_pkt_set_aa()
Set the packet's aa bit.
p: the packetb: the value to set (boolean)
ldns_pkt_set_tc()
Set the packet's tc bit.
p: the packetb: the value to set (boolean)
ldns_pkt_set_rd()
Set the packet's rd bit.
p: the packetb: the value to set (boolean)
ldns_pkt_set_cd()
Set the packet's cd bit.
p: the packetb: the value to set (boolean)
ldns_pkt_set_ra()
Set the packet's ra bit.
p: the packetb: the value to set (boolean)
ldns_pkt_set_ad()
Set the packet's ad bit.
p: the packetb: the value to set (boolean)
ldns_pkt_set_opcode()
Set the packet's opcode.
p: the packetc: the opcode
ldns_pkt_set_rcode()
Set the packet's response code.
p: the packetc: the rcode
ldns_pkt_set_qdcount()
Set the packet's qd count.
p: the packetc: the count
ldns_pkt_set_ancount()
Set the packet's an count.
p: the packetc: the count
ldns_pkt_set_nscount()
Set the packet's ns count.
p: the packetc: the count
ldns_pkt_set_arcount()
Set the packet's arcount.
p: the packetc: the count
ldns_pkt_set_answerfrom()
Set the packet's answering server.
p: the packetr: the address
ldns_pkt_set_querytime()
Set the packet's query time.
p: the packett: the querytime in msec
ldns_pkt_set_size()
Set the packet's size.
p: the packets: the size
ldns_pkt_set_section_count()
Set a packet's section count to x.
p: the packets: the sectionx: the section count
ldns_pkt_set_tsig()
Set the packet's tsig rr.
p: the packett: the tsig rr
π AUTHOR π
The ldns team at NLnet Labs. absolute legends, fr fr π
π REPORTING BUGS π
Found a bug? bestie please tell them, don't suffer in silence π
- email:
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. π she said no warranty and she MEANT it.
π SEE ALSO π
go read them, iykyk πβ¨
π REMARKS π
This manpage was automatically generated from the ldns source code. (not me being a bot-written queen, it's giving efficiency π )
and that's the whole page bestie!! this was ldns(3) from the Library Functions Manual, dated 30 May 2006 β mwah, slay, periodt π¦πβ¨
π¦ where this page comes from
- alpine 3.22: ldns-doc 1.8.4-r0 Β· BSD-3-Clause
- alpine 3.23: ldns-doc 1.8.4-r1 Β· BSD-3-Clause
- alpine 3.24: ldns-doc 1.8.4-r1 Β· BSD-3-Clause
- arch rolling: ldns 1.9.2-1 Β· custom:BSD
- debian trixie: libldns-dev 1.8.4-2+b1
- fedora 43: ldns-devel 1.8.4-8.fc43 Β· BSD-3-Clause
- fedora 43: ldns-devel 1.8.4-8.fc43 Β· BSD-3-Clause
- fedora 43: ldns-devel 1.9.2-1.fc43 Β· BSD-3-Clause
- fedora 43: ldns-devel 1.9.2-1.fc43 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.0-2.fc44 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.0-2.fc44 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.2-1.fc44 Β· BSD-3-Clause
- fedora 44: ldns-devel 1.9.2-1.fc44 Β· BSD-3-Clause
- nixos 26.05: ldns 1.9.2
- nixpkgs unstable: ldns 1.9.2
- opensuse-leap 16.0: ldns-devel 1.8.4-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: ldns-devel 1.8.4-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: ldns-devel 1.8.4-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: ldns-devel 1.8.4-160000.3.1 Β· BSD-3-Clause
- ubuntu questing: libldns-dev 1.8.4-2build1
- ubuntu resolute: libldns-dev 1.8.4-2build3
- ubuntu stonking: libldns-dev 1.9.2-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms