OSDN Git Service

Apply LICENSE to all files as appropriate.
[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 /*
25  * tdiinfo.h
26  *
27  * TDI set and query information interface
28  *
29  * This file is part of the w32api package.
30  *
31  * Contributors:
32  *   Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
33  *
34  * THIS SOFTWARE IS NOT COPYRIGHTED
35  *
36  * This source code is offered for use in the public domain. You may
37  * use, modify or distribute it freely.
38  *
39  * This code is distributed in the hope that it will be useful but
40  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
41  * DISCLAIMED. This includes but is not limited to warranties of
42  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
43  *
44  */
45
46 #ifndef __TDIINFO_H
47 #define __TDIINFO_H
48 #pragma GCC system_header
49
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 #include "ntddk.h"
55
56 typedef struct TDIEntityID {
57   ULONG  tei_entity;
58   ULONG  tei_instance;
59 } TDIEntityID;
60
61 #define MAX_TDI_ENTITIES                  4096
62 #define INVALID_ENTITY_INSTANCE           -1
63 #define GENERIC_ENTITY                                      0
64 #define ENTITY_LIST_ID                                      0
65 #define ENTITY_TYPE_ID                                      1
66
67 #define AT_ENTITY                                                       0x280
68 #define CL_NL_ENTITY                                          0x301
69 #define CL_TL_ENTITY                                          0x401
70 #define CO_NL_ENTITY                                          0x300
71 #define CO_TL_ENTITY                                          0x400
72 #define ER_ENTITY                                                       0x380
73 #define IF_ENTITY                                                       0x200
74
75 #define AT_ARP                                                          0x280
76 #define AT_NULL                                                         0x282
77 #define CL_TL_NBF                                                       0x401
78 #define CL_TL_UDP                                                       0x403
79 #define CL_NL_IPX                                                       0x301
80 #define CL_NL_IP                                                        0x303
81 #define CO_TL_NBF                                                       0x400
82 #define CO_TL_SPX                                                       0x402
83 #define CO_TL_TCP                                                       0x404
84 #define CO_TL_SPP                                                       0x406
85 #define ER_ICMP                                                         0x380
86 #define IF_GENERIC                                                    0x200
87 #define IF_MIB                                                          0x202
88
89 /* TDIObjectID.toi_class constants */
90 #define INFO_CLASS_GENERIC                                0x100
91 #define INFO_CLASS_PROTOCOL                               0x200
92 #define INFO_CLASS_IMPLEMENTATION               0x300
93
94 /* TDIObjectID.toi_type constants */
95 #define INFO_TYPE_PROVIDER                                0x100
96 #define INFO_TYPE_ADDRESS_OBJECT                0x200
97 #define INFO_TYPE_CONNECTION                      0x300
98
99 typedef struct _TDIObjectID {
100         TDIEntityID  toi_entity;
101         ULONG  toi_class;
102         ULONG  toi_type;
103         ULONG  toi_id;
104 } TDIObjectID;
105
106 #define CONTEXT_SIZE                                          16
107
108 typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX {
109   TDIObjectID  ID;
110   ULONG_PTR  Context[CONTEXT_SIZE / sizeof(ULONG_PTR)];
111 } TCP_REQUEST_QUERY_INFORMATION_EX, *PTCP_REQUEST_QUERY_INFORMATION_EX;
112
113 #if defined(_WIN64)
114 typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX32 {
115   TDIObjectID  ID;
116   ULONG32  Context[CONTEXT_SIZE / sizeof(ULONG32)];
117 } TCP_REQUEST_QUERY_INFORMATION_EX32, *PTCP_REQUEST_QUERY_INFORMATION_EX32;
118 #endif /* _WIN64 */
119
120 typedef struct _TCP_REQUEST_SET_INFORMATION_EX {
121   TDIObjectID  ID;
122   UINT  BufferSize;
123   UCHAR  Buffer[1];
124 } TCP_REQUEST_SET_INFORMATION_EX, *PTCP_REQUEST_SET_INFORMATION_EX;
125
126 #ifdef __cplusplus
127 }
128 #endif
129
130 #endif /* __TDIINFO_H */