table of contents
- stretch 1:9.10.3.dfsg.P4-12.3+deb9u4
- testing 1:9.11.5.P4+dfsg-5
- stretch-backports 1:9.11.5.P4+dfsg-5~bpo9+1
- unstable 1:9.11.5.P4+dfsg-5.1
LWRES_PACKET(3) | BIND9 | LWRES_PACKET(3) |
NAME¶
lwres_lwpacket_renderheader, lwres_lwpacket_parseheader - lightweight resolver packet handling functionsSYNOPSIS¶
#include <lwres/lwpacket.h>
lwres_result_t lwres_lwpacket_renderheader(lwres_buffer_t *b, lwres_lwpacket_t *pkt);
lwres_result_t lwres_lwpacket_parseheader(lwres_buffer_t *b, lwres_lwpacket_t *pkt);
DESCRIPTION¶
These functions rely on a struct lwres_lwpacket which is defined in lwres/lwpacket.h.typedef struct lwres_lwpacket lwres_lwpacket_t;
struct lwres_lwpacket { uint32_t length; uint16_t version; uint16_t pktflags; uint32_t serial; uint32_t opcode; uint32_t result; uint32_t recvlength; uint16_t authtype; uint16_t authlength; };
The elements of this structure are:
length
version
pktflags
serial
opcode
result
recvlength
authtype
authlen
The following opcodes are currently defined:
NOOP
GETADDRSBYNAME
GETNAMEBYADDR
lwres_lwpacket_renderheader() transfers the contents of lightweight resolver packet structure lwres_lwpacket_t*pkt in network byte order to the lightweight resolver buffer, *b.
lwres_lwpacket_parseheader() performs the converse operation. It transfers data in network byte order from buffer *b to resolver packet *pkt. The contents of the buffer b should correspond to a lwres_lwpacket_t.
RETURN VALUES¶
Successful calls to lwres_lwpacket_renderheader() and lwres_lwpacket_parseheader() return LWRES_R_SUCCESS. If there is insufficient space to copy data between the buffer *b and lightweight resolver packet *pkt both functions return LWRES_R_UNEXPECTEDEND.AUTHOR¶
Internet Systems Consortium, Inc.COPYRIGHT¶
Copyright © 2000, 2001, 2004, 2005, 2007, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")2007-06-18 | ISC |