From 3809c7a1bc8c35bed4850eb4761c62a38b3cb4a5 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Mon, 23 Feb 2015 21:43:14 +0100 Subject: [PATCH] include: Complete and properly pack DNS_HEADER structure. --- include/windns.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/include/windns.h b/include/windns.h index b8a3e0934e1..fc2a49c5399 100644 --- a/include/windns.h +++ b/include/windns.h @@ -176,22 +176,26 @@ typedef struct _IP4_ARRAY IP4_ADDRESS AddrArray[1]; } IP4_ARRAY, *PIP4_ARRAY; +#include typedef struct _DNS_HEADER { WORD Xid; - BYTE RecursionDesired; - BYTE Truncation; - BYTE Authoritative; - BYTE Opcode; - BYTE IsResponse; - BYTE ResponseCode; - BYTE Reserved; - BYTE RecursionAvailable; + BYTE RecursionDesired:1; + BYTE Truncation:1; + BYTE Authoritative:1; + BYTE Opcode:4; + BYTE IsResponse:1; + BYTE ResponseCode:4; + BYTE CheckingDisabled:1; + BYTE AuthenticatedData:1; + BYTE Reserved:1; + BYTE RecursionAvailable:1; WORD QuestionCount; WORD AnswerCount; WORD NameServerCount; WORD AdditionalCount; } DNS_HEADER, *PDNS_HEADER; +#include typedef struct _DNS_MESSAGE_BUFFER {