ldns(3)

πŸ“¦
version 1.9.2 Β· 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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:

  • 0 if they're equal (periodt, they match πŸ‘‘)
  • -1 if rr1 comes before rr2
  • +1 if rr2 comes before rr1

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 rr
  • rr2 β€” 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 (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 πŸ’…πŸŒˆβ­