Lines Matching defs:pkt

33  *    resolver packet structure #lwres_lwpacket_t *pkt in network byte
38 * packet *pkt. The contents of the buffer b should correspond to a
46 * lightweight resolver packet *pkt both functions return
66 /*% transfers the contents of lightweight resolver packet structure lwres_lwpacket_t *pkt in network byte order to the lightweight resolver buffer, *b. */
69 lwres_lwpacket_renderheader(lwres_buffer_t *b, lwres_lwpacket_t *pkt) {
71 REQUIRE(pkt != NULL);
76 lwres_buffer_putuint32(b, pkt->length);
77 lwres_buffer_putuint16(b, pkt->version);
78 lwres_buffer_putuint16(b, pkt->pktflags);
79 lwres_buffer_putuint32(b, pkt->serial);
80 lwres_buffer_putuint32(b, pkt->opcode);
81 lwres_buffer_putuint32(b, pkt->result);
82 lwres_buffer_putuint32(b, pkt->recvlength);
83 lwres_buffer_putuint16(b, pkt->authtype);
84 lwres_buffer_putuint16(b, pkt->authlength);
89 /*% 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. */
92 lwres_lwpacket_parseheader(lwres_buffer_t *b, lwres_lwpacket_t *pkt) {
96 REQUIRE(pkt != NULL);
102 pkt->length = lwres_buffer_getuint32(b);
108 if (pkt->length > space)
110 pkt->version = lwres_buffer_getuint16(b);
111 pkt->pktflags = lwres_buffer_getuint16(b);
112 pkt->serial = lwres_buffer_getuint32(b);
113 pkt->opcode = lwres_buffer_getuint32(b);
114 pkt->result = lwres_buffer_getuint32(b);
115 pkt->recvlength = lwres_buffer_getuint32(b);
116 pkt->authtype = lwres_buffer_getuint16(b);
117 pkt->authlength = lwres_buffer_getuint16(b);