---
name: "ldns_buffer2pkt_wire"
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_buffer2pkt_wire"
---

# ldns\_buffer2pkt\_wire(3)

convert buffer/wire format to ldns\_pkt

## NAME

ldns\_buffer2pkt\_wire - convert buffer/wire format to ldns\_pkt

## SYNOPSIS

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

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

ldns\_status ldns\_buffer2pkt\_wire(ldns\_pkt \*\*packet, const ldns\_buffer \*buffer);

## DESCRIPTION

*ldns\_buffer2pkt\_wire*() converts the data in the ldns\_buffer (in wire format) to a DNS packet. This function will initialize and allocate memory space for the packet  structure.

.br **packet**: pointer to the structure to hold the packet .br **buffer**: the buffer with the data .br Returns LDNS\_STATUS\_OK if everything succeeds, error otherwise

## 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

**perldoc Net::DNS**, **RFC1034**, **RFC1035**, **RFC4033**, **RFC4034** and **RFC4035**.

## REMARKS

This manpage was automatically generated from the ldns source code.
