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_dname_new, ldns_dname_new_frm_str, ldns_dname_new_frm_data β€” create a dname πŸ’–

okay bestie, welcome to the ldns(3) library functions manual ✨ this is the corner of the ldns universe where we make brand new dnames from scratch, and honestly? it's giving builder energy πŸŽ€


🌸 SYNOPSIS 🌸

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

#include <ldns/ldns.h>

ldns_rdf* ldns_dname_new(uint16_t s, void *data);

ldns_rdf* ldns_dname_new_frm_str(const char *str);

ldns_rdf* ldns_dname_new_frm_data(uint16_t size, const void *data);

✨ DESCRIPTION ✨

πŸ¦‹ ldns_dname_new()

bestie, this one creates a new dname rdf from a string. and here's the tea that actually matters: the data pointer is stored in the rdf, it is not a copy of the data πŸ‘€ so don't go freeing or shuffling that memory around behind its back, fr fr.

  • s β€” the size of the new dname
  • data β€” pointer to the actual data

Returns ldns_rdf* πŸ’…

πŸŽ€ ldns_dname_new_frm_str()

this one creates a new dname rdf from a string, periodt.

  • str β€” string to use

Returns ldns_rdf* or NULL in case of an error 😭 (yes, you have to check. yes, always.)

🧚 ldns_dname_new_frm_data()

creates a new dname rdf from data β€” and the glow-up here is that the data is copied ✨ so your original buffer stays yours, no strings attached, no shared custody.

  • size β€” the size of the data
  • data β€” pointer to the actual data

Returns ldns_rdf* πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

The ldns team at NLnet Labs. absolute icons, no cap. 🫢


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? do NOT suffer in silence, bestie. please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues πŸ’Œ


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. πŸ’€ (say it with me: no warranty, not even for merchantability or fitness for a particular purpose. the legal girlies were very clear.)


🌈 SEE ALSO 🌈

  • ldns_pkt_query_new_frm_str
  • ldns_rdf_new_frm_str
  • ldns_rr_new_frm_str

and perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035 πŸ“ iykyk.


⭐ REMARKS ⭐

this manpage was automatically generated from the ldns source code. so if the vibes feel a little mechanical, that's why β€” the content is 100% real though πŸ’œ

and that's the whole page, babe πŸ₯° this was the 30 May 2006 edition of the ldns(3) manual, straight outta the ldns source code. go forth and build dnames responsibly, and remember: the _new one does NOT copy your data. mwah πŸ’…βœ¨