ldns(3)
π ldns(3) β the dname label girlies π
okay bestie, welcome to the ldns(3) manual page (library functions manual, if we're being formal, which we are not). this is the corner of the ldns docs that handles dname labels, and honestly? it's giving tiny-but-mighty. two functions. that's it. that's the whole vibe. let's get into it π¦
β¨ NAME β¨
ldns_dname_left_chop, ldns_dname_label_count β dname label functions. yes, just the two of them, and they're both iconic in their own little way π
π SYNOPSIS π
okay so first you gotta pull in the headers, no cap:
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
then the two stars of the show:
ldns_rdf* ldns_dname_left_chop(const ldns_rdf *d);
uint8_t ldns_dname_label_count(const ldns_rdf *r);
look at them. ldns_rdf* returning, uint8_t returning. periodt. π
πΈ DESCRIPTION πΈ
ldns_dname_left_chop()
bestie. this one chops one label off the left side of a dname. that's literally the whole job. it takes wwww.nlnetlabs.nl and hands you back nlnetlabs.nl. left label? gone. not me being emotionally attached to a label π
the way that this new name is a clone, so you have to free it yourself with ldns_deep_free(). like, it's not borrowing memory, it's making a whole new one and you're responsible for it now. main character energy but also main character responsibility, iykyk π«Ά
dβ the dname to chop πͺ- Returns β the remaining dname β¨
ldns_dname_label_count()
this one is the chill one. it just counts the number of labels inside a LDNS_RDF_DNAME type rdf. no chopping, no drama, just counting. lowkey soothing tbh π
*rβ the rdf- Returns β the number of labels π’
π AUTHOR π
The ldns team at NLnet Labs. absolute legends, we stan π
π REPORTING BUGS π
found a bug? don't suffer in silence bestie, please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues. they want to 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. so like, use it, love it, but if it breaks, that's on you bestie π
π SEE ALSO π
go read these too, they're the extended universe:
π§ REMARKS π§
This manpage was automatically generated from the ldns source code. yes, a robot wrote it. we just gave it a glow-up β¨
and that's the whole page bestie!! this one's from the ldns library functions manual, dated 30 May 2006 β shoutout to that timestamp, it's been holding it down since forever π chop your labels, count your labels, free your clones, and stay slay π¦πβ
π¦ 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