ldns(3)
π ldns(3) β the rdf attributes page, bestie edition π
okay so this is the manual page for the ldns(3) library β yes, the whole DNS library, but today we're zooming in on four little functions that peek at your rdfs (that's "resource data field", the raw wire-format chunks). They tell you how big it is, what type it is, where the data lives, and how two of them stack up against each other. Let's get into it π¦
β¨ NAME β¨
ldns_rdf_size, ldns_rdf_get_type, ldns_rdf_data, ldns_rdf_compare β get rdf attributes π
πΈ SYNOPSIS πΈ
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
size_t ldns_rdf_size(const ldns_rdf *rd);
ldns_rdf_type ldns_rdf_get_type(const ldns_rdf *rd);
uint8_t* ldns_rdf_data(const ldns_rdf *rd);
int ldns_rdf_compare(const ldns_rdf *rd1, const ldns_rdf *rd2);
π DESCRIPTION π
ldns_rdf_size()
returns the size of the rdf. like, how many bytes are we even working with here.
*rd: the rdf to read from- Returns
uint16_twith the size
ldns_rdf_get_type()
returns the type of the rdf. We need to insert _get_ here to prevent conflict the rdf_type TYPE. (their words, not mine, but honestly iconic that they documented the naming drama π)
*rd: the rdf to read from- Returns
ldns_rdf_typewith the type
ldns_rdf_data()
returns the data of the rdf.
*rd: the rdf to read from- Returns
uint8_t*pointer to the rdf's data
ldns_rdf_compare()
compares two rdf's on their wire formats. (To order dnames according to rfc4034, use ldns_dname_compare) β not me repeating that caveat verbatim because it MATTERS, fr fr π
rd1: the first onerd2: the second one- Returns
0if equal - Returns
-1ifrd1comes beforerd2 - Returns
+1ifrd2comes beforerd1
bestie the return values are literally0,-1, and+1. classic comparison trio. memorize it, it's giving "I've seen this inqsortbefore" β¨
π«Ά AUTHOR π«Ά
The ldns team at NLnet Labs. absolute legends, no cap π
π 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, seriously π
π 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. NO warranty. not even the obvious ones. don't come for them if your DNS explodes π«
π SEE ALSO π
ldns_rdf. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
π§ REMARKS π§
This manpage was automatically generated from the ldns source code. (a robot wrote the skeleton, I just gave it a makeover π )
and that's the whole page, bestie!! π this one's from the ldns library, dated 30 May 2006 β yeah, it's older than most of us but the vibes are still immaculate. go read your rdfs. 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