Lines Matching defs:pkt
42 * resolver packet structure #lwres_lwpacket_t *pkt in network byte
47 * packet *pkt. The contents of the buffer b should correspond to a
55 * lightweight resolver packet *pkt both functions return
75 /*% transfers the contents of lightweight resolver packet structure lwres_lwpacket_t *pkt in network byte order to the lightweight resolver buffer, *b. */
78 lwres_lwpacket_renderheader(lwres_buffer_t *b, lwres_lwpacket_t *pkt) {
80 REQUIRE(pkt != NULL);
85 lwres_buffer_putuint32(b, pkt->length);
86 lwres_buffer_putuint16(b, pkt->version);
87 lwres_buffer_putuint16(b, pkt->pktflags);
88 lwres_buffer_putuint32(b, pkt->serial);
89 lwres_buffer_putuint32(b, pkt->opcode);
90 lwres_buffer_putuint32(b, pkt->result);
91 lwres_buffer_putuint32(b, pkt->recvlength);
92 lwres_buffer_putuint16(b, pkt->authtype);
93 lwres_buffer_putuint16(b, pkt->authlength);
98 /*% 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. */
101 lwres_lwpacket_parseheader(lwres_buffer_t *b, lwres_lwpacket_t *pkt) {
105 REQUIRE(pkt != NULL);
111 pkt->length = lwres_buffer_getuint32(b);
117 if (pkt->length > space)
119 pkt->version = lwres_buffer_getuint16(b);
120 pkt->pktflags = lwres_buffer_getuint16(b);
121 pkt->serial = lwres_buffer_getuint32(b);
122 pkt->opcode = lwres_buffer_getuint32(b);
123 pkt->result = lwres_buffer_getuint32(b);
124 pkt->recvlength = lwres_buffer_getuint32(b);
125 pkt->authtype = lwres_buffer_getuint16(b);
126 pkt->authlength = lwres_buffer_getuint16(b);