int class, int type, const unsigned char *data,
unsigned char *buf, int buflen)
{
- HEADER *hp;
+ UHEADER *hp;
unsigned char *cp;
int n;
unsigned char *dnptrs[20], **dpp, **lastdnptr;
if ((buf == NULL) || (buflen < HFIXEDSZ))
return -1;
memset (buf, 0, HFIXEDSZ);
- hp = (HEADER *) buf;
+ hp = (UHEADER *) buf;
/* We randomize the IDs every time. The old code just incremented
by one after the initial randomization which still predictable if
the application does multiple requests. */
int n0, unsigned char *buf, int buflen, int anslen)
{
uint16_t flags = 0;
- HEADER *hp = (HEADER *) buf;
+ UHEADER *hp = (UHEADER *) buf;
unsigned char *cp = buf + n0;
unsigned char *ep = buf + buflen;
/* Only header section present in replies to dynamic update
packets. */
- if ((((HEADER *) buf1)->opcode == ns_o_update) &&
- (((HEADER *) buf2)->opcode == ns_o_update))
+ if ((((UHEADER *) buf1)->opcode == ns_o_update) &&
+ (((UHEADER *) buf2)->opcode == ns_o_update))
return 1;
/* Note that we initially do not convert QDCOUNT to the host byte
order. We can compare it with the second buffer's QDCOUNT
value without doing this. */
- int qdcount = ((HEADER *) buf1)->qdcount;
+ int qdcount = ((UHEADER *) buf1)->qdcount;
if (qdcount != ((UHEADER *) buf2)->qdcount)
return 0;