ldns(3)
π ldns(3) β the bestie guide to checking your buffer's whole vibe π
okay so this is a page from the ldns Library Functions Manual, and babes, it's literally just about checking how your buffer is doing. no drama, just status checks. let's get into it π«Ά
β¨ NAME β¨
ldns_buffer_remaining_at, ldns_buffer_remaining, ldns_buffer_available_at, ldns_buffer_available, ldns_buffer_status, ldns_buffer_status_ok β check buffer status π
like, the whole point is "how much room do we have, and are we okay?" and honestly? same.
πΈ SYNOPSIS πΈ
#include <stdint.h>
#include <stdbool.h>
#include <ldns/ldns.h>
size_t ldns_buffer_remaining_at(const ldns_buffer *buffer, size_t at);
size_t ldns_buffer_remaining(const ldns_buffer *buffer);
int ldns_buffer_available_at(const ldns_buffer *buffer, size_t at,
size_t count);
int ldns_buffer_available(const ldns_buffer *buffer, size_t count);
ldns_status ldns_buffer_status(const ldns_buffer *buffer);
bool ldns_buffer_status_ok(const ldns_buffer *buffer);
no cap, that's the whole cast of characters. six little functions, all main character energy β¨
π DESCRIPTION π
okay bestie, here's the tea on each one. one at a time, no skipping, we're not doing that π
π¦ ldns_buffer_remaining_at()
returns the number of bytes remaining between the indicated position and the limit.
- buffer: the buffer
- at: indicated position
- returns: number of bytes
so like, "from this spot right here, how much runway do we have left?" slay.
π ldns_buffer_remaining()
returns the number of bytes remaining between the buffer's position and limit.
- buffer: the buffer
- returns: the number of bytes
same vibe as above but from wherever the buffer's position currently is. the way that it just... measures the gap π
π₯ ldns_buffer_available_at()
checks if the buffer has at least COUNT more bytes available.
β οΈ BESTIE LISTEN. before reading or writing, the caller needs to ensure enough space is available! this is not optional, this is the rule. do not skip the vibe check and then come crying to me π
- buffer: the buffer
- at: indicated position
- count: how much is available
- returns: true or false (as int?)
(the original really does go "as int?" with the question mark, and honestly? the sass. we love an honest manpage π)
π ldns_buffer_available()
checks if the buffer has count bytes available at the current position.
- buffer: the buffer
- count: how much is available
- returns: true or false (as int?)
the current-position edition, periodt.
β ldns_buffer_status()
returns the status of the buffer
\param[in] buffer
- returns: the status
yeah, the original literally has that \param[in] buffer sitting in the middle of the sentence like it wandered in from a doxygen comment and decided to stay. iconic behaviour, we're keeping it exactly as is π
π ldns_buffer_status_ok()
returns true if the status of the buffer is LDNS_STATUS_OK, false otherwise.
- buffer: the buffer
- returns: true or false
the yes/no girlie of the group. is it okay? is it not? she'll tell you π«Ά
π AUTHOR π
the ldns team at NLnet Labs. absolute legends, no notes.
π REPORTING BUGS π
found a bug? don't 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.
like, it's giving "we love you but we're not liable" and honestly, fair π
πΈ SEE ALSO πΈ
ldns_buffer. and perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
go read them, iykyk π
π« REMARKS π«
This manpage was automatically generated from the ldns source code.
so yeah, a robot wrote the bones of this and i just gave it a personality. we're both doing our part β¨
and that's the whole page bestie, you ate it, no crumbs left π this little gem came from the ldns Library Functions Manual and it's dated 30 May 2006 β yes, she's vintage, she's been slaying since before some of us could walk π
β¨ mwah, go check those buffers responsibly π«Ά
π¦ 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