ldns(3)
π
ldns β the ldns_rr_push_rdf / ldns_rr_pop_rdf page
okay bestie, you found the ldns manual page, specifically the little corner of it about pushing and popping rdata fields. it's giving tiny but mighty β¨ and honestly? kinda iconic.
π NAME π
ldns_rr_push_rdf, ldns_rr_pop_rdf β push and pop rdata fields π«Ά
πΈ SYNOPSIS πΈ
first things first, you gotta bring in the headers, no cap:
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
and here's the two functions, exactly as they are, do not freestyle them:
bool ldns_rr_push_rdf(ldns_rr *rr, const ldns_rdf *f);
ldns_rdf* ldns_rr_pop_rdf(ldns_rr *rr);
π DESCRIPTION π
so, two besties, one resource record. let's get into it.
ldns_rr_push_rdf()
ldns_rr_push_rdf() sets the rd_field member β and the way it works is it slides it into the next available spot. no skipping, no drama, it just goes to the next free slot. π¦
*rrβ the rr you're operating on*fβ the data field member you wanna set- Returns
bool
ldns_rr_pop_rdf()
ldns_rr_pop_rdf() removes a rd_field member, and it gets popped from the last position. last in, first out, periodt. π
*rrβ the rr you're operating on- Returns the rdf which was popped (
nullif nothing)
not me reminding you that popping an empty thing gives younullπ it's literally in the docs,nullif nothing, so handle that case or suffer.
π AUTHOR π
The ldns team at NLnet Labs. absolute main characters, we stan. π
π REPORTING BUGS π
found something cursed? please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues β they wanna know, fr fr. π
β 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. read that again, bestie, no warranty, not even the fitness-for-a-particular-purpose one. so don't come for them if it breaks. π
π SEE ALSO π
ldns_rr, ldns_rr_list. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035. go read them, iykyk. π
π§ REMARKS π§
This manpage was automatically generated from the ldns source code. yes, a robot wrote it originally, and now a girl on the internet rewrote the robot. circle of life. π
and that's the whole page, bestie β ldns(3), dated 30 May 2006, straight from the ldns library functions manual. mwah. π β¨
π¦ 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