ldns(3)
π ldns β NAME π
okay so bestie, welcome to ldns(3), the Library Functions Manual section of the ldns world πΈ β and this page right here is all about the lower level to string conversion functions. like, the lil glow-up crew that takes raw rdata and turns it into pretty text. π
the cast of icons (all 19 of them, no cap):
ldns_rdf2buffer_str_aldns_rdf2buffer_str_aaaaldns_rdf2buffer_str_strldns_rdf2buffer_str_b64ldns_rdf2buffer_str_hexldns_rdf2buffer_str_typeldns_rdf2buffer_str_classldns_rdf2buffer_str_algldns_rdf2buffer_str_locldns_rdf2buffer_str_unknownldns_rdf2buffer_str_nsapldns_rdf2buffer_str_wksldns_rdf2buffer_str_nsecldns_rdf2buffer_str_periodldns_rdf2buffer_str_tsigtimeldns_rdf2buffer_str_aplldns_rdf2buffer_str_int16_dataldns_rdf2buffer_str_int16ldns_rdf2buffer_str_ipseckey
β¨ SYNOPSIS β¨
first things first, you gotta let the compiler know what's up π«Ά
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
and here's every single signature, character for character, because we do not play fast and loose with prototypes in this house π
ldns_status ldns_rdf2buffer_str_a(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_aaaa(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_str(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_b64(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_hex(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_type(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_class(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_alg(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_loc(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_unknown(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_nsap(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_wks(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_nsec(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_period(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_tsigtime(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_apl(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_int16_data(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_int16(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_str_ipseckey(ldns_buffer *output, const ldns_rdf *rdf);
π DESCRIPTION π
okay so the vibe of this whole squad: each one takes one specific rdata element, converts it to string format, and drops it into the output buffer. every single one has the same two params and the same return deal, so once you get one, you get them all, fr fr. π
the shared deets, so I don't have to keep repeating myself (but I will anyway, because completeness is the moment): -*rdfβ the rdata to convert -*outputβ the buffer to add the data to - returnsLDNS_STATUS_OKon success, and error status on failure
π¦ the full lineup, in order π¦
ldns_rdf2buffer_str_a()β takes anLDNS_RDF_TYPE_Ardata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. π«Άldns_rdf2buffer_str_aaaa()β takes anLDNS_RDF_TYPE_AAAArdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. β¨ldns_rdf2buffer_str_str()β takes anLDNS_RDF_TYPE_STRrdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. πΈldns_rdf2buffer_str_b64()β takes anLDNS_RDF_TYPE_B64rdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. πldns_rdf2buffer_str_hex()β takes anLDNS_RDF_TYPE_HEXrdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. πldns_rdf2buffer_str_type()β takes anLDNS_RDF_TYPE_TYPErdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. πldns_rdf2buffer_str_class()β takes anLDNS_RDF_TYPE_CLASSrdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. πldns_rdf2buffer_str_alg()β takes anLDNS_RDF_TYPE_ALGrdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. π₯ldns_rdf2buffer_str_loc()β takes anLDNS_RDF_TYPE_LOCrdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. π¦ldns_rdf2buffer_str_unknown()β takes anLDNS_RDF_TYPE_UNKNOWNrdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. πldns_rdf2buffer_str_nsap()β takes anLDNS_RDF_TYPE_NSAPrdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. βldns_rdf2buffer_str_wks()β takes anLDNS_RDF_TYPE_WKSrdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. πldns_rdf2buffer_str_nsec()β takes anLDNS_RDF_TYPE_NSECrdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. π§ldns_rdf2buffer_str_period()β takes anLDNS_RDF_TYPE_PERIODrdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. π«ldns_rdf2buffer_str_tsigtime()β takes anLDNS_RDF_TYPE_TSIGTIMErdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. β°ldns_rdf2buffer_str_apl()β takes anLDNS_RDF_TYPE_APLrdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. πldns_rdf2buffer_str_int16_data()β takes anLDNS_RDF_TYPE_INT16_DATArdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. πldns_rdf2buffer_str_int16()β takes anLDNS_RDF_TYPE_INT16rdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. πΊldns_rdf2buffer_str_ipseckey()β takes anLDNS_RDF_TYPE_IPSECKEYrdata element, turns it into string format, adds it to the output buffer. params:*rdfis the rdata to convert,*outputis the buffer to add the data to. returnsLDNS_STATUS_OKon success, and error status on failure. π
π AUTHOR π
the ldns team at NLnet Labs. absolute legends, no notes. π
π REPORTING BUGS π
found something cursed? don't suffer in silence bestie, please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues β they wanna hear it fr fr. π
Β©οΈ COPYRIGHT Β©οΈ
Copyright (c) 2004 - 2006 NLnet Labs.
Licensed under the BSD License. and this is the important bit so imma say it loud: there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. π«Ά
π SEE ALSO π
go peek at these, they're the supporting cast:
π REMARKS π
heads up: this manpage was automatically generated from the ldns source code. so if it's giving "machine wrote me," that's because... she did. π
and that's the whole page bestie!! π this was ldns(3), from the Library Functions Manual, and the footer was reading 30 May 2006 β so yeah, vintage but still slaying. now go convert some rdata and be the main character of your own DNS stack β¨ππ¦
π¦ 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