ldns(3)
π ldns(3) β the ldns library functions manual, bestie edition π
okay so welcome to ldns(3), aka the Library Functions Manual page for the ldns crew. this is where you learn how to make resource records, destroy them, and print them. it's giving creation, destruction, and printing. iconic trio honestly. π
β¨ NAME β¨
ldns_rr_new, ldns_rr_new_frm_type, ldns_rr_new_frm_str, ldns_rr_new_frm_fp, ldns_rr_free, ldns_rr_print β ldns_rr creation, destruction and printing π
β¨ SYNOPSIS β¨
like, here's the whole vibe, fr fr:
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
ldns_rr* ldns_rr_new(void);
ldns_rr* ldns_rr_new_frm_type(ldns_rr_type t);
ldns_status ldns_rr_new_frm_str(ldns_rr **n, const char *str, uint32_t
default_ttl, const ldns_rdf *origin, ldns_rdf **prev);
ldns_status ldns_rr_new_frm_fp(ldns_rr **rr, FILE *fp, uint32_t
*default_ttl, ldns_rdf **origin, ldns_rdf **prev);
void ldns_rr_free(ldns_rr *rr);
void ldns_rr_print(FILE *output, const ldns_rr *rr);
β¨ DESCRIPTION β¨
π¦ ldns_rr_new()
creates a new rr structure. that's it, that's the whole thing. slay.
Returns ldns_rr * π
π¦ ldns_rr_new_frm_type()
creates a new rr structure, based on the given type. and bestie, it allocs enough space to hold all the rdf's. no cap.
π¦ ldns_rr_new_frm_str()
creates an rr from a string. the string should be a fully filled-in rr, like this:
ownername <space> TTL <space> CLASS <space> TYPE <space> RDATA
the deets:
- n: the rr to return
- str: the string to convert
- default_ttl: default ttl value for the rr. if it's
0,DEF_TTLwill be used - origin: when the owner is relative, add this. the caller must
ldns_rdf_deep_freeit. - prev: the previous ownername. if this value is not
NULL, the function overwrites this with the ownername found in this string. the caller must thenldns_rdf_deep_freeit.
Returns a status msg describing an error or LDNS_STATUS_OK β
π¦ ldns_rr_new_frm_fp()
creates a new rr from a file containing a string. file-based glow up β¨
- rr: the new rr
- fp: the file pointer to use
- default_ttl: pointer to a default ttl for the rr. if
NULL,DEF_TTLwill be used. the pointer will be updated if the file contains a$TTLdirective - origin: when the owner is relative, add this. the pointer will be updated if the file contains a
$ORIGINdirective. the caller mustldns_rdf_deep_freeit. - prev: when the owner is whitespaces, use this as the * ownername. the pointer will be updated after the call. the caller must
ldns_rdf_deep_freeit.
Returns a ldns_status with an error or LDNS_STATUS_OK πΈ
π¦ ldns_rr_free()
frees an RR structure. bye bestie π
- rr: the RR to be freed
Returns void
π¦ ldns_rr_print()
prints the data in the resource record to the given file stream (in presentation format). it's giving showtime π
- output: the file stream to print to
- rr: the resource record to print
Returns void
β¨ AUTHOR β¨
the ldns team at NLnet Labs. kings and queens of DNS, periodt π
β¨ REPORTING BUGS β¨
pls pls pls report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues π we love a good bug report.
β¨ 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.
ok so read that again, bestie. no warranty. none. zero. not even the fitness one. π
β¨ SEE ALSO β¨
ldns_rr, ldns_rr_list. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035. go read the RFCs, they're long but they're the blueprint π§
β¨ REMARKS β¨
This manpage was automatically generated from the ldns source code. (yes the robots wrote it. we just made it cute.) π€π
and that's a wrap on ldns(3) from the Library Functions Manual, dated 30 May 2006 β ldns(3), we love you, 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