ldns(3)

πŸ“¦
version 1.9.2 Β· 3 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 rr-attribute-setting girlies πŸ’–

okay so bestie, welcome to ldns(3), the library functions manual for the one and only ldns πŸ’… this page is all about the little setters that let you poke at an ldns_rr record and change its attributes. no cap, it's giving "makeover montage" energy ✨


🌸 NAME 🌸

ldns_rr_set_owner, ldns_rr_set_ttl, ldns_rr_set_type, ldns_rr_set_rd_count, ldns_rr_set_class, ldns_rr_set_rdf β€” set ldns_rr attributes πŸŽ€


✨ SYNOPSIS ✨

like, here's the exact vibe you need to pull in first:

#include <stdint.h>
#include <stdbool.h>

#include <ldns/ldns.h>

void ldns_rr_set_owner(ldns_rr *rr, ldns_rdf *owner);

void ldns_rr_set_ttl(ldns_rr *rr, uint32_t ttl);

void ldns_rr_set_type(ldns_rr *rr, ldns_rr_type rr_type);

void ldns_rr_set_rd_count(ldns_rr *rr, size_t count);

void ldns_rr_set_class(ldns_rr *rr, ldns_rr_class rr_class);

ldns_rdf* ldns_rr_set_rdf(ldns_rr *rr, const ldns_rdf *f, size_t
position);

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically every one of these is a lil setter that reaches into your rr struct and swaps one attribute out. main character energy, one field at a time πŸ‘‘


πŸ’œ ldns_rr_set_owner()

sets the owner in the rr structure. it's the glow-up for your owner field, fr fr.

  • *rr β€” the rr to operate on
  • *owner β€” set to this owner

returns void (so, like, nothing comes back, she's mysterious πŸŒ™)


πŸ’œ ldns_rr_set_ttl()

sets the ttl in the rr structure. yes, the time-to-live, the expiry-date of your whole record's existence 😭

  • *rr β€” the rr to operate on
  • ttl β€” set to this ttl

returns void


πŸ’œ ldns_rr_set_type()

sets the type in the rr. A? AAAA? MX? she can be whoever she wants to be πŸ¦‹

  • *rr β€” the rr to operate on
  • rr_type β€” set to this type

returns void


πŸ’œ ldns_rr_set_rd_count()

sets the rd_count in the rr. that's the count of the rdf fields, bestie, keep track of your girlies ✨

  • *rr β€” the rr to operate on
  • count β€” set to this count

returns void


πŸ’œ ldns_rr_set_class()

sets the class in the rr. IN, CH, whatever, iconic either way πŸ’…

  • *rr β€” the rr to operate on
  • rr_class β€” set to this class

returns void


πŸ’œ ldns_rr_set_rdf()

okay this one is the interesting one πŸ‘€ sets an rdf member β€” it will be set on the position given. and here's the slay: the old value is returned, like pop. so you're not just overwriting, you're getting the thing that was there before, handed back to you 🫢

  • *rr β€” the rr to operate on
  • *f β€” the rdf to set
  • position β€” the position the set the rdf

returns the old value in the rr, or NULL on failure πŸ’€

heads up: NULL on failure means you gotta check that return value. don't just assume she came back with a present. 😭

🌈 AUTHOR 🌈

the ldns team at NLnet Labs. kings and queens, no notes πŸ‘‘


πŸŽ€ REPORTING BUGS πŸŽ€

found a bug? not the vibe. please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues β€” they wanna know, fr fr πŸ™ˆ


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, like, at all 😭


πŸ’« SEE ALSO πŸ’«

ldns_rr, ldns_rr_list. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035. iykyk πŸ“š


🧚 REMARKS 🧚

This manpage was automatically generated from the ldns source code. (yes, a robot wrote this one, and honestly? she ate. πŸ€–πŸ’…)


and that's the whole page, bestie!! πŸ’–βœ¨πŸ¦‹ this lil legend is dated 30 May 2006 and it's section 3 of the ldns manual, mwah πŸ’‹ take care of your rr's and they'll take care of you 🫢🌸