OSDN Git Service

Insert removed author attribution.
[mingw/mingw-org-wsl.git] / include / ddk / tdiinfo.h
1 /**
2  * @file tdiinfo.h
3  * @copy 2012 MinGW.org project
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 /* Created by Casper S. Hornstrup <chorns@users.sourceforge.net> */
25 #ifndef __TDIINFO_H
26 #define __TDIINFO_H
27 #pragma GCC system_header
28 #include <_mingw.h>
29
30 /*
31  * TDI set and query information interface
32  */
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #include "ntddk.h"
39
40 typedef struct TDIEntityID {
41   ULONG  tei_entity;
42   ULONG  tei_instance;
43 } TDIEntityID;
44
45 #define MAX_TDI_ENTITIES                  4096
46 #define INVALID_ENTITY_INSTANCE           -1
47 #define GENERIC_ENTITY                                      0
48 #define ENTITY_LIST_ID                                      0
49 #define ENTITY_TYPE_ID                                      1
50
51 #define AT_ENTITY                                                       0x280
52 #define CL_NL_ENTITY                                          0x301
53 #define CL_TL_ENTITY                                          0x401
54 #define CO_NL_ENTITY                                          0x300
55 #define CO_TL_ENTITY                                          0x400
56 #define ER_ENTITY                                                       0x380
57 #define IF_ENTITY                                                       0x200
58
59 #define AT_ARP                                                          0x280
60 #define AT_NULL                                                         0x282
61 #define CL_TL_NBF                                                       0x401
62 #define CL_TL_UDP                                                       0x403
63 #define CL_NL_IPX                                                       0x301
64 #define CL_NL_IP                                                        0x303
65 #define CO_TL_NBF                                                       0x400
66 #define CO_TL_SPX                                                       0x402
67 #define CO_TL_TCP                                                       0x404
68 #define CO_TL_SPP                                                       0x406
69 #define ER_ICMP                                                         0x380
70 #define IF_GENERIC                                                    0x200
71 #define IF_MIB                                                          0x202
72
73 /* TDIObjectID.toi_class constants */
74 #define INFO_CLASS_GENERIC                                0x100
75 #define INFO_CLASS_PROTOCOL                               0x200
76 #define INFO_CLASS_IMPLEMENTATION               0x300
77
78 /* TDIObjectID.toi_type constants */
79 #define INFO_TYPE_PROVIDER                                0x100
80 #define INFO_TYPE_ADDRESS_OBJECT                0x200
81 #define INFO_TYPE_CONNECTION                      0x300
82
83 typedef struct _TDIObjectID {
84         TDIEntityID  toi_entity;
85         ULONG  toi_class;
86         ULONG  toi_type;
87         ULONG  toi_id;
88 } TDIObjectID;
89
90 #define CONTEXT_SIZE                                          16
91
92 typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX {
93   TDIObjectID  ID;
94   ULONG_PTR  Context[CONTEXT_SIZE / sizeof(ULONG_PTR)];
95 } TCP_REQUEST_QUERY_INFORMATION_EX, *PTCP_REQUEST_QUERY_INFORMATION_EX;
96
97 #if defined(_WIN64)
98 typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX32 {
99   TDIObjectID  ID;
100   ULONG32  Context[CONTEXT_SIZE / sizeof(ULONG32)];
101 } TCP_REQUEST_QUERY_INFORMATION_EX32, *PTCP_REQUEST_QUERY_INFORMATION_EX32;
102 #endif /* _WIN64 */
103
104 typedef struct _TCP_REQUEST_SET_INFORMATION_EX {
105   TDIObjectID  ID;
106   UINT  BufferSize;
107   UCHAR  Buffer[1];
108 } TCP_REQUEST_SET_INFORMATION_EX, *PTCP_REQUEST_SET_INFORMATION_EX;
109
110 #ifdef __cplusplus
111 }
112 #endif
113
114 #endif /* __TDIINFO_H */