---
name: "ldns_buffer_write_u32_at"
section: "3"
platform: "linux"
package: "ldns"
version: "1.9.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ldns_buffer_write_u32_at"
---

# ldns\_buffer\_write\_u32\_at(3)

reading and writing buffers

## NAME

ldns\_buffer\_write\_at, ldns\_buffer\_write, ldns\_buffer\_write\_string\_at, ldns\_buffer\_write\_string, ldns\_buffer\_write\_u8\_at, ldns\_buffer\_write\_u8, ldns\_buffer\_write\_u16\_at, ldns\_buffer\_write\_u16, ldns\_buffer\_read\_at, ldns\_buffer\_read, ldns\_buffer\_read\_u8\_at, ldns\_buffer\_read\_u8, ldns\_buffer\_read\_u16\_at, ldns\_buffer\_read\_u16, ldns\_buffer\_read\_u32\_at, ldns\_buffer\_read\_u32, ldns\_buffer\_write\_u32, ldns\_buffer\_write\_u32\_at - reading and writing buffers

## SYNOPSIS

\#include \<stdint.h\>\
 \#include \<stdbool.h\>\

\#include \<ldns/ldns.h\>

void ldns\_buffer\_write\_at(ldns\_buffer \*buffer, size\_t at, const void \*data, size\_t count);

void ldns\_buffer\_write(ldns\_buffer \*buffer, const void \*data, size\_t count);

void ldns\_buffer\_write\_string\_at(ldns\_buffer \*buffer, size\_t at, const char \*str);

void ldns\_buffer\_write\_string(ldns\_buffer \*buffer, const char \*str);

void ldns\_buffer\_write\_u8\_at(ldns\_buffer \*buffer, size\_t at, uint8\_t data);

void ldns\_buffer\_write\_u8(ldns\_buffer \*buffer, uint8\_t data);

void ldns\_buffer\_write\_u16\_at(ldns\_buffer \*buffer, size\_t at, uint16\_t data);

void ldns\_buffer\_write\_u16(ldns\_buffer \*buffer, uint16\_t data);

void ldns\_buffer\_read\_at(const ldns\_buffer \*buffer, size\_t at, void \*data, size\_t count);

void ldns\_buffer\_read(ldns\_buffer \*buffer, void \*data, size\_t count);

uint8\_t ldns\_buffer\_read\_u8\_at(const ldns\_buffer \*buffer, size\_t at);

uint8\_t ldns\_buffer\_read\_u8(ldns\_buffer \*buffer);

uint16\_t ldns\_buffer\_read\_u16\_at(ldns\_buffer \*buffer, size\_t at);

uint16\_t ldns\_buffer\_read\_u16(ldns\_buffer \*buffer);

uint32\_t ldns\_buffer\_read\_u32\_at(ldns\_buffer \*buffer, size\_t at);

uint32\_t ldns\_buffer\_read\_u32(ldns\_buffer \*buffer);

void ldns\_buffer\_write\_u32(ldns\_buffer \*buffer, uint32\_t data);

void ldns\_buffer\_write\_u32\_at(ldns\_buffer \*buffer, size\_t at, uint32\_t data);

## DESCRIPTION

*ldns\_buffer\_write\_at*() writes the given data to the buffer at the specified position .br **buffer**: the buffer .br **at**: the position (in number of bytes) to write the data at .br **data**: pointer to the data to write to the buffer .br **count**: the number of bytes of data to write

*ldns\_buffer\_write*() writes count bytes of data to the current position of the buffer .br **buffer**: the buffer .br **data**: the data to write .br **count**: the length of the data to write

*ldns\_buffer\_write\_string\_at*() copies the given (null-delimited) string to the specified position at the buffer .br **buffer**: the buffer .br **at**: the position in the buffer .br **str**: the string to write

*ldns\_buffer\_write\_string*() copies the given (null-delimited) string to the current position at the buffer .br **buffer**: the buffer .br **str**: the string to write

*ldns\_buffer\_write\_u8\_at*() writes the given byte of data at the given position in the buffer .br **buffer**: the buffer .br **at**: the position in the buffer .br **data**: the 8 bits to write

*ldns\_buffer\_write\_u8*() writes the given byte of data at the current position in the buffer .br **buffer**: the buffer .br **data**: the 8 bits to write

*ldns\_buffer\_write\_u16\_at*() writes the given 2 byte integer at the given position in the buffer .br **buffer**: the buffer .br **at**: the position in the buffer .br **data**: the 16 bits to write

*ldns\_buffer\_write\_u16*() writes the given 2 byte integer at the current position in the buffer .br **buffer**: the buffer .br **data**: the 16 bits to write

*ldns\_buffer\_read\_at*() copies count bytes of data at the given position to the given data-array .br **buffer**: the buffer .br **at**: the position in the buffer to start .br **data**: buffer to copy to .br **count**: the length of the data to copy

*ldns\_buffer\_read*() copies count bytes of data at the current position to the given data-array .br **buffer**: the buffer .br **data**: buffer to copy to .br **count**: the length of the data to copy

*ldns\_buffer\_read\_u8\_at*() returns the byte value at the given position in the buffer .br **buffer**: the buffer .br **at**: the position in the buffer .br Returns 1 byte integer

*ldns\_buffer\_read\_u8*() returns the byte value at the current position in the buffer .br **buffer**: the buffer .br Returns 1 byte integer

*ldns\_buffer\_read\_u16\_at*() returns the 2-byte integer value at the given position in the buffer .br **buffer**: the buffer .br **at**: position in the buffer .br Returns 2 byte integer

*ldns\_buffer\_read\_u16*() returns the 2-byte integer value at the current position in the buffer .br **buffer**: the buffer .br Returns 2 byte integer

*ldns\_buffer\_read\_u32\_at*() returns the 4-byte integer value at the given position in the buffer .br **buffer**: the buffer .br **at**: position in the buffer .br Returns 4 byte integer

*ldns\_buffer\_read\_u32*() returns the 4-byte integer value at the current position in the buffer .br **buffer**: the buffer .br Returns 4 byte integer

*ldns\_buffer\_write\_u32*() writes the given 4 byte integer at the current position in the buffer .br **buffer**: the buffer .br **data**: the 32 bits to write

*ldns\_buffer\_write\_u32\_at*() writes the given 4 byte integer at the given position in the buffer .br **buffer**: the buffer .br **at**: the position in the buffer .br **data**: the 32 bits to write

## AUTHOR

The ldns team at NLnet Labs.

## REPORTING BUGS

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.

## SEE ALSO

*ldns\_buffer*. And **perldoc Net::DNS**, **RFC1034**, **RFC1035**, **RFC4033**, **RFC4034**  and **RFC4035**.

## REMARKS

This manpage was automatically generated from the ldns source code.
