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 { lwres_uint32_t length; lwres_uint16_t version; lwres_uint16_t pktflags; lwres_uint32_t serial; lwres_uint32_t opcode; lwres_uint32_t result; lwres_uint32_t recvlength; lwres_uint16_t authtype; lwres_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.COPYRIGHT¶
Copyright © 2004, 2005, 2007, 2014 Internet Systems Consortium, Inc. ("ISC")Copyright © 2000, 2001 Internet Software Consortium.
June 18, 2007 | BIND9 |