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 β€” 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_a
  • ldns_rdf2buffer_str_aaaa
  • ldns_rdf2buffer_str_str
  • ldns_rdf2buffer_str_b64
  • ldns_rdf2buffer_str_hex
  • ldns_rdf2buffer_str_type
  • ldns_rdf2buffer_str_class
  • ldns_rdf2buffer_str_alg
  • ldns_rdf2buffer_str_loc
  • ldns_rdf2buffer_str_unknown
  • ldns_rdf2buffer_str_nsap
  • ldns_rdf2buffer_str_wks
  • ldns_rdf2buffer_str_nsec
  • ldns_rdf2buffer_str_period
  • ldns_rdf2buffer_str_tsigtime
  • ldns_rdf2buffer_str_apl
  • ldns_rdf2buffer_str_int16_data
  • ldns_rdf2buffer_str_int16
  • ldns_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 - returns LDNS_STATUS_OK on success, and error status on failure

πŸ¦‹ the full lineup, in order πŸ¦‹

  • ldns_rdf2buffer_str_a() β€” takes an LDNS_RDF_TYPE_A rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. 🫢
  • ldns_rdf2buffer_str_aaaa() β€” takes an LDNS_RDF_TYPE_AAAA rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. ✨
  • ldns_rdf2buffer_str_str() β€” takes an LDNS_RDF_TYPE_STR rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. 🌸
  • ldns_rdf2buffer_str_b64() β€” takes an LDNS_RDF_TYPE_B64 rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. πŸ’–
  • ldns_rdf2buffer_str_hex() β€” takes an LDNS_RDF_TYPE_HEX rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. πŸ’œ
  • ldns_rdf2buffer_str_type() β€” takes an LDNS_RDF_TYPE_TYPE rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. πŸŽ€
  • ldns_rdf2buffer_str_class() β€” takes an LDNS_RDF_TYPE_CLASS rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. 🌈
  • ldns_rdf2buffer_str_alg() β€” takes an LDNS_RDF_TYPE_ALG rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. πŸ”₯
  • ldns_rdf2buffer_str_loc() β€” takes an LDNS_RDF_TYPE_LOC rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. πŸ¦‹
  • ldns_rdf2buffer_str_unknown() β€” takes an LDNS_RDF_TYPE_UNKNOWN rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. πŸ‘‘
  • ldns_rdf2buffer_str_nsap() β€” takes an LDNS_RDF_TYPE_NSAP rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. ⭐
  • ldns_rdf2buffer_str_wks() β€” takes an LDNS_RDF_TYPE_WKS rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. πŸ“
  • ldns_rdf2buffer_str_nsec() β€” takes an LDNS_RDF_TYPE_NSEC rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. 🧚
  • ldns_rdf2buffer_str_period() β€” takes an LDNS_RDF_TYPE_PERIOD rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. πŸ’«
  • ldns_rdf2buffer_str_tsigtime() β€” takes an LDNS_RDF_TYPE_TSIGTIME rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. ⏰
  • ldns_rdf2buffer_str_apl() β€” takes an LDNS_RDF_TYPE_APL rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. 🌟
  • ldns_rdf2buffer_str_int16_data() β€” takes an LDNS_RDF_TYPE_INT16_DATA rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. πŸ’•
  • ldns_rdf2buffer_str_int16() β€” takes an LDNS_RDF_TYPE_INT16 rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on success, and error status on failure. 🌺
  • ldns_rdf2buffer_str_ipseckey() β€” takes an LDNS_RDF_TYPE_IPSECKEY rdata element, turns it into string format, adds it to the output buffer. params: *rdf is the rdata to convert, *output is the buffer to add the data to. returns LDNS_STATUS_OK on 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 (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 βœ¨πŸ’–πŸ¦‹