ReactOS  0.4.15-dev-449-g64abd9f
tditest.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS TDI test driver
4  * FILE: include/tditest.h
5  * PURPOSE: Testing TDI drivers
6  */
7 #ifndef __TDITEST_H
8 #define __TDITEST_H
9 
10 #include <ntddk.h>
11 #include <tdikrnl.h>
12 #include <tdiinfo.h>
13 #include "debug.h"
14 
15 
16 /* Name of UDP device */
17 #define UDP_DEVICE_NAME L"\\Device\\Udp"
18 
19 #ifdef i386
20 
21 /* DWORD network to host byte order conversion for i386 */
22 #define DN2H(dw) \
23  ((((dw) & 0xFF000000L) >> 24) | \
24  (((dw) & 0x00FF0000L) >> 8) | \
25  (((dw) & 0x0000FF00L) << 8) | \
26  (((dw) & 0x000000FFL) << 24))
27 
28 /* DWORD host to network byte order conversion for i386 */
29 #define DH2N(dw) \
30  ((((dw) & 0xFF000000L) >> 24) | \
31  (((dw) & 0x00FF0000L) >> 8) | \
32  (((dw) & 0x0000FF00L) << 8) | \
33  (((dw) & 0x000000FFL) << 24))
34 
35 /* WORD network to host order conversion for i386 */
36 #define WN2H(w) \
37  ((((w) & 0xFF00) >> 8) | \
38  (((w) & 0x00FF) << 8))
39 
40 /* WORD host to network byte order conversion for i386 */
41 #define WH2N(w) \
42  ((((w) & 0xFF00) >> 8) | \
43  (((w) & 0x00FF) << 8))
44 
45 #else /* i386 */
46 
47 /* DWORD network to host byte order conversion for other architectures */
48 #define DN2H(dw) \
49  (dw)
50 
51 /* DWORD host to network byte order conversion for other architectures */
52 #define DH2N(dw) \
53  (dw)
54 
55 /* WORD network to host order conversion for other architectures */
56 #define WN2H(w) \
57  (w)
58 
59 /* WORD host to network byte order conversion for other architectures */
60 #define WH2N(w) \
61  (w)
62 
63 #endif /* i386 */
64 
65 
66 typedef struct IPSNMP_INFO {
91 
92 typedef struct IPADDR_ENTRY {
93  ULONG Addr;
94  ULONG Index;
95  ULONG Mask;
99  USHORT Pad;
101 
102 
103 #define TL_INSTANCE 0
104 
105 #define IP_MIB_STATS_ID 0x1
106 #define IP_MIB_ADDRTABLE_ENTRY_ID 0x102
107 
108 
109 /* IOCTL codes */
110 #define IOCTL_TCP_QUERY_INFORMATION_EX \
111  CTL_CODE(FILE_DEVICE_NETWORK, 0, METHOD_NEITHER, FILE_ANY_ACCESS)
112 #define IOCTL_TCP_SET_INFORMATION_EX \
113  CTL_CODE(FILE_DEVICE_NETWORK, 1, METHOD_BUFFERED, FILE_WRITE_ACCESS)
114 
115 
116 #define TEST_PORT 2000
117 
118 #endif /*__TDITEST_H */
119 
120 /* EOF */
121 
ULONG ReasmFails
Definition: tditest.h:83
ULONG ReasmSize
Definition: afd.h:61
struct IPSNMP_INFO * PIPSNMP_INFO
struct IPADDR_ENTRY * PIPADDR_ENTRY
ULONG InAddrErrors
Definition: tditest.h:71
ULONG NumAddr
Definition: tditest.h:88
ULONG FragCreates
Definition: tditest.h:86
Definition: afd.h:56
ULONG NumRoutes
Definition: tditest.h:89
USHORT Context
Definition: afd.h:62
ULONG NumIf
Definition: tditest.h:87
ULONG InDelivers
Definition: tditest.h:75
struct IPSNMP_INFO IPSNMP_INFO
ULONG OutNoRoutes
Definition: tditest.h:79
ULONG Mask
Definition: afd.h:59
ULONG InDiscards
Definition: tditest.h:74
ULONG FragOks
Definition: tditest.h:84
ULONG BcastAddr
Definition: afd.h:60
ULONG OutRequests
Definition: tditest.h:76
ULONG Index
Definition: afd.h:58
ULONG Forwarding
Definition: tditest.h:67
ULONG ForwDatagrams
Definition: tditest.h:72
ULONG InReceives
Definition: tditest.h:69
ULONG DefaultTTL
Definition: tditest.h:68
ULONG ReasmTimeout
Definition: tditest.h:80
struct IPADDR_ENTRY IPADDR_ENTRY
unsigned short USHORT
Definition: pedump.c:61
ULONG InUnknownProtos
Definition: tditest.h:73
ULONG FragFails
Definition: tditest.h:85
USHORT Pad
Definition: afd.h:63
ULONG Addr
Definition: afd.h:57
ULONG OutDiscards
Definition: tditest.h:78
unsigned int ULONG
Definition: retypes.h:1
ULONG RoutingDiscards
Definition: tditest.h:77
ULONG InHdrErrors
Definition: tditest.h:70
ULONG ReasmOks
Definition: tditest.h:82
ULONG ReasmReqds
Definition: tditest.h:81