Added patch to complete and properly pack DNS_HEADER structure (by Amine Khaldi, wine-patched/pull/6).

This commit is contained in:
Sebastian Lackner
2015-02-23 22:24:17 +01:00
parent eaefcc8a3f
commit 8b3e8d11a8
3 changed files with 80 additions and 12 deletions

View File

@@ -0,0 +1,51 @@
From de201e9e2b3e42200249f2693ef338e319f00e2c Mon Sep 17 00:00:00 2001
From: Amine Khaldi <amine.khaldi@reactos.org>
Date: Mon, 23 Feb 2015 21:43:14 +0100
Subject: include/windns.h: 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 b8a3e09..fc2a49c 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 <pshpack1.h>
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 <poppack.h>
typedef struct _DNS_MESSAGE_BUFFER
{
--
2.3.0