ldns(3)
π 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 π
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_strldns_rdf_new_frm_strldns_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 π
β¨
π¦ 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