ldns(3)
π ldns β the ldns_rr_compare files, bestie π
okay so like, this is a page from the ldns library manual (section 3, library functions, you know the vibe β¨). It's all about comparing resource records with each other. Two little functions. Both of them adorable. Both of them very serious about their job. Let's get into it π«Ά
πΈ NAME πΈ
ldns_rr_compare, ldns_rr_compare_ds β compare a ldns_rr π
β¨ SYNOPSIS β¨
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
int ldns_rr_compare(const ldns_rr *rr1, const ldns_rr *rr2);
bool ldns_rr_compare_ds(const ldns_rr *rr1, const ldns_rr *rr2);
like, that's it. two functions. both of them just wanna know: are these two the same? π
π¦ DESCRIPTION π¦
π ldns_rr_compare()
This one compares two rrs. And here's the thing, bestie β the TTL is not looked at. Not even a little. Not even a peek. It is simply not part of the vibe check π«β¨
rr1β the first one πrr2β the second one π
And it returns:
0if they're equal (periodt, they match π)-1ifrr1comes beforerr2+1ifrr2comes beforerr1
So it's not a yes/no situation, it's a "who's first" situation. It's giving alphabetical order energy but for records. π
π ldns_rr_compare_ds()
This one returns true if the given rr's are equal. That's the whole main character move right there. π
BUT WAIT, there's more β it also returns true if one record is a DS that represents the same DNSKEY record as the other record. Like, different types, same truth underneath. It's giving soulmates. ππ
rr1β the first rrrr2β the second rr
Returns true if equal, otherwise false. That's it. Clean. Simple. Iconic. β¨
π AUTHOR π
The ldns team at NLnet Labs. absolute legends, no cap π«Ά
π₯ REPORTING BUGS π₯
Please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues
not me encouraging you to actually file the bug instead of just complaining in the group chat π do it, they wanna know
π 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.
fr fr, no warranty. zero. none. if it breaks, it breaks, and legally they told you so π
π SEE ALSO π
ldns_rr, ldns_rr_list. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
like, go read those if you want the deep lore πβ¨
π REMARKS π
This manpage was automatically generated from the ldns source code. A robot wrote it. A very efficient robot. We're just here to make it cute. π§
and that's the whole page, bestie!! written by the ldns team at NLnet Labs, from the ldns(3) library functions manual, dated 30 May 2006 β yeah she's vintage, and she ATE π πβ
π¦ 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