1 | /*
|
---|
2 | * ndis.h
|
---|
3 | *
|
---|
4 | * Network Device Interface Specification definitions
|
---|
5 | *
|
---|
6 | * This file is part of the ReactOS DDK package.
|
---|
7 | *
|
---|
8 | * Contributors:
|
---|
9 | * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
---|
10 | *
|
---|
11 | * THIS SOFTWARE IS NOT COPYRIGHTED
|
---|
12 | *
|
---|
13 | * This source code is offered for use in the public domain. You may
|
---|
14 | * use, modify or distribute it freely.
|
---|
15 | *
|
---|
16 | * This code is distributed in the hope that it will be useful but
|
---|
17 | * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
---|
18 | * DISCLAIMED. This includes but is not limited to warranties of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
---|
20 | *
|
---|
21 | * DEFINES: i386 - Target platform is i386
|
---|
22 | * NDIS_WRAPPER - Define only for NDIS library
|
---|
23 | * NDIS_MINIPORT_DRIVER - Define only for NDIS miniport drivers
|
---|
24 | * NDIS40 - Use NDIS 4.0 structures by default
|
---|
25 | * NDIS50 - Use NDIS 5.0 structures by default
|
---|
26 | * NDIS51 - Use NDIS 5.1 structures by default
|
---|
27 | * NDIS40_MINIPORT - Building NDIS 4.0 miniport driver
|
---|
28 | * NDIS50_MINIPORT - Building NDIS 5.0 miniport driver
|
---|
29 | * NDIS51_MINIPORT - Building NDIS 5.1 miniport driver
|
---|
30 | */
|
---|
31 |
|
---|
32 | #ifndef _NDIS_
|
---|
33 | #define _NDIS_
|
---|
34 |
|
---|
35 | #ifndef NDIS_WDM
|
---|
36 | #define NDIS_WDM 0
|
---|
37 | #endif
|
---|
38 |
|
---|
39 | #include "ntddk.h"
|
---|
40 | #include "netpnp.h"
|
---|
41 | #include "ntstatus.h"
|
---|
42 | #include "netevent.h"
|
---|
43 | #include <qos.h>
|
---|
44 |
|
---|
45 | typedef int NDIS_STATUS, *PNDIS_STATUS;
|
---|
46 |
|
---|
47 | #include "ntddndis.h"
|
---|
48 |
|
---|
49 | #if !defined(_WINDEF_H)
|
---|
50 | typedef unsigned int UINT, *PUINT;
|
---|
51 | #endif
|
---|
52 |
|
---|
53 | #ifdef __cplusplus
|
---|
54 | extern "C" {
|
---|
55 | #endif
|
---|
56 |
|
---|
57 | #ifndef __NET_PNP__
|
---|
58 | #define __NET_PNP__
|
---|
59 |
|
---|
60 | typedef enum _NET_DEVICE_POWER_STATE {
|
---|
61 | NetDeviceStateUnspecified = 0,
|
---|
62 | NetDeviceStateD0,
|
---|
63 | NetDeviceStateD1,
|
---|
64 | NetDeviceStateD2,
|
---|
65 | NetDeviceStateD3,
|
---|
66 | NetDeviceStateMaximum
|
---|
67 | } NET_DEVICE_POWER_STATE, *PNET_DEVICE_POWER_STATE;
|
---|
68 |
|
---|
69 | typedef enum _NET_PNP_EVENT_CODE {
|
---|
70 | NetEventSetPower,
|
---|
71 | NetEventQueryPower,
|
---|
72 | NetEventQueryRemoveDevice,
|
---|
73 | NetEventCancelRemoveDevice,
|
---|
74 | NetEventReconfigure,
|
---|
75 | NetEventBindList,
|
---|
76 | NetEventBindsComplete,
|
---|
77 | NetEventPnPCapabilities,
|
---|
78 | NetEventPause,
|
---|
79 | NetEventRestart,
|
---|
80 | NetEventPortActivation,
|
---|
81 | NetEventPortDeactivation,
|
---|
82 | NetEventIMReEnableDevice,
|
---|
83 | NetEventMaximum
|
---|
84 | } NET_PNP_EVENT_CODE, *PNET_PNP_EVENT_CODE;
|
---|
85 |
|
---|
86 | typedef struct _NET_PNP_EVENT {
|
---|
87 | NET_PNP_EVENT_CODE NetEvent;
|
---|
88 | PVOID Buffer;
|
---|
89 | ULONG BufferLength;
|
---|
90 | ULONG_PTR NdisReserved[4];
|
---|
91 | ULONG_PTR TransportReserved[4];
|
---|
92 | ULONG_PTR TdiReserved[4];
|
---|
93 | ULONG_PTR TdiClientReserved[4];
|
---|
94 | } NET_PNP_EVENT, *PNET_PNP_EVENT;
|
---|
95 |
|
---|
96 | #endif /* __NET_PNP__ */
|
---|
97 |
|
---|
98 | #if !defined(NDIS_WRAPPER)
|
---|
99 |
|
---|
100 | #if (defined(NDIS_MINIPORT_MAJOR_VERSION) || \
|
---|
101 | (defined(NDIS_MINIPORT_MINOR_VERSION)) || \
|
---|
102 | (defined(NDIS_PROTOCOL_MAJOR_VERSION)) || \
|
---|
103 | (defined(NDIS_PROTOCOL_MINOR_VERSION)) || \
|
---|
104 | (defined(NDIS_FILTER_MAJOR_VERSION)) || \
|
---|
105 | (defined(NDIS_FILTER_MINOR_VERSION)))
|
---|
106 | #error "Driver should not redefine NDIS reserved macros"
|
---|
107 | #endif
|
---|
108 |
|
---|
109 | #if defined(NDIS_MINIPORT_DRIVER)
|
---|
110 |
|
---|
111 | #if defined(NDIS620_MINIPORT)
|
---|
112 | #define NDIS_MINIPORT_MAJOR_VERSION 6
|
---|
113 | #define NDIS_MINIPORT_MINOR_VERSION 20
|
---|
114 | #elif defined(NDIS61_MINIPORT)
|
---|
115 | #define NDIS_MINIPORT_MAJOR_VERSION 6
|
---|
116 | #define NDIS_MINIPORT_MINOR_VERSION 1
|
---|
117 | #elif defined(NDIS60_MINIPORT)
|
---|
118 | #define NDIS_MINIPORT_MAJOR_VERSION 6
|
---|
119 | #define NDIS_MINIPORT_MINOR_VERSION 0
|
---|
120 | #elif defined(NDIS51_MINIPORT)
|
---|
121 | #define NDIS_MINIPORT_MAJOR_VERSION 5
|
---|
122 | #define NDIS_MINIPORT_MINOR_VERSION 1
|
---|
123 | #elif defined(NDIS50_MINIPORT)
|
---|
124 | #define NDIS_MINIPORT_MAJOR_VERSION 5
|
---|
125 | #define NDIS_MINIPORT_MINOR_VERSION 0
|
---|
126 | #else
|
---|
127 | #error "Only NDIS miniport drivers with version >= 5 are supported"
|
---|
128 | #endif
|
---|
129 |
|
---|
130 | #if ((NDIS_MINIPORT_MAJOR_VERSION == 6) && \
|
---|
131 | (NDIS_MINIPORT_MINOR_VERSION != 20) && \
|
---|
132 | (NDIS_MINIPORT_MINOR_VERSION != 1) && \
|
---|
133 | (NDIS_MINIPORT_MINOR_VERSION != 0))
|
---|
134 | #error "Invalid miniport major/minor version combination"
|
---|
135 | #elif ((NDIS_MINIPORT_MAJOR_VERSION == 5) && \
|
---|
136 | (NDIS_MINIPORT_MINOR_VERSION != 1) && \
|
---|
137 | (NDIS_MINIPORT_MINOR_VERSION != 0))
|
---|
138 | #error "Invalid miniport major/minor version combination"
|
---|
139 | #endif
|
---|
140 |
|
---|
141 | #if (NDIS_MINIPORT_MAJOR_VERSION == 6) && \
|
---|
142 | ((NDIS_MINIPORT_MINOR_VERSION == 20 && NTDDI_VERSION < NTDDI_WIN7) || \
|
---|
143 | (NDIS_MINIPORT_MINOR_VERSION == 1 && NTDDI_VERSION < NTDDI_VISTA) || \
|
---|
144 | (NDIS_MINIPORT_MINOR_VERSION == 0 && NTDDI_VERSION < NTDDI_VISTA))
|
---|
145 | #error "Wrong NDIS/DDI version"
|
---|
146 | #elif ((NDIS_MINIPORT_MAJOR_VERSION == 5) && \
|
---|
147 | (((NDIS_MINIPORT_MINOR_VERSION == 1) && (NTDDI_VERSION < NTDDI_WINXP)) || \
|
---|
148 | ((NDIS_MINIPORT_MINOR_VERSION == 0) && (NTDDI_VERSION < NTDDI_WIN2K))))
|
---|
149 | #error "Wrong NDIS/DDI version"
|
---|
150 | #endif
|
---|
151 |
|
---|
152 |
|
---|
153 | #endif /* defined(NDIS_MINIPORT_DRIVER) */
|
---|
154 |
|
---|
155 | #if defined(NDIS30)
|
---|
156 | #error "Only NDIS Protocol drivers version 4 or later are supported"
|
---|
157 | #endif
|
---|
158 |
|
---|
159 | #if defined(NDIS620)
|
---|
160 | #define NDIS_PROTOCOL_MAJOR_VERSION 6
|
---|
161 | #define NDIS_PROTOCOL_MINOR_VERSION 20
|
---|
162 | #define NDIS_FILTER_MAJOR_VERSION 6
|
---|
163 | #define NDIS_FILTER_MINOR_VERSION 20
|
---|
164 | #elif defined(NDIS61)
|
---|
165 | #define NDIS_PROTOCOL_MAJOR_VERSION 6
|
---|
166 | #define NDIS_PROTOCOL_MINOR_VERSION 1
|
---|
167 | #define NDIS_FILTER_MAJOR_VERSION 6
|
---|
168 | #define NDIS_FILTER_MINOR_VERSION 1
|
---|
169 | #elif defined(NDIS60)
|
---|
170 | #define NDIS_PROTOCOL_MAJOR_VERSION 6
|
---|
171 | #define NDIS_PROTOCOL_MINOR_VERSION 0
|
---|
172 | #define NDIS_FILTER_MAJOR_VERSION 6
|
---|
173 | #define NDIS_FILTER_MINOR_VERSION 0
|
---|
174 | #elif defined(NDIS51)
|
---|
175 | #define NDIS_PROTOCOL_MAJOR_VERSION 5
|
---|
176 | #define NDIS_PROTOCOL_MINOR_VERSION 1
|
---|
177 | #elif defined(NDIS50)
|
---|
178 | #define NDIS_PROTOCOL_MAJOR_VERSION 5
|
---|
179 | #define NDIS_PROTOCOL_MINOR_VERSION 0
|
---|
180 | #elif defined(NDIS40)
|
---|
181 | #define NDIS_PROTOCOL_MAJOR_VERSION 4
|
---|
182 | #define NDIS_PROTOCOL_MINOR_VERSION 0
|
---|
183 | #endif
|
---|
184 |
|
---|
185 | #if !defined(NDIS_MINIPORT_DRIVER) && !defined(NDIS_PROTOCOL_MAJOR_VERSION)
|
---|
186 | #define NDIS40
|
---|
187 | #define NDIS_PROTOCOL_MAJOR_VERSION 4
|
---|
188 | #define NDIS_PROTOCOL_MINOR_VERSION 0
|
---|
189 | #endif
|
---|
190 |
|
---|
191 | #if defined(NDIS_FILTER_MAJOR_VERSION)
|
---|
192 |
|
---|
193 | #if ((NDIS_FILTER_MAJOR_VERSION == 6) && \
|
---|
194 | (NDIS_FILTER_MINOR_VERSION != 20) && \
|
---|
195 | (NDIS_FILTER_MINOR_VERSION != 1) && \
|
---|
196 | (NDIS_FILTER_MINOR_VERSION != 0))
|
---|
197 | #error "Invalid Filter version"
|
---|
198 | #endif
|
---|
199 |
|
---|
200 | #endif /* defined(NDIS_FILTER_MAJOR_VERSION) */
|
---|
201 |
|
---|
202 |
|
---|
203 | #if defined(NDIS_PROTOCOL_MAJOR_VERSION)
|
---|
204 |
|
---|
205 | #if ((NDIS_PROTOCOL_MAJOR_VERSION == 6) && \
|
---|
206 | (NDIS_PROTOCOL_MINOR_VERSION != 20) && \
|
---|
207 | (NDIS_PROTOCOL_MINOR_VERSION != 1) && \
|
---|
208 | (NDIS_PROTOCOL_MINOR_VERSION != 0))
|
---|
209 | #error "Invalid Protocol version"
|
---|
210 | #elif ((NDIS_PROTOCOL_MAJOR_VERSION == 5) && \
|
---|
211 | (NDIS_PROTOCOL_MINOR_VERSION != 1) && (NDIS_PROTOCOL_MINOR_VERSION != 0))
|
---|
212 | #error "Invalid Protocol version"
|
---|
213 | #elif ((NDIS_PROTOCOL_MAJOR_VERSION == 4) && (NDIS_PROTOCOL_MINOR_VERSION != 0))
|
---|
214 | #error "Invalid Protocol major/minor version"
|
---|
215 | #endif
|
---|
216 |
|
---|
217 | #if ((NDIS_PROTOCOL_MAJOR_VERSION == 6) && (NTDDI_VERSION < NTDDI_VISTA))
|
---|
218 | #error "Wrong NDIS/DDI version"
|
---|
219 | #endif
|
---|
220 |
|
---|
221 | #endif /* defined(NDIS_PROTOCOL_MAJOR_VERSION) */
|
---|
222 |
|
---|
223 | #endif /* !defined(NDIS_WRAPPER) */
|
---|
224 |
|
---|
225 | #if !defined(NDIS_LEGACY_MINIPORT)
|
---|
226 |
|
---|
227 | #if ((defined(NDIS_MINIPORT_DRIVER) && (NDIS_MINIPORT_MAJOR_VERSION < 6)) || NDIS_WRAPPER)
|
---|
228 | #define NDIS_LEGACY_MINIPORT 1
|
---|
229 | #else
|
---|
230 | #define NDIS_LEGACY_MINIPORT 0
|
---|
231 | #endif
|
---|
232 |
|
---|
233 | #endif /* !defined(NDIS_LEGACY_MINIPORT) */
|
---|
234 |
|
---|
235 | #if !defined(NDIS_LEGACY_PROTOCOL)
|
---|
236 |
|
---|
237 | #if ((defined(NDIS_PROTOCOL_MAJOR_VERSION) && (NDIS_PROTOCOL_MAJOR_VERSION < 6)) || NDIS_WRAPPER)
|
---|
238 | #define NDIS_LEGACY_PROTOCOL 1
|
---|
239 | #else
|
---|
240 | #define NDIS_LEGACY_PROTOCOL 0
|
---|
241 | #endif
|
---|
242 |
|
---|
243 | #endif /* !defined(NDIS_LEGACY_PROTOCOL) */
|
---|
244 |
|
---|
245 | #if !defined(NDIS_LEGACY_DRIVER)
|
---|
246 |
|
---|
247 | #if (NDIS_LEGACY_MINIPORT || NDIS_LEGACY_PROTOCOL || NDIS_WRAPPER)
|
---|
248 | #define NDIS_LEGACY_DRIVER 1
|
---|
249 | #else
|
---|
250 | #define NDIS_LEGACY_DRIVER 0
|
---|
251 | #endif
|
---|
252 |
|
---|
253 | #endif /* !defined(NDIS_LEGACY_DRIVER) */
|
---|
254 |
|
---|
255 | #if !defined(NDIS_SUPPORT_NDIS6)
|
---|
256 |
|
---|
257 | #if ((defined (NDIS_MINIPORT_MAJOR_VERSION) && (NDIS_MINIPORT_MAJOR_VERSION >= 6)) || \
|
---|
258 | (defined (NDIS60)) || NDIS_WRAPPER)
|
---|
259 | #define NDIS_SUPPORT_NDIS6 1
|
---|
260 | #else
|
---|
261 | #define NDIS_SUPPORT_NDIS6 0
|
---|
262 | #endif
|
---|
263 |
|
---|
264 | #endif /* !defined(NDIS_SUPPORT_NDIS6) */
|
---|
265 |
|
---|
266 | #if !defined(NDIS_SUPPORT_NDIS61)
|
---|
267 | #if (((defined (NDIS_MINIPORT_MAJOR_VERSION) && (NDIS_MINIPORT_MAJOR_VERSION >= 6)) && \
|
---|
268 | (defined (NDIS_MINIPORT_MINOR_VERSION) && (NDIS_MINIPORT_MINOR_VERSION >= 1))) || \
|
---|
269 | (defined (NDIS61)) || NDIS_WRAPPER)
|
---|
270 | #define NDIS_SUPPORT_NDIS61 1
|
---|
271 | #else
|
---|
272 | #define NDIS_SUPPORT_NDIS61 0
|
---|
273 | #endif
|
---|
274 | #endif /* !defined(NDIS_SUPPORT_NDIS61) */
|
---|
275 |
|
---|
276 | #if !defined(NDIS_SUPPORT_NDIS620)
|
---|
277 |
|
---|
278 | #if (((defined (NDIS_MINIPORT_MAJOR_VERSION) && (NDIS_MINIPORT_MAJOR_VERSION >= 6)) && \
|
---|
279 | (defined (NDIS_MINIPORT_MINOR_VERSION) && (NDIS_MINIPORT_MINOR_VERSION >= 20))) || \
|
---|
280 | (defined (NDIS620)) || NDIS_WRAPPER)
|
---|
281 | #define NDIS_SUPPORT_NDIS620 1
|
---|
282 | #else
|
---|
283 | #define NDIS_SUPPORT_NDIS620 0
|
---|
284 | #endif
|
---|
285 |
|
---|
286 | #endif /* !defined(NDIS_SUPPORT_NDIS620) */
|
---|
287 |
|
---|
288 | #if (NDIS_SUPPORT_NDIS620)
|
---|
289 | #undef NDIS_SUPPORT_NDIS61
|
---|
290 | #define NDIS_SUPPORT_NDIS61 1
|
---|
291 | #endif
|
---|
292 |
|
---|
293 | #if (NDIS_SUPPORT_NDIS61)
|
---|
294 | #undef NDIS_SUPPORT_NDIS6
|
---|
295 | #define NDIS_SUPPORT_NDIS6 1
|
---|
296 | #endif
|
---|
297 |
|
---|
298 | #if defined(NDIS61_MINIPORT) || defined(NDIS60_MINIPORT) || defined(NDIS61) || \
|
---|
299 | defined(NDIS60) || defined(NDIS_WRAPPER) || defined(NDIS_LEGACY_DRIVER)
|
---|
300 | #define NDIS_SUPPORT_60_COMPATIBLE_API 1
|
---|
301 | #else
|
---|
302 | #define NDIS_SUPPORT_60_COMPATIBLE_API 0
|
---|
303 | #endif
|
---|
304 |
|
---|
305 | #if defined(NDIS_WRAPPER)
|
---|
306 | #define NDISAPI
|
---|
307 | #else
|
---|
308 | #define NDISAPI DECLSPEC_IMPORT
|
---|
309 | #endif
|
---|
310 |
|
---|
311 | typedef PVOID QUEUED_CLOSE; //FIXME : Doesn't exist in public headers
|
---|
312 |
|
---|
313 | typedef struct _X_FILTER FDDI_FILTER, *PFDDI_FILTER;
|
---|
314 | typedef struct _X_FILTER TR_FILTER, *PTR_FILTER;
|
---|
315 | typedef struct _X_FILTER NULL_FILTER, *PNULL_FILTER;
|
---|
316 |
|
---|
317 | typedef struct _NDIS_MINIPORT_BLOCK NDIS_MINIPORT_BLOCK, *PNDIS_MINIPORT_BLOCK;
|
---|
318 |
|
---|
319 | typedef struct _REFERENCE {
|
---|
320 | KSPIN_LOCK SpinLock;
|
---|
321 | USHORT ReferenceCount;
|
---|
322 | BOOLEAN Closing;
|
---|
323 | } REFERENCE, *PREFERENCE;
|
---|
324 |
|
---|
325 | /* NDIS base types */
|
---|
326 |
|
---|
327 | typedef struct _NDIS_SPIN_LOCK {
|
---|
328 | KSPIN_LOCK SpinLock;
|
---|
329 | KIRQL OldIrql;
|
---|
330 | } NDIS_SPIN_LOCK, *PNDIS_SPIN_LOCK;
|
---|
331 |
|
---|
332 | typedef struct _NDIS_EVENT {
|
---|
333 | KEVENT Event;
|
---|
334 | } NDIS_EVENT, *PNDIS_EVENT;
|
---|
335 |
|
---|
336 | typedef PVOID NDIS_HANDLE, *PNDIS_HANDLE;
|
---|
337 |
|
---|
338 | typedef ANSI_STRING NDIS_ANSI_STRING, *PNDIS_ANSI_STRING;
|
---|
339 | typedef UNICODE_STRING NDIS_STRING, *PNDIS_STRING;
|
---|
340 |
|
---|
341 | typedef MDL NDIS_BUFFER, *PNDIS_BUFFER;
|
---|
342 |
|
---|
343 | /* NDIS_STATUS constants */
|
---|
344 | #define NDIS_STATUS_SUCCESS ((NDIS_STATUS)STATUS_SUCCESS)
|
---|
345 | #define NDIS_STATUS_PENDING ((NDIS_STATUS)STATUS_PENDING)
|
---|
346 | #define NDIS_STATUS_NOT_RECOGNIZED ((NDIS_STATUS)0x00010001L)
|
---|
347 | #define NDIS_STATUS_NOT_COPIED ((NDIS_STATUS)0x00010002L)
|
---|
348 | #define NDIS_STATUS_NOT_ACCEPTED ((NDIS_STATUS)0x00010003L)
|
---|
349 | #define NDIS_STATUS_CALL_ACTIVE ((NDIS_STATUS)0x00010007L)
|
---|
350 | #define NDIS_STATUS_INDICATION_REQUIRED ((NDIS_STATUS)STATUS_NDIS_INDICATION_REQUIRED)
|
---|
351 | #define NDIS_STATUS_ONLINE ((NDIS_STATUS)0x40010003L)
|
---|
352 | #define NDIS_STATUS_RESET_START ((NDIS_STATUS)0x40010004L)
|
---|
353 | #define NDIS_STATUS_RESET_END ((NDIS_STATUS)0x40010005L)
|
---|
354 | #define NDIS_STATUS_RING_STATUS ((NDIS_STATUS)0x40010006L)
|
---|
355 | #define NDIS_STATUS_CLOSED ((NDIS_STATUS)0x40010007L)
|
---|
356 | #define NDIS_STATUS_WAN_LINE_UP ((NDIS_STATUS)0x40010008L)
|
---|
357 | #define NDIS_STATUS_WAN_LINE_DOWN ((NDIS_STATUS)0x40010009L)
|
---|
358 | #define NDIS_STATUS_WAN_FRAGMENT ((NDIS_STATUS)0x4001000AL)
|
---|
359 | #define NDIS_STATUS_MEDIA_CONNECT ((NDIS_STATUS)0x4001000BL)
|
---|
360 | #define NDIS_STATUS_MEDIA_DISCONNECT ((NDIS_STATUS)0x4001000CL)
|
---|
361 | #define NDIS_STATUS_HARDWARE_LINE_UP ((NDIS_STATUS)0x4001000DL)
|
---|
362 | #define NDIS_STATUS_HARDWARE_LINE_DOWN ((NDIS_STATUS)0x4001000EL)
|
---|
363 | #define NDIS_STATUS_INTERFACE_UP ((NDIS_STATUS)0x4001000FL)
|
---|
364 | #define NDIS_STATUS_INTERFACE_DOWN ((NDIS_STATUS)0x40010010L)
|
---|
365 | #define NDIS_STATUS_MEDIA_BUSY ((NDIS_STATUS)0x40010011L)
|
---|
366 | #define NDIS_STATUS_MEDIA_SPECIFIC_INDICATION ((NDIS_STATUS)0x40010012L)
|
---|
367 | #define NDIS_STATUS_WW_INDICATION NDIS_STATUS_MEDIA_SPECIFIC_INDICATION
|
---|
368 | #define NDIS_STATUS_LINK_SPEED_CHANGE ((NDIS_STATUS)0x40010013L)
|
---|
369 | #define NDIS_STATUS_WAN_GET_STATS ((NDIS_STATUS)0x40010014L)
|
---|
370 | #define NDIS_STATUS_WAN_CO_FRAGMENT ((NDIS_STATUS)0x40010015L)
|
---|
371 | #define NDIS_STATUS_WAN_CO_LINKPARAMS ((NDIS_STATUS)0x40010016L)
|
---|
372 | #if NDIS_SUPPORT_NDIS6
|
---|
373 | #define NDIS_STATUS_LINK_STATE ((NDIS_STATUS)0x40010017L)
|
---|
374 | #define NDIS_STATUS_NETWORK_CHANGE ((NDIS_STATUS)0x40010018L)
|
---|
375 | #define NDIS_STATUS_MEDIA_SPECIFIC_INDICATION_EX ((NDIS_STATUS)0x40010019L)
|
---|
376 | #define NDIS_STATUS_PORT_STATE ((NDIS_STATUS)0x40010022L)
|
---|
377 | #define NDIS_STATUS_OPER_STATUS ((NDIS_STATUS)0x40010023L)
|
---|
378 | #define NDIS_STATUS_PACKET_FILTER ((NDIS_STATUS)0x40010024L)
|
---|
379 | #endif /* NDIS_SUPPORT_NDIS6 */
|
---|
380 | #define NDIS_STATUS_WAN_CO_MTULINKPARAMS ((NDIS_STATUS)0x40010025L)
|
---|
381 |
|
---|
382 | #if NDIS_SUPPORT_NDIS6
|
---|
383 |
|
---|
384 | #define NDIS_STATUS_IP_OPER_STATUS ((NDIS_STATUS)0x40010026L)
|
---|
385 |
|
---|
386 | #define NDIS_STATUS_OFFLOAD_PAUSE ((NDIS_STATUS)0x40020001L)
|
---|
387 | #define NDIS_STATUS_UPLOAD_ALL ((NDIS_STATUS)0x40020002L)
|
---|
388 | #define NDIS_STATUS_OFFLOAD_RESUME ((NDIS_STATUS)0x40020003L)
|
---|
389 | #define NDIS_STATUS_OFFLOAD_PARTIAL_SUCCESS ((NDIS_STATUS)0x40020004L)
|
---|
390 | #define NDIS_STATUS_OFFLOAD_STATE_INVALID ((NDIS_STATUS)0x40020005L)
|
---|
391 | #define NDIS_STATUS_TASK_OFFLOAD_CURRENT_CONFIG ((NDIS_STATUS)0x40020006L)
|
---|
392 | #define NDIS_STATUS_TASK_OFFLOAD_HARDWARE_CAPABILITIES ((NDIS_STATUS)0x40020007L)
|
---|
393 | #define NDIS_STATUS_OFFLOAD_ENCASPULATION_CHANGE ((NDIS_STATUS)0x40020008L)
|
---|
394 | #define NDIS_STATUS_TCP_CONNECTION_OFFLOAD_HARDWARE_CAPABILITIES ((NDIS_STATUS)0x4002000BL)
|
---|
395 |
|
---|
396 | #if (NDIS_SUPPORT_NDIS61)
|
---|
397 | #define NDIS_STATUS_HD_SPLIT_CURRENT_CONFIG ((NDIS_STATUS)0x4002000CL)
|
---|
398 | #endif
|
---|
399 |
|
---|
400 | #if (NDIS_SUPPORT_NDIS620)
|
---|
401 | #define NDIS_STATUS_RECEIVE_QUEUE_STATE ((NDIS_STATUS)0x4002000DL)
|
---|
402 | #endif
|
---|
403 |
|
---|
404 | #define NDIS_STATUS_OFFLOAD_IM_RESERVED1 ((NDIS_STATUS)0x40020100L)
|
---|
405 | #define NDIS_STATUS_OFFLOAD_IM_RESERVED2 ((NDIS_STATUS)0x40020101L)
|
---|
406 | #define NDIS_STATUS_OFFLOAD_IM_RESERVED3 ((NDIS_STATUS)0x40020102L)
|
---|
407 |
|
---|
408 | #define NDIS_STATUS_DOT11_SCAN_CONFIRM ((NDIS_STATUS)0x40030000L)
|
---|
409 | #define NDIS_STATUS_DOT11_MPDU_MAX_LENGTH_CHANGED ((NDIS_STATUS)0x40030001L)
|
---|
410 | #define NDIS_STATUS_DOT11_ASSOCIATION_START ((NDIS_STATUS)0x40030002L)
|
---|
411 | #define NDIS_STATUS_DOT11_ASSOCIATION_COMPLETION ((NDIS_STATUS)0x40030003L)
|
---|
412 | #define NDIS_STATUS_DOT11_CONNECTION_START ((NDIS_STATUS)0x40030004L)
|
---|
413 | #define NDIS_STATUS_DOT11_CONNECTION_COMPLETION ((NDIS_STATUS)0x40030005L)
|
---|
414 | #define NDIS_STATUS_DOT11_ROAMING_START ((NDIS_STATUS)0x40030006L)
|
---|
415 | #define NDIS_STATUS_DOT11_ROAMING_COMPLETION ((NDIS_STATUS)0x40030007L)
|
---|
416 | #define NDIS_STATUS_DOT11_DISASSOCIATION ((NDIS_STATUS)0x40030008L)
|
---|
417 | #define NDIS_STATUS_DOT11_TKIPMIC_FAILURE ((NDIS_STATUS)0x40030009L)
|
---|
418 | #define NDIS_STATUS_DOT11_PMKID_CANDIDATE_LIST ((NDIS_STATUS)0x4003000AL)
|
---|
419 | #define NDIS_STATUS_DOT11_PHY_STATE_CHANGED ((NDIS_STATUS)0x4003000BL)
|
---|
420 | #define NDIS_STATUS_DOT11_LINK_QUALITY ((NDIS_STATUS)0x4003000CL)
|
---|
421 | #define NDIS_STATUS_DOT11_INCOMING_ASSOC_STARTED ((NDIS_STATUS)0x4003000DL)
|
---|
422 | #define NDIS_STATUS_DOT11_INCOMING_ASSOC_REQUEST_RECEIVED ((NDIS_STATUS)0x4003000EL)
|
---|
423 | #define NDIS_STATUS_DOT11_INCOMING_ASSOC_COMPLETION ((NDIS_STATUS)0x4003000FL)
|
---|
424 | #define NDIS_STATUS_DOT11_STOP_AP ((NDIS_STATUS)0x40030010L)
|
---|
425 | #define NDIS_STATUS_DOT11_PHY_FREQUENCY_ADOPTED ((NDIS_STATUS)0x40030011L)
|
---|
426 | #define NDIS_STATUS_DOT11_CAN_SUSTAIN_AP ((NDIS_STATUS)0x40030012L)
|
---|
427 |
|
---|
428 | #define NDIS_STATUS_WWAN_DEVICE_CAPS ((NDIS_STATUS)0x40041000)
|
---|
429 | #define NDIS_STATUS_WWAN_READY_INFO ((NDIS_STATUS)0x40041001)
|
---|
430 | #define NDIS_STATUS_WWAN_RADIO_STATE ((NDIS_STATUS)0x40041002)
|
---|
431 | #define NDIS_STATUS_WWAN_PIN_INFO ((NDIS_STATUS)0x40041003)
|
---|
432 | #define NDIS_STATUS_WWAN_PIN_LIST ((NDIS_STATUS)0x40041004)
|
---|
433 | #define NDIS_STATUS_WWAN_HOME_PROVIDER ((NDIS_STATUS)0x40041005)
|
---|
434 | #define NDIS_STATUS_WWAN_PREFERRED_PROVIDERS ((NDIS_STATUS)0x40041006)
|
---|
435 | #define NDIS_STATUS_WWAN_VISIBLE_PROVIDERS ((NDIS_STATUS)0x40041007)
|
---|
436 | #define NDIS_STATUS_WWAN_REGISTER_STATE ((NDIS_STATUS)0x40041008)
|
---|
437 | #define NDIS_STATUS_WWAN_PACKET_SERVICE ((NDIS_STATUS)0x40041009)
|
---|
438 | #define NDIS_STATUS_WWAN_SIGNAL_STATE ((NDIS_STATUS)0x4004100a)
|
---|
439 | #define NDIS_STATUS_WWAN_CONTEXT_STATE ((NDIS_STATUS)0x4004100b)
|
---|
440 | #define NDIS_STATUS_WWAN_PROVISIONED_CONTEXTS ((NDIS_STATUS)0x4004100c)
|
---|
441 | #define NDIS_STATUS_WWAN_SERVICE_ACTIVATION ((NDIS_STATUS)0x4004100d)
|
---|
442 | #define NDIS_STATUS_WWAN_SMS_CONFIGURATION ((NDIS_STATUS)0x4004100e)
|
---|
443 | #define NDIS_STATUS_WWAN_SMS_RECEIVE ((NDIS_STATUS)0x4004100f)
|
---|
444 | #define NDIS_STATUS_WWAN_SMS_SEND ((NDIS_STATUS)0x40041010)
|
---|
445 | #define NDIS_STATUS_WWAN_SMS_DELETE ((NDIS_STATUS)0x40041011)
|
---|
446 | #define NDIS_STATUS_WWAN_SMS_STATUS ((NDIS_STATUS)0x40041012)
|
---|
447 | #define NDIS_STATUS_WWAN_DNS_ADDRESS ((NDIS_STATUS)0x40041013)
|
---|
448 |
|
---|
449 | #define NDIS_STATUS_WWAN_VENDOR_SPECIFIC ((NDIS_STATUS)0x40043000)
|
---|
450 |
|
---|
451 | #endif /* NDIS_SUPPORT_NDIS6 */
|
---|
452 |
|
---|
453 | #if (NDIS_SUPPORT_NDIS620)
|
---|
454 | #define NDIS_STATUS_PM_WOL_PATTERN_REJECTED ((NDIS_STATUS)0x40030051L)
|
---|
455 | #define NDIS_STATUS_PM_OFFLOAD_REJECTED ((NDIS_STATUS)0x40030052L)
|
---|
456 | #define NDIS_STATUS_PM_CAPABILITIES_CHANGE ((NDIS_STATUS)0x40030053L)
|
---|
457 | #endif
|
---|
458 |
|
---|
459 | #define NDIS_STATUS_NOT_RESETTABLE ((NDIS_STATUS)0x80010001L)
|
---|
460 | #define NDIS_STATUS_SOFT_ERRORS ((NDIS_STATUS)0x80010003L)
|
---|
461 | #define NDIS_STATUS_HARD_ERRORS ((NDIS_STATUS)0x80010004L)
|
---|
462 | #define NDIS_STATUS_BUFFER_OVERFLOW ((NDIS_STATUS)STATUS_BUFFER_OVERFLOW)
|
---|
463 | #define NDIS_STATUS_FAILURE ((NDIS_STATUS)STATUS_UNSUCCESSFUL)
|
---|
464 | #define NDIS_STATUS_RESOURCES ((NDIS_STATUS)STATUS_INSUFFICIENT_RESOURCES)
|
---|
465 | #define NDIS_STATUS_CLOSING ((NDIS_STATUS)0xC0010002L)
|
---|
466 | #define NDIS_STATUS_BAD_VERSION ((NDIS_STATUS)0xC0010004L)
|
---|
467 | #define NDIS_STATUS_BAD_CHARACTERISTICS ((NDIS_STATUS)0xC0010005L)
|
---|
468 | #define NDIS_STATUS_ADAPTER_NOT_FOUND ((NDIS_STATUS)0xC0010006L)
|
---|
469 | #define NDIS_STATUS_OPEN_FAILED ((NDIS_STATUS)0xC0010007L)
|
---|
470 | #define NDIS_STATUS_DEVICE_FAILED ((NDIS_STATUS)0xC0010008L)
|
---|
471 | #define NDIS_STATUS_MULTICAST_FULL ((NDIS_STATUS)0xC0010009L)
|
---|
472 | #define NDIS_STATUS_MULTICAST_EXISTS ((NDIS_STATUS)0xC001000AL)
|
---|
473 | #define NDIS_STATUS_MULTICAST_NOT_FOUND ((NDIS_STATUS)0xC001000BL)
|
---|
474 | #define NDIS_STATUS_REQUEST_ABORTED ((NDIS_STATUS)0xC001000CL)
|
---|
475 | #define NDIS_STATUS_RESET_IN_PROGRESS ((NDIS_STATUS)0xC001000DL)
|
---|
476 | #define NDIS_STATUS_CLOSING_INDICATING ((NDIS_STATUS)0xC001000EL)
|
---|
477 | #define NDIS_STATUS_NOT_SUPPORTED ((NDIS_STATUS)STATUS_NOT_SUPPORTED)
|
---|
478 | #define NDIS_STATUS_INVALID_PACKET ((NDIS_STATUS)0xC001000FL)
|
---|
479 | #define NDIS_STATUS_OPEN_LIST_FULL ((NDIS_STATUS)0xC0010010L)
|
---|
480 | #define NDIS_STATUS_ADAPTER_NOT_READY ((NDIS_STATUS)0xC0010011L)
|
---|
481 | #define NDIS_STATUS_ADAPTER_NOT_OPEN ((NDIS_STATUS)0xC0010012L)
|
---|
482 | #define NDIS_STATUS_NOT_INDICATING ((NDIS_STATUS)0xC0010013L)
|
---|
483 | #define NDIS_STATUS_INVALID_LENGTH ((NDIS_STATUS)0xC0010014L)
|
---|
484 | #define NDIS_STATUS_INVALID_DATA ((NDIS_STATUS)0xC0010015L)
|
---|
485 | #define NDIS_STATUS_BUFFER_TOO_SHORT ((NDIS_STATUS)0xC0010016L)
|
---|
486 | #define NDIS_STATUS_INVALID_OID ((NDIS_STATUS)0xC0010017L)
|
---|
487 | #define NDIS_STATUS_ADAPTER_REMOVED ((NDIS_STATUS)0xC0010018L)
|
---|
488 | #define NDIS_STATUS_UNSUPPORTED_MEDIA ((NDIS_STATUS)0xC0010019L)
|
---|
489 | #define NDIS_STATUS_GROUP_ADDRESS_IN_USE ((NDIS_STATUS)0xC001001AL)
|
---|
490 | #define NDIS_STATUS_FILE_NOT_FOUND ((NDIS_STATUS)0xC001001BL)
|
---|
491 | #define NDIS_STATUS_ERROR_READING_FILE ((NDIS_STATUS)0xC001001CL)
|
---|
492 | #define NDIS_STATUS_ALREADY_MAPPED ((NDIS_STATUS)0xC001001DL)
|
---|
493 | #define NDIS_STATUS_RESOURCE_CONFLICT ((NDIS_STATUS)0xC001001EL)
|
---|
494 | #define NDIS_STATUS_NO_CABLE ((NDIS_STATUS)0xC001001FL)
|
---|
495 |
|
---|
496 | #define NDIS_STATUS_INVALID_SAP ((NDIS_STATUS)0xC0010020L)
|
---|
497 | #define NDIS_STATUS_SAP_IN_USE ((NDIS_STATUS)0xC0010021L)
|
---|
498 | #define NDIS_STATUS_INVALID_ADDRESS ((NDIS_STATUS)0xC0010022L)
|
---|
499 | #define NDIS_STATUS_VC_NOT_ACTIVATED ((NDIS_STATUS)0xC0010023L)
|
---|
500 | #define NDIS_STATUS_DEST_OUT_OF_ORDER ((NDIS_STATUS)0xC0010024L)
|
---|
501 | #define NDIS_STATUS_VC_NOT_AVAILABLE ((NDIS_STATUS)0xC0010025L)
|
---|
502 | #define NDIS_STATUS_CELLRATE_NOT_AVAILABLE ((NDIS_STATUS)0xC0010026L)
|
---|
503 | #define NDIS_STATUS_INCOMPATABLE_QOS ((NDIS_STATUS)0xC0010027L)
|
---|
504 | #define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((NDIS_STATUS)0xC0010028L)
|
---|
505 | #define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((NDIS_STATUS)0xC0010029L)
|
---|
506 |
|
---|
507 | #define NDIS_STATUS_TOKEN_RING_OPEN_ERROR ((NDIS_STATUS)0xC0011000L)
|
---|
508 | #define NDIS_STATUS_INVALID_DEVICE_REQUEST ((NDIS_STATUS)STATUS_INVALID_DEVICE_REQUEST)
|
---|
509 | #define NDIS_STATUS_NETWORK_UNREACHABLE ((NDIS_STATUS)STATUS_NETWORK_UNREACHABLE)
|
---|
510 |
|
---|
511 | #if NDIS_SUPPORT_NDIS6
|
---|
512 |
|
---|
513 | #define NDIS_STATUS_SEND_ABORTED ((NDIS_STATUS)STATUS_NDIS_REQUEST_ABORTED)
|
---|
514 | #define NDIS_STATUS_PAUSED ((NDIS_STATUS)STATUS_NDIS_PAUSED)
|
---|
515 | #define NDIS_STATUS_INTERFACE_NOT_FOUND ((NDIS_STATUS)STATUS_NDIS_INTERFACE_NOT_FOUND)
|
---|
516 | #define NDIS_STATUS_INVALID_PARAMETER ((NDIS_STATUS)STATUS_INVALID_PARAMETER)
|
---|
517 | #define NDIS_STATUS_UNSUPPORTED_REVISION ((NDIS_STATUS)STATUS_NDIS_UNSUPPORTED_REVISION)
|
---|
518 | #define NDIS_STATUS_INVALID_PORT ((NDIS_STATUS)STATUS_NDIS_INVALID_PORT)
|
---|
519 | #define NDIS_STATUS_INVALID_PORT_STATE ((NDIS_STATUS)STATUS_NDIS_INVALID_PORT_STATE)
|
---|
520 | #define NDIS_STATUS_INVALID_STATE ((NDIS_STATUS)STATUS_INVALID_DEVICE_STATE)
|
---|
521 | #define NDIS_STATUS_MEDIA_DISCONNECTED ((NDIS_STATUS)STATUS_NDIS_MEDIA_DISCONNECTED)
|
---|
522 | #define NDIS_STATUS_LOW_POWER_STATE ((NDIS_STATUS)STATUS_NDIS_LOW_POWER_STATE)
|
---|
523 | #define NDIS_STATUS_DOT11_AUTO_CONFIG_ENABLED ((NDIS_STATUS)STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED)
|
---|
524 | #define NDIS_STATUS_DOT11_MEDIA_IN_USE ((NDIS_STATUS)STATUS_NDIS_DOT11_MEDIA_IN_USE)
|
---|
525 | #define NDIS_STATUS_DOT11_POWER_STATE_INVALID ((NDIS_STATUS)STATUS_NDIS_DOT11_POWER_STATE_INVALID)
|
---|
526 | #define NDIS_STATUS_UPLOAD_IN_PROGRESS ((NDIS_STATUS)0xC0231001L)
|
---|
527 | #define NDIS_STATUS_REQUEST_UPLOAD ((NDIS_STATUS)0xC0231002L)
|
---|
528 | #define NDIS_STATUS_UPLOAD_REQUESTED ((NDIS_STATUS)0xC0231003L)
|
---|
529 | #define NDIS_STATUS_OFFLOAD_TCP_ENTRIES ((NDIS_STATUS)0xC0231004L)
|
---|
530 | #define NDIS_STATUS_OFFLOAD_PATH_ENTRIES ((NDIS_STATUS)0xC0231005L)
|
---|
531 | #define NDIS_STATUS_OFFLOAD_NEIGHBOR_ENTRIES ((NDIS_STATUS)0xC0231006L)
|
---|
532 | #define NDIS_STATUS_OFFLOAD_IP_ADDRESS_ENTRIES ((NDIS_STATUS)0xC0231007L)
|
---|
533 | #define NDIS_STATUS_OFFLOAD_HW_ADDRESS_ENTRIES ((NDIS_STATUS)0xC0231008L)
|
---|
534 | #define NDIS_STATUS_OFFLOAD_VLAN_ENTRIES ((NDIS_STATUS)0xC0231009L)
|
---|
535 | #define NDIS_STATUS_OFFLOAD_TCP_XMIT_BUFFER ((NDIS_STATUS)0xC023100AL)
|
---|
536 | #define NDIS_STATUS_OFFLOAD_TCP_RCV_BUFFER ((NDIS_STATUS)0xC023100BL)
|
---|
537 | #define NDIS_STATUS_OFFLOAD_TCP_RCV_WINDOW ((NDIS_STATUS)0xC023100CL)
|
---|
538 | #define NDIS_STATUS_OFFLOAD_VLAN_MISMATCH ((NDIS_STATUS)0xC023100DL)
|
---|
539 | #define NDIS_STATUS_OFFLOAD_DATA_NOT_ACCEPTED ((NDIS_STATUS)0xC023100EL)
|
---|
540 | #define NDIS_STATUS_OFFLOAD_POLICY ((NDIS_STATUS)0xC023100FL)
|
---|
541 | #define NDIS_STATUS_OFFLOAD_DATA_PARTIALLY_ACCEPTED ((NDIS_STATUS)0xC0231010L)
|
---|
542 | #define NDIS_STATUS_OFFLOAD_REQUEST_RESET ((NDIS_STATUS)0xC0231011L)
|
---|
543 |
|
---|
544 | #if NDIS_SUPPORT_NDIS620
|
---|
545 | #define NDIS_STATUS_PM_WOL_PATTERN_LIST_FULL ((NDIS_STATUS)STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL)
|
---|
546 | #define NDIS_STATUS_PM_PROTOCOL_OFFLOAD_LIST_FULL ((NDIS_STATUS)STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL)
|
---|
547 | #endif
|
---|
548 |
|
---|
549 | #endif /* NDIS_SUPPORT_NDIS6 */
|
---|
550 |
|
---|
551 | #if (NDIS_SUPPORT_NDIS620)
|
---|
552 | #define NDIS_STATUS_OFFLOAD_CONNECTION_REJECTED ((NDIS_STATUS)STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED)
|
---|
553 | #endif
|
---|
554 |
|
---|
555 | /* NDIS error codes for error logging */
|
---|
556 |
|
---|
557 | #define NDIS_ERROR_CODE ULONG
|
---|
558 |
|
---|
559 | #define NDIS_ERROR_CODE_RESOURCE_CONFLICT EVENT_NDIS_RESOURCE_CONFLICT
|
---|
560 | #define NDIS_ERROR_CODE_OUT_OF_RESOURCES EVENT_NDIS_OUT_OF_RESOURCE
|
---|
561 | #define NDIS_ERROR_CODE_HARDWARE_FAILURE EVENT_NDIS_HARDWARE_FAILURE
|
---|
562 | #define NDIS_ERROR_CODE_ADAPTER_NOT_FOUND EVENT_NDIS_ADAPTER_NOT_FOUND
|
---|
563 | #define NDIS_ERROR_CODE_INTERRUPT_CONNECT EVENT_NDIS_INTERRUPT_CONNECT
|
---|
564 | #define NDIS_ERROR_CODE_DRIVER_FAILURE EVENT_NDIS_DRIVER_FAILURE
|
---|
565 | #define NDIS_ERROR_CODE_BAD_VERSION EVENT_NDIS_BAD_VERSION
|
---|
566 | #define NDIS_ERROR_CODE_TIMEOUT EVENT_NDIS_TIMEOUT
|
---|
567 | #define NDIS_ERROR_CODE_NETWORK_ADDRESS EVENT_NDIS_NETWORK_ADDRESS
|
---|
568 | #define NDIS_ERROR_CODE_UNSUPPORTED_CONFIGURATION EVENT_NDIS_UNSUPPORTED_CONFIGURATION
|
---|
569 | #define NDIS_ERROR_CODE_INVALID_VALUE_FROM_ADAPTER EVENT_NDIS_INVALID_VALUE_FROM_ADAPTER
|
---|
570 | #define NDIS_ERROR_CODE_MISSING_CONFIGURATION_PARAMETER EVENT_NDIS_MISSING_CONFIGURATION_PARAMETER
|
---|
571 | #define NDIS_ERROR_CODE_BAD_IO_BASE_ADDRESS EVENT_NDIS_BAD_IO_BASE_ADDRESS
|
---|
572 | #define NDIS_ERROR_CODE_RECEIVE_SPACE_SMALL EVENT_NDIS_RECEIVE_SPACE_SMALL
|
---|
573 | #define NDIS_ERROR_CODE_ADAPTER_DISABLED EVENT_NDIS_ADAPTER_DISABLED
|
---|
574 |
|
---|
575 | /* Memory allocation flags. Used by Ndis[Allocate|Free]Memory */
|
---|
576 | #define NDIS_MEMORY_CONTIGUOUS 0x00000001
|
---|
577 | #define NDIS_MEMORY_NONCACHED 0x00000002
|
---|
578 |
|
---|
579 | /* NIC attribute flags. Used by NdisMSetAttributes(Ex) */
|
---|
580 | #define NDIS_ATTRIBUTE_IGNORE_PACKET_TIMEOUT 0x00000001
|
---|
581 | #define NDIS_ATTRIBUTE_IGNORE_REQUEST_TIMEOUT 0x00000002
|
---|
582 | #define NDIS_ATTRIBUTE_IGNORE_TOKEN_RING_ERRORS 0x00000004
|
---|
583 | #define NDIS_ATTRIBUTE_BUS_MASTER 0x00000008
|
---|
584 | #define NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER 0x00000010
|
---|
585 | #define NDIS_ATTRIBUTE_DESERIALIZE 0x00000020
|
---|
586 | #define NDIS_ATTRIBUTE_NO_HALT_ON_SUSPEND 0x00000040
|
---|
587 | #define NDIS_ATTRIBUTE_SURPRISE_REMOVE_OK 0x00000080
|
---|
588 | #define NDIS_ATTRIBUTE_NOT_CO_NDIS 0x00000100
|
---|
589 | #define NDIS_ATTRIBUTE_USES_SAFE_BUFFER_APIS 0x00000200
|
---|
590 |
|
---|
591 | /* Lock */
|
---|
592 |
|
---|
593 | #if NDIS_SUPPORT_60_COMPATIBLE_API
|
---|
594 |
|
---|
595 | typedef union _NDIS_RW_LOCK_REFCOUNT {
|
---|
596 | UINT RefCount;
|
---|
597 | UCHAR cacheLine[16];
|
---|
598 | } NDIS_RW_LOCK_REFCOUNT;
|
---|
599 |
|
---|
600 | typedef struct _NDIS_RW_LOCK {
|
---|
601 | __MINGW_EXTENSION union {
|
---|
602 | __MINGW_EXTENSION struct {
|
---|
603 | KSPIN_LOCK SpinLock;
|
---|
604 | PVOID Context;
|
---|
605 | };
|
---|
606 | UCHAR Reserved[16];
|
---|
607 | };
|
---|
608 | __MINGW_EXTENSION union {
|
---|
609 | NDIS_RW_LOCK_REFCOUNT RefCount[MAXIMUM_PROCESSORS];
|
---|
610 | ULONG RefCountEx[sizeof(NDIS_RW_LOCK_REFCOUNT)/sizeof(ULONG) * MAXIMUM_PROCESSORS];
|
---|
611 | __MINGW_EXTENSION struct {
|
---|
612 | KSPIN_LOCK RefCountLock;
|
---|
613 | volatile ULONG SharedRefCount;
|
---|
614 | volatile BOOLEAN WriterWaiting;
|
---|
615 | };
|
---|
616 | };
|
---|
617 | } NDIS_RW_LOCK, *PNDIS_RW_LOCK;
|
---|
618 |
|
---|
619 | typedef struct _LOCK_STATE {
|
---|
620 | USHORT LockState;
|
---|
621 | KIRQL OldIrql;
|
---|
622 | } LOCK_STATE, *PLOCK_STATE;
|
---|
623 |
|
---|
624 | #endif /* NDIS_SUPPORT_60_COMPATIBLE_API */
|
---|
625 |
|
---|
626 | /* Timer */
|
---|
627 |
|
---|
628 | typedef VOID
|
---|
629 | (NTAPI NDIS_TIMER_FUNCTION)(
|
---|
630 | IN PVOID SystemSpecific1,
|
---|
631 | IN PVOID FunctionContext,
|
---|
632 | IN PVOID SystemSpecific2,
|
---|
633 | IN PVOID SystemSpecific3);
|
---|
634 | typedef NDIS_TIMER_FUNCTION *PNDIS_TIMER_FUNCTION;
|
---|
635 |
|
---|
636 | typedef struct _NDIS_TIMER {
|
---|
637 | KTIMER Timer;
|
---|
638 | KDPC Dpc;
|
---|
639 | } NDIS_TIMER, *PNDIS_TIMER;
|
---|
640 |
|
---|
641 | /* Hardware */
|
---|
642 |
|
---|
643 | typedef CM_MCA_POS_DATA NDIS_MCA_POS_DATA, *PNDIS_MCA_POS_DATA;
|
---|
644 | typedef CM_EISA_SLOT_INFORMATION NDIS_EISA_SLOT_INFORMATION, *PNDIS_EISA_SLOT_INFORMATION;
|
---|
645 | typedef CM_EISA_FUNCTION_INFORMATION NDIS_EISA_FUNCTION_INFORMATION, *PNDIS_EISA_FUNCTION_INFORMATION;
|
---|
646 | typedef CM_PARTIAL_RESOURCE_LIST NDIS_RESOURCE_LIST, *PNDIS_RESOURCE_LIST;
|
---|
647 |
|
---|
648 | /* Flag bits */
|
---|
649 | #define READABLE_LOCAL_CLOCK 0x00000001
|
---|
650 | #define CLOCK_NETWORK_DERIVED 0x00000002
|
---|
651 | #define CLOCK_PRECISION 0x00000004
|
---|
652 | #define RECEIVE_TIME_INDICATION_CAPABLE 0x00000008
|
---|
653 | #define TIMED_SEND_CAPABLE 0x00000010
|
---|
654 | #define TIME_STAMP_CAPABLE 0x00000020
|
---|
655 |
|
---|
656 | /* NDIS packet filter bits (OID_GEN_CURRENT_PACKET_FILTER) */
|
---|
657 | #define NDIS_PACKET_TYPE_DIRECTED 0x00000001
|
---|
658 | #define NDIS_PACKET_TYPE_MULTICAST 0x00000002
|
---|
659 | #define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004
|
---|
660 | #define NDIS_PACKET_TYPE_BROADCAST 0x00000008
|
---|
661 | #define NDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010
|
---|
662 | #define NDIS_PACKET_TYPE_PROMISCUOUS 0x00000020
|
---|
663 | #define NDIS_PACKET_TYPE_SMT 0x00000040
|
---|
664 | #define NDIS_PACKET_TYPE_ALL_LOCAL 0x00000080
|
---|
665 | #define NDIS_PACKET_TYPE_GROUP 0x00001000
|
---|
666 | #define NDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00002000
|
---|
667 | #define NDIS_PACKET_TYPE_FUNCTIONAL 0x00004000
|
---|
668 | #define NDIS_PACKET_TYPE_MAC_FRAME 0x00008000
|
---|
669 |
|
---|
670 | /* NDIS protocol option bits (OID_GEN_PROTOCOL_OPTIONS) */
|
---|
671 | #define NDIS_PROT_OPTION_ESTIMATED_LENGTH 0x00000001
|
---|
672 | #define NDIS_PROT_OPTION_NO_LOOPBACK 0x00000002
|
---|
673 | #define NDIS_PROT_OPTION_NO_RSVD_ON_RCVPKT 0x00000004
|
---|
674 |
|
---|
675 | /* NDIS MAC option bits (OID_GEN_MAC_OPTIONS) */
|
---|
676 | #define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001
|
---|
677 | #define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002
|
---|
678 | #define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004
|
---|
679 | #define NDIS_MAC_OPTION_NO_LOOPBACK 0x00000008
|
---|
680 | #define NDIS_MAC_OPTION_FULL_DUPLEX 0x00000010
|
---|
681 | #define NDIS_MAC_OPTION_EOTX_INDICATION 0x00000020
|
---|
682 | #define NDIS_MAC_OPTION_8021P_PRIORITY 0x00000040
|
---|
683 | #define NDIS_MAC_OPTION_RESERVED 0x80000000
|
---|
684 |
|
---|
685 | #define NDIS_GUID_TO_OID 0x00000001
|
---|
686 | #define NDIS_GUID_TO_STATUS 0x00000002
|
---|
687 | #define NDIS_GUID_ANSI_STRING 0x00000004
|
---|
688 | #define NDIS_GUID_UNICODE_STRING 0x00000008
|
---|
689 | #define NDIS_GUID_ARRAY 0x00000010
|
---|
690 |
|
---|
691 | #if NDIS_LEGACY_DRIVER
|
---|
692 |
|
---|
693 | /* NDIS_PACKET_PRIVATE.Flags constants */
|
---|
694 | #define fPACKET_WRAPPER_RESERVED 0x3f
|
---|
695 | #define fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO 0x40
|
---|
696 | #define fPACKET_ALLOCATED_BY_NDIS 0x80
|
---|
697 |
|
---|
698 | #define NDIS_FLAGS_PROTOCOL_ID_MASK 0x0000000f
|
---|
699 | #define NDIS_FLAGS_MULTICAST_PACKET 0x00000010
|
---|
700 | #define NDIS_FLAGS_RESERVED2 0x00000020
|
---|
701 | #define NDIS_FLAGS_RESERVED3 0x00000040
|
---|
702 | #define NDIS_FLAGS_DONT_LOOPBACK 0x00000080
|
---|
703 | #define NDIS_FLAGS_IS_LOOPBACK_PACKET 0x00000100
|
---|
704 | #define NDIS_FLAGS_LOOPBACK_ONLY 0x00000200
|
---|
705 | #define NDIS_FLAGS_RESERVED4 0x00000400
|
---|
706 | #define NDIS_FLAGS_DOUBLE_BUFFERED 0x00000800
|
---|
707 | #define NDIS_FLAGS_SENT_AT_DPC 0x00001000
|
---|
708 | #define NDIS_FLAGS_USES_SG_BUFFER_LIST 0x00002000
|
---|
709 | #define NDIS_FLAGS_USES_ORIGINAL_PACKET 0x00004000
|
---|
710 | #define NDIS_FLAGS_PADDED 0x00010000
|
---|
711 | #define NDIS_FLAGS_XLATE_AT_TOP 0x00020000
|
---|
712 |
|
---|
713 | typedef NDIS_HANDLE PNDIS_PACKET_POOL;
|
---|
714 |
|
---|
715 | typedef struct _NDIS_PACKET_PRIVATE {
|
---|
716 | UINT PhysicalCount;
|
---|
717 | UINT TotalLength;
|
---|
718 | PNDIS_BUFFER Head;
|
---|
719 | PNDIS_BUFFER Tail;
|
---|
720 | PNDIS_PACKET_POOL Pool;
|
---|
721 | UINT Count;
|
---|
722 | ULONG Flags;
|
---|
723 | BOOLEAN ValidCounts;
|
---|
724 | UCHAR NdisPacketFlags;
|
---|
725 | USHORT NdisPacketOobOffset;
|
---|
726 | } NDIS_PACKET_PRIVATE, *PNDIS_PACKET_PRIVATE;
|
---|
727 |
|
---|
728 | typedef struct _NDIS_PACKET {
|
---|
729 | NDIS_PACKET_PRIVATE Private;
|
---|
730 | __MINGW_EXTENSION union {
|
---|
731 | __MINGW_EXTENSION struct {
|
---|
732 | UCHAR MiniportReserved[2 * sizeof(PVOID)];
|
---|
733 | UCHAR WrapperReserved[2 * sizeof(PVOID)];
|
---|
734 | };
|
---|
735 | __MINGW_EXTENSION struct {
|
---|
736 | UCHAR MiniportReservedEx[3 * sizeof(PVOID)];
|
---|
737 | UCHAR WrapperReservedEx[sizeof(PVOID)];
|
---|
738 | };
|
---|
739 | __MINGW_EXTENSION struct {
|
---|
740 | UCHAR MacReserved[4 * sizeof(PVOID)];
|
---|
741 | };
|
---|
742 | };
|
---|
743 | ULONG_PTR Reserved[2];
|
---|
744 | UCHAR ProtocolReserved[1];
|
---|
745 | } NDIS_PACKET, *PNDIS_PACKET, **PPNDIS_PACKET;
|
---|
746 |
|
---|
747 | typedef struct _NDIS_PACKET_STACK {
|
---|
748 | ULONG_PTR IMReserved[2];
|
---|
749 | ULONG_PTR NdisReserved[4];
|
---|
750 | } NDIS_PACKET_STACK, *PNDIS_PACKET_STACK;
|
---|
751 |
|
---|
752 | #endif /* NDIS_LEGACY_DRIVER */
|
---|
753 |
|
---|
754 | typedef enum _NDIS_CLASS_ID {
|
---|
755 | NdisClass802_3Priority,
|
---|
756 | NdisClassWirelessWanMbxMailbox,
|
---|
757 | NdisClassIrdaPacketInfo,
|
---|
758 | NdisClassAtmAALInfo
|
---|
759 | } NDIS_CLASS_ID;
|
---|
760 |
|
---|
761 | typedef struct _MEDIA_SPECIFIC_INFORMATION {
|
---|
762 | UINT NextEntryOffset;
|
---|
763 | NDIS_CLASS_ID ClassId;
|
---|
764 | UINT Size;
|
---|
765 | UCHAR ClassInformation[1];
|
---|
766 | } MEDIA_SPECIFIC_INFORMATION, *PMEDIA_SPECIFIC_INFORMATION;
|
---|
767 |
|
---|
768 | #if NDIS_LEGACY_DRIVER
|
---|
769 | typedef struct _NDIS_PACKET_OOB_DATA {
|
---|
770 | __MINGW_EXTENSION union {
|
---|
771 | ULONGLONG TimeToSend;
|
---|
772 | ULONGLONG TimeSent;
|
---|
773 | };
|
---|
774 | ULONGLONG TimeReceived;
|
---|
775 | UINT HeaderSize;
|
---|
776 | UINT SizeMediaSpecificInfo;
|
---|
777 | PVOID MediaSpecificInformation;
|
---|
778 | NDIS_STATUS Status;
|
---|
779 | } NDIS_PACKET_OOB_DATA, *PNDIS_PACKET_OOB_DATA;
|
---|
780 | #endif
|
---|
781 |
|
---|
782 | /* Request types used by NdisRequest */
|
---|
783 | typedef enum _NDIS_REQUEST_TYPE {
|
---|
784 | NdisRequestQueryInformation,
|
---|
785 | NdisRequestSetInformation,
|
---|
786 | NdisRequestQueryStatistics,
|
---|
787 | NdisRequestOpen,
|
---|
788 | NdisRequestClose,
|
---|
789 | NdisRequestSend,
|
---|
790 | NdisRequestTransferData,
|
---|
791 | NdisRequestReset,
|
---|
792 | NdisRequestGeneric1,
|
---|
793 | NdisRequestGeneric2,
|
---|
794 | NdisRequestGeneric3,
|
---|
795 | NdisRequestGeneric4,
|
---|
796 | #if NDIS_SUPPORT_NDIS6
|
---|
797 | NdisRequestMethod,
|
---|
798 | #endif
|
---|
799 | } NDIS_REQUEST_TYPE, *PNDIS_REQUEST_TYPE;
|
---|
800 |
|
---|
801 | #if NDIS_LEGACY_DRIVER
|
---|
802 | typedef struct _NDIS_REQUEST {
|
---|
803 | UCHAR MacReserved[4 * sizeof(PVOID)];
|
---|
804 | NDIS_REQUEST_TYPE RequestType;
|
---|
805 | union _DATA {
|
---|
806 | struct QUERY_INFORMATION {
|
---|
807 | NDIS_OID Oid;
|
---|
808 | PVOID InformationBuffer;
|
---|
809 | UINT InformationBufferLength;
|
---|
810 | UINT BytesWritten;
|
---|
811 | UINT BytesNeeded;
|
---|
812 | } QUERY_INFORMATION;
|
---|
813 | struct SET_INFORMATION {
|
---|
814 | NDIS_OID Oid;
|
---|
815 | PVOID InformationBuffer;
|
---|
816 | UINT InformationBufferLength;
|
---|
817 | UINT BytesRead;
|
---|
818 | UINT BytesNeeded;
|
---|
819 | } SET_INFORMATION;
|
---|
820 | } DATA;
|
---|
821 | #if (defined(NDIS50) || defined(NDIS51) || defined(NDIS50_MINIPORT) || defined(NDIS51_MINIPORT))
|
---|
822 | UCHAR NdisReserved[9 * sizeof(PVOID)];
|
---|
823 | __MINGW_EXTENSION union {
|
---|
824 | UCHAR CallMgrReserved[2 * sizeof(PVOID)];
|
---|
825 | UCHAR ProtocolReserved[2 * sizeof(PVOID)];
|
---|
826 | };
|
---|
827 | UCHAR MiniportReserved[2 * sizeof(PVOID)];
|
---|
828 | #endif
|
---|
829 | } NDIS_REQUEST, *PNDIS_REQUEST;
|
---|
830 | #endif /* NDIS_LEGACY_DRIVER */
|
---|
831 |
|
---|
832 | /* Wide Area Networks definitions */
|
---|
833 |
|
---|
834 | #if NDIS_LEGACY_DRIVER
|
---|
835 | typedef struct _NDIS_WAN_PACKET {
|
---|
836 | LIST_ENTRY WanPacketQueue;
|
---|
837 | PUCHAR CurrentBuffer;
|
---|
838 | ULONG CurrentLength;
|
---|
839 | PUCHAR StartBuffer;
|
---|
840 | PUCHAR EndBuffer;
|
---|
841 | PVOID ProtocolReserved1;
|
---|
842 | PVOID ProtocolReserved2;
|
---|
843 | PVOID ProtocolReserved3;
|
---|
844 | PVOID ProtocolReserved4;
|
---|
845 | PVOID MacReserved1;
|
---|
846 | PVOID MacReserved2;
|
---|
847 | PVOID MacReserved3;
|
---|
848 | PVOID MacReserved4;
|
---|
849 | } NDIS_WAN_PACKET, *PNDIS_WAN_PACKET;
|
---|
850 | #endif
|
---|
851 |
|
---|
852 | /* DMA channel information */
|
---|
853 |
|
---|
854 | typedef struct _NDIS_DMA_DESCRIPTION {
|
---|
855 | BOOLEAN DemandMode;
|
---|
856 | BOOLEAN AutoInitialize;
|
---|
857 | BOOLEAN DmaChannelSpecified;
|
---|
858 | DMA_WIDTH DmaWidth;
|
---|
859 | DMA_SPEED DmaSpeed;
|
---|
860 | ULONG DmaPort;
|
---|
861 | ULONG DmaChannel;
|
---|
862 | } NDIS_DMA_DESCRIPTION, *PNDIS_DMA_DESCRIPTION;
|
---|
863 |
|
---|
864 | typedef struct _NDIS_DMA_BLOCK {
|
---|
865 | PVOID MapRegisterBase;
|
---|
866 | KEVENT AllocationEvent;
|
---|
867 | PADAPTER_OBJECT SystemAdapterObject;
|
---|
868 | PVOID Miniport;
|
---|
869 | BOOLEAN InProgress;
|
---|
870 | } NDIS_DMA_BLOCK, *PNDIS_DMA_BLOCK;
|
---|
871 |
|
---|
872 | typedef UCHAR NDIS_DMA_SIZE;
|
---|
873 |
|
---|
874 | #define NDIS_DMA_24BITS ((NDIS_DMA_SIZE)0)
|
---|
875 | #define NDIS_DMA_32BITS ((NDIS_DMA_SIZE)1)
|
---|
876 | #define NDIS_DMA_64BITS ((NDIS_DMA_SIZE)2)
|
---|
877 |
|
---|
878 | typedef enum _NDIS_PROCESSOR_TYPE {
|
---|
879 | NdisProcessorX86,
|
---|
880 | NdisProcessorMips,
|
---|
881 | NdisProcessorAlpha,
|
---|
882 | NdisProcessorPpc,
|
---|
883 | NdisProcessorAmd64,
|
---|
884 | NdisProcessorIA64
|
---|
885 | } NDIS_PROCESSOR_TYPE, *PNDIS_PROCESSOR_TYPE;
|
---|
886 |
|
---|
887 | typedef enum _NDIS_ENVIRONMENT_TYPE {
|
---|
888 | NdisEnvironmentWindows,
|
---|
889 | NdisEnvironmentWindowsNt
|
---|
890 | } NDIS_ENVIRONMENT_TYPE, *PNDIS_ENVIRONMENT_TYPE;
|
---|
891 |
|
---|
892 | /* Possible hardware architecture */
|
---|
893 | typedef enum _NDIS_INTERFACE_TYPE {
|
---|
894 | NdisInterfaceInternal = Internal,
|
---|
895 | NdisInterfaceIsa = Isa,
|
---|
896 | NdisInterfaceEisa = Eisa,
|
---|
897 | NdisInterfaceMca = MicroChannel,
|
---|
898 | NdisInterfaceTurboChannel = TurboChannel,
|
---|
899 | NdisInterfacePci = PCIBus,
|
---|
900 | NdisInterfacePcMcia = PCMCIABus,
|
---|
901 | NdisInterfaceCBus = CBus,
|
---|
902 | NdisInterfaceMPIBus = MPIBus,
|
---|
903 | NdisInterfaceMPSABus = MPSABus,
|
---|
904 | NdisInterfaceProcessorInternal = ProcessorInternal,
|
---|
905 | NdisInterfaceInternalPowerBus = InternalPowerBus,
|
---|
906 | NdisInterfacePNPISABus = PNPISABus,
|
---|
907 | NdisInterfacePNPBus = PNPBus,
|
---|
908 | NdisInterfaceUSB,
|
---|
909 | NdisInterfaceIrda,
|
---|
910 | NdisInterface1394,
|
---|
911 | NdisMaximumInterfaceType
|
---|
912 | } NDIS_INTERFACE_TYPE, *PNDIS_INTERFACE_TYPE;
|
---|
913 |
|
---|
914 | #define NdisInterruptLevelSensitive LevelSensitive
|
---|
915 | #define NdisInterruptLatched Latched
|
---|
916 |
|
---|
917 | typedef KINTERRUPT_MODE NDIS_INTERRUPT_MODE, *PNDIS_INTERRUPT_MODE;
|
---|
918 |
|
---|
919 | typedef enum _NDIS_PARAMETER_TYPE {
|
---|
920 | NdisParameterInteger,
|
---|
921 | NdisParameterHexInteger,
|
---|
922 | NdisParameterString,
|
---|
923 | NdisParameterMultiString,
|
---|
924 | NdisParameterBinary
|
---|
925 | } NDIS_PARAMETER_TYPE, *PNDIS_PARAMETER_TYPE;
|
---|
926 |
|
---|
927 | typedef struct _BINARY_DATA {
|
---|
928 | USHORT Length;
|
---|
929 | PVOID Buffer;
|
---|
930 | } BINARY_DATA;
|
---|
931 |
|
---|
932 | typedef struct _NDIS_CONFIGURATION_PARAMETER {
|
---|
933 | NDIS_PARAMETER_TYPE ParameterType;
|
---|
934 | union {
|
---|
935 | ULONG IntegerData;
|
---|
936 | NDIS_STRING StringData;
|
---|
937 | BINARY_DATA BinaryData;
|
---|
938 | } ParameterData;
|
---|
939 | } NDIS_CONFIGURATION_PARAMETER, *PNDIS_CONFIGURATION_PARAMETER;
|
---|
940 |
|
---|
941 | typedef PHYSICAL_ADDRESS NDIS_PHYSICAL_ADDRESS, *PNDIS_PHYSICAL_ADDRESS;
|
---|
942 |
|
---|
943 | typedef struct _NDIS_PHYSICAL_ADDRESS_UNIT {
|
---|
944 | NDIS_PHYSICAL_ADDRESS PhysicalAddress;
|
---|
945 | UINT Length;
|
---|
946 | } NDIS_PHYSICAL_ADDRESS_UNIT, *PNDIS_PHYSICAL_ADDRESS_UNIT;
|
---|
947 |
|
---|
948 | typedef struct _NDIS_WAN_LINE_DOWN {
|
---|
949 | UCHAR RemoteAddress[6];
|
---|
950 | UCHAR LocalAddress[6];
|
---|
951 | } NDIS_WAN_LINE_DOWN, *PNDIS_WAN_LINE_DOWN;
|
---|
952 |
|
---|
953 | typedef struct _NDIS_WAN_LINE_UP {
|
---|
954 | ULONG LinkSpeed;
|
---|
955 | ULONG MaximumTotalSize;
|
---|
956 | NDIS_WAN_QUALITY Quality;
|
---|
957 | USHORT SendWindow;
|
---|
958 | UCHAR RemoteAddress[6];
|
---|
959 | OUT UCHAR LocalAddress[6];
|
---|
960 | ULONG ProtocolBufferLength;
|
---|
961 | PUCHAR ProtocolBuffer;
|
---|
962 | USHORT ProtocolType;
|
---|
963 | NDIS_STRING DeviceName;
|
---|
964 | } NDIS_WAN_LINE_UP, *PNDIS_WAN_LINE_UP;
|
---|
965 |
|
---|
966 | typedef NTSTATUS
|
---|
967 | (NTAPI *TDI_REGISTER_CALLBACK)(
|
---|
968 | IN PUNICODE_STRING DeviceName,
|
---|
969 | OUT HANDLE *TdiHandle);
|
---|
970 |
|
---|
971 | typedef NTSTATUS
|
---|
972 | (NTAPI *TDI_PNP_HANDLER)(
|
---|
973 | IN PUNICODE_STRING UpperComponent,
|
---|
974 | IN PUNICODE_STRING LowerComponent,
|
---|
975 | IN PUNICODE_STRING BindList,
|
---|
976 | IN PVOID ReconfigBuffer,
|
---|
977 | IN UINT ReconfigBufferSize,
|
---|
978 | IN UINT Operation);
|
---|
979 |
|
---|
980 | typedef struct _OID_LIST OID_LIST, *POID_LIST;
|
---|
981 |
|
---|
982 | /* PnP state */
|
---|
983 |
|
---|
984 | typedef enum _NDIS_PNP_DEVICE_STATE {
|
---|
985 | NdisPnPDeviceAdded,
|
---|
986 | NdisPnPDeviceStarted,
|
---|
987 | NdisPnPDeviceQueryStopped,
|
---|
988 | NdisPnPDeviceStopped,
|
---|
989 | NdisPnPDeviceQueryRemoved,
|
---|
990 | NdisPnPDeviceRemoved,
|
---|
991 | NdisPnPDeviceSurpriseRemoved
|
---|
992 | } NDIS_PNP_DEVICE_STATE;
|
---|
993 |
|
---|
994 | #define NDIS_DEVICE_NOT_STOPPABLE 0x00000001
|
---|
995 | #define NDIS_DEVICE_NOT_REMOVEABLE 0x00000002
|
---|
996 | #define NDIS_DEVICE_NOT_SUSPENDABLE 0x00000004
|
---|
997 | #define NDIS_DEVICE_DISABLE_PM 0x00000008
|
---|
998 | #define NDIS_DEVICE_DISABLE_WAKE_UP 0x00000010
|
---|
999 | #define NDIS_DEVICE_DISABLE_WAKE_ON_RECONNECT 0x00000020
|
---|
1000 | #define NDIS_DEVICE_RESERVED 0x00000040
|
---|
1001 | #define NDIS_DEVICE_DISABLE_WAKE_ON_MAGIC_PACKET 0x00000080
|
---|
1002 | #define NDIS_DEVICE_DISABLE_WAKE_ON_PATTERN_MATCH 0x00000100
|
---|
1003 |
|
---|
1004 | /* Protocol types supported by NDIS */
|
---|
1005 | #define NDIS_PROTOCOL_ID_DEFAULT 0x00
|
---|
1006 | #define NDIS_PROTOCOL_ID_TCP_IP 0x02
|
---|
1007 | #define NDIS_PROTOCOL_ID_IPX 0x06
|
---|
1008 | #define NDIS_PROTOCOL_ID_NBF 0x07
|
---|
1009 | #define NDIS_PROTOCOL_ID_MAX 0x0F
|
---|
1010 | #define NDIS_PROTOCOL_ID_MASK 0x0F
|
---|
1011 |
|
---|
1012 | typedef ULONG NDIS_AF, *PNDIS_AF;
|
---|
1013 |
|
---|
1014 | #define CO_ADDRESS_FAMILY_Q2931 ((NDIS_AF)0x1)
|
---|
1015 | #define CO_ADDRESS_FAMILY_PSCHED ((NDIS_AF)0x2)
|
---|
1016 | #define CO_ADDRESS_FAMILY_L2TP ((NDIS_AF)0x3)
|
---|
1017 | #define CO_ADDRESS_FAMILY_IRDA ((NDIS_AF)0x4)
|
---|
1018 | #define CO_ADDRESS_FAMILY_1394 ((NDIS_AF)0x5)
|
---|
1019 | #define CO_ADDRESS_FAMILY_PPP ((NDIS_AF)0x6)
|
---|
1020 | #define CO_ADDRESS_FAMILY_INFINIBAND ((NDIS_AF)0x7)
|
---|
1021 | #define CO_ADDRESS_FAMILY_TAPI ((NDIS_AF)0x800)
|
---|
1022 | #define CO_ADDRESS_FAMILY_TAPI_PROXY ((NDIS_AF)0x801)
|
---|
1023 |
|
---|
1024 | #define CO_ADDRESS_FAMILY_PROXY 0x80000000
|
---|
1025 |
|
---|
1026 | typedef struct _CO_ADDRESS_FAMILY {
|
---|
1027 | NDIS_AF AddressFamily;
|
---|
1028 | ULONG MajorVersion;
|
---|
1029 | ULONG MinorVersion;
|
---|
1030 | } CO_ADDRESS_FAMILY, *PCO_ADDRESS_FAMILY;
|
---|
1031 |
|
---|
1032 | typedef struct _CO_SPECIFIC_PARAMETERS {
|
---|
1033 | ULONG ParamType;
|
---|
1034 | ULONG Length;
|
---|
1035 | UCHAR Parameters[1];
|
---|
1036 | } CO_SPECIFIC_PARAMETERS, *PCO_SPECIFIC_PARAMETERS;
|
---|
1037 |
|
---|
1038 | typedef struct _CO_CALL_MANAGER_PARAMETERS {
|
---|
1039 | FLOWSPEC Transmit;
|
---|
1040 | FLOWSPEC Receive;
|
---|
1041 | CO_SPECIFIC_PARAMETERS CallMgrSpecific;
|
---|
1042 | } CO_CALL_MANAGER_PARAMETERS, *PCO_CALL_MANAGER_PARAMETERS;
|
---|
1043 |
|
---|
1044 | /* CO_MEDIA_PARAMETERS.Flags constants */
|
---|
1045 | #define RECEIVE_TIME_INDICATION 0x00000001
|
---|
1046 | #define USE_TIME_STAMPS 0x00000002
|
---|
1047 | #define TRANSMIT_VC 0x00000004
|
---|
1048 | #define RECEIVE_VC 0x00000008
|
---|
1049 | #define INDICATE_ERRED_PACKETS 0x00000010
|
---|
1050 | #define INDICATE_END_OF_TX 0x00000020
|
---|
1051 | #define RESERVE_RESOURCES_VC 0x00000040
|
---|
1052 | #define ROUND_DOWN_FLOW 0x00000080
|
---|
1053 | #define ROUND_UP_FLOW 0x00000100
|
---|
1054 |
|
---|
1055 | typedef struct _CO_MEDIA_PARAMETERS {
|
---|
1056 | ULONG Flags;
|
---|
1057 | ULONG ReceivePriority;
|
---|
1058 | ULONG ReceiveSizeHint;
|
---|
1059 | CO_SPECIFIC_PARAMETERS MediaSpecific;
|
---|
1060 | } CO_MEDIA_PARAMETERS, *PCO_MEDIA_PARAMETERS;
|
---|
1061 |
|
---|
1062 | /* CO_CALL_PARAMETERS.Flags constants */
|
---|
1063 | #define PERMANENT_VC 0x00000001
|
---|
1064 | #define CALL_PARAMETERS_CHANGED 0x00000002
|
---|
1065 | #define QUERY_CALL_PARAMETERS 0x00000004
|
---|
1066 | #define BROADCAST_VC 0x00000008
|
---|
1067 | #define MULTIPOINT_VC 0x00000010
|
---|
1068 |
|
---|
1069 | typedef struct _CO_CALL_PARAMETERS {
|
---|
1070 | ULONG Flags;
|
---|
1071 | PCO_CALL_MANAGER_PARAMETERS CallMgrParameters;
|
---|
1072 | PCO_MEDIA_PARAMETERS MediaParameters;
|
---|
1073 | } CO_CALL_PARAMETERS, *PCO_CALL_PARAMETERS;
|
---|
1074 |
|
---|
1075 | typedef struct _CO_SAP {
|
---|
1076 | ULONG SapType;
|
---|
1077 | ULONG SapLength;
|
---|
1078 | UCHAR Sap[1];
|
---|
1079 | } CO_SAP, *PCO_SAP;
|
---|
1080 |
|
---|
1081 | #if NDIS_LEGACY_DRIVER
|
---|
1082 | typedef struct _NDIS_IPSEC_PACKET_INFO {
|
---|
1083 | __MINGW_EXTENSION union {
|
---|
1084 | struct {
|
---|
1085 | NDIS_HANDLE OffloadHandle;
|
---|
1086 | NDIS_HANDLE NextOffloadHandle;
|
---|
1087 | } Transmit;
|
---|
1088 | struct {
|
---|
1089 | ULONG SA_DELETE_REQ:1;
|
---|
1090 | ULONG CRYPTO_DONE:1;
|
---|
1091 | ULONG NEXT_CRYPTO_DONE:1;
|
---|
1092 | ULONG CryptoStatus;
|
---|
1093 | } Receive;
|
---|
1094 | };
|
---|
1095 | } NDIS_IPSEC_PACKET_INFO, *PNDIS_IPSEC_PACKET_INFO;
|
---|
1096 | #endif
|
---|
1097 |
|
---|
1098 | #if (NDIS_SUPPORT_NDIS6 || NDIS60)
|
---|
1099 | typedef struct _NDIS_IPSEC_OFFLOAD_V1_NET_BUFFER_LIST_INFO {
|
---|
1100 | __MINGW_EXTENSION union {
|
---|
1101 | struct {
|
---|
1102 | NDIS_HANDLE OffloadHandle;
|
---|
1103 | } Transmit;
|
---|
1104 | struct {
|
---|
1105 | USHORT SaDeleteReq:1;
|
---|
1106 | USHORT CryptoDone:1;
|
---|
1107 | USHORT NextCryptoDone:1;
|
---|
1108 | USHORT Pad:13;
|
---|
1109 | USHORT CryptoStatus;
|
---|
1110 | } Receive;
|
---|
1111 | };
|
---|
1112 | } NDIS_IPSEC_OFFLOAD_V1_NET_BUFFER_LIST_INFO, *PNDIS_IPSEC_OFFLOAD_V1_NET_BUFFER_LIST_INFO;
|
---|
1113 | #endif
|
---|
1114 |
|
---|
1115 | /* NDIS_MAC_FRAGMENT.Errors constants */
|
---|
1116 | #define WAN_ERROR_CRC 0x00000001
|
---|
1117 | #define WAN_ERROR_FRAMING 0x00000002
|
---|
1118 | #define WAN_ERROR_HARDWAREOVERRUN 0x00000004
|
---|
1119 | #define WAN_ERROR_BUFFEROVERRUN 0x00000008
|
---|
1120 | #define WAN_ERROR_TIMEOUT 0x00000010
|
---|
1121 | #define WAN_ERROR_ALIGNMENT 0x00000020
|
---|
1122 |
|
---|
1123 | typedef struct _NDIS_MAC_FRAGMENT {
|
---|
1124 | NDIS_HANDLE NdisLinkContext;
|
---|
1125 | ULONG Errors;
|
---|
1126 | } NDIS_MAC_FRAGMENT, *PNDIS_MAC_FRAGMENT;
|
---|
1127 |
|
---|
1128 | typedef struct _NDIS_MAC_LINE_DOWN {
|
---|
1129 | NDIS_HANDLE NdisLinkContext;
|
---|
1130 | } NDIS_MAC_LINE_DOWN, *PNDIS_MAC_LINE_DOWN;
|
---|
1131 |
|
---|
1132 | typedef struct _NDIS_MAC_LINE_UP {
|
---|
1133 | ULONG LinkSpeed;
|
---|
1134 | NDIS_WAN_QUALITY Quality;
|
---|
1135 | USHORT SendWindow;
|
---|
1136 | NDIS_HANDLE ConnectionWrapperID;
|
---|
1137 | NDIS_HANDLE NdisLinkHandle;
|
---|
1138 | NDIS_HANDLE NdisLinkContext;
|
---|
1139 | } NDIS_MAC_LINE_UP, *PNDIS_MAC_LINE_UP;
|
---|
1140 |
|
---|
1141 | typedef struct _NDIS_PACKET_8021Q_INFO {
|
---|
1142 | __MINGW_EXTENSION union {
|
---|
1143 | struct {
|
---|
1144 | UINT32 UserPriority:3;
|
---|
1145 | UINT32 CanonicalFormatId:1;
|
---|
1146 | UINT32 VlanId:12;
|
---|
1147 | UINT32 Reserved:16;
|
---|
1148 | } TagHeader;
|
---|
1149 | PVOID Value;
|
---|
1150 | };
|
---|
1151 | } NDIS_PACKET_8021Q_INFO, *PNDIS_PACKET_8021Q_INFO;
|
---|
1152 |
|
---|
1153 | typedef enum _NDIS_PER_PACKET_INFO {
|
---|
1154 | TcpIpChecksumPacketInfo,
|
---|
1155 | IpSecPacketInfo,
|
---|
1156 | TcpLargeSendPacketInfo,
|
---|
1157 | ClassificationHandlePacketInfo,
|
---|
1158 | NdisReserved,
|
---|
1159 | ScatterGatherListPacketInfo,
|
---|
1160 | Ieee8021QInfo,
|
---|
1161 | OriginalPacketInfo,
|
---|
1162 | PacketCancelId,
|
---|
1163 | OriginalNetBufferList,
|
---|
1164 | CachedNetBufferList,
|
---|
1165 | ShortPacketPaddingInfo,
|
---|
1166 | MaxPerPacketInfo
|
---|
1167 | } NDIS_PER_PACKET_INFO, *PNDIS_PER_PACKET_INFO;
|
---|
1168 |
|
---|
1169 | #if NDIS_LEGACY_DRIVER
|
---|
1170 |
|
---|
1171 | typedef struct _NDIS_PACKET_EXTENSION {
|
---|
1172 | PVOID NdisPacketInfo[MaxPerPacketInfo];
|
---|
1173 | } NDIS_PACKET_EXTENSION, *PNDIS_PACKET_EXTENSION;
|
---|
1174 |
|
---|
1175 | typedef enum _NDIS_TASK {
|
---|
1176 | TcpIpChecksumNdisTask,
|
---|
1177 | IpSecNdisTask,
|
---|
1178 | TcpLargeSendNdisTask,
|
---|
1179 | MaxNdisTask
|
---|
1180 | } NDIS_TASK, *PNDIS_TASK;
|
---|
1181 |
|
---|
1182 | typedef enum _NDIS_ENCAPSULATION {
|
---|
1183 | UNSPECIFIED_Encapsulation,
|
---|
1184 | NULL_Encapsulation,
|
---|
1185 | IEEE_802_3_Encapsulation,
|
---|
1186 | IEEE_802_5_Encapsulation,
|
---|
1187 | LLC_SNAP_ROUTED_Encapsulation,
|
---|
1188 | LLC_SNAP_BRIDGED_Encapsulation
|
---|
1189 | } NDIS_ENCAPSULATION;
|
---|
1190 |
|
---|
1191 | typedef struct _NDIS_ENCAPSULATION_FORMAT {
|
---|
1192 | NDIS_ENCAPSULATION Encapsulation;
|
---|
1193 | struct {
|
---|
1194 | ULONG FixedHeaderSize:1;
|
---|
1195 | ULONG Reserved:31;
|
---|
1196 | } Flags;
|
---|
1197 | ULONG EncapsulationHeaderSize;
|
---|
1198 | } NDIS_ENCAPSULATION_FORMAT, *PNDIS_ENCAPSULATION_FORMAT;
|
---|
1199 |
|
---|
1200 | typedef struct _NDIS_TASK_OFFLOAD_HEADER {
|
---|
1201 | ULONG Version;
|
---|
1202 | ULONG Size;
|
---|
1203 | ULONG Reserved;
|
---|
1204 | ULONG OffsetFirstTask;
|
---|
1205 | NDIS_ENCAPSULATION_FORMAT EncapsulationFormat;
|
---|
1206 | } NDIS_TASK_OFFLOAD_HEADER, *PNDIS_TASK_OFFLOAD_HEADER;
|
---|
1207 |
|
---|
1208 | typedef struct _NDIS_TASK_OFFLOAD {
|
---|
1209 | ULONG Version;
|
---|
1210 | ULONG Size;
|
---|
1211 | NDIS_TASK Task;
|
---|
1212 | ULONG OffsetNextTask;
|
---|
1213 | ULONG TaskBufferLength;
|
---|
1214 | UCHAR TaskBuffer[1];
|
---|
1215 | } NDIS_TASK_OFFLOAD, *PNDIS_TASK_OFFLOAD;
|
---|
1216 |
|
---|
1217 | typedef struct _NDIS_TASK_TCP_IP_CHECKSUM {
|
---|
1218 | struct {
|
---|
1219 | ULONG IpOptionsSupported:1;
|
---|
1220 | ULONG TcpOptionsSupported:1;
|
---|
1221 | ULONG TcpChecksum:1;
|
---|
1222 | ULONG UdpChecksum:1;
|
---|
1223 | ULONG IpChecksum:1;
|
---|
1224 | } V4Transmit;
|
---|
1225 | struct {
|
---|
1226 | ULONG IpOptionsSupported:1;
|
---|
1227 | ULONG TcpOptionsSupported:1;
|
---|
1228 | ULONG TcpChecksum:1;
|
---|
1229 | ULONG UdpChecksum:1;
|
---|
1230 | ULONG IpChecksum:1;
|
---|
1231 | } V4Receive;
|
---|
1232 | struct {
|
---|
1233 | ULONG IpOptionsSupported:1;
|
---|
1234 | ULONG TcpOptionsSupported:1;
|
---|
1235 | ULONG TcpChecksum:1;
|
---|
1236 | ULONG UdpChecksum:1;
|
---|
1237 | } V6Transmit;
|
---|
1238 | struct {
|
---|
1239 | ULONG IpOptionsSupported:1;
|
---|
1240 | ULONG TcpOptionsSupported:1;
|
---|
1241 | ULONG TcpChecksum:1;
|
---|
1242 | ULONG UdpChecksum:1;
|
---|
1243 | } V6Receive;
|
---|
1244 | } NDIS_TASK_TCP_IP_CHECKSUM, *PNDIS_TASK_TCP_IP_CHECKSUM;
|
---|
1245 |
|
---|
1246 | #define NDIS_TASK_TCP_LARGE_SEND_V0 0
|
---|
1247 |
|
---|
1248 | typedef struct _NDIS_TASK_TCP_LARGE_SEND {
|
---|
1249 | ULONG Version;
|
---|
1250 | ULONG MaxOffLoadSize;
|
---|
1251 | ULONG MinSegmentCount;
|
---|
1252 | BOOLEAN TcpOptions;
|
---|
1253 | BOOLEAN IpOptions;
|
---|
1254 | } NDIS_TASK_TCP_LARGE_SEND, *PNDIS_TASK_TCP_LARGE_SEND;
|
---|
1255 |
|
---|
1256 | typedef struct _NDIS_TASK_IPSEC {
|
---|
1257 | struct {
|
---|
1258 | ULONG AH_ESP_COMBINED;
|
---|
1259 | ULONG TRANSPORT_TUNNEL_COMBINED;
|
---|
1260 | ULONG V4_OPTIONS;
|
---|
1261 | ULONG RESERVED;
|
---|
1262 | } Supported;
|
---|
1263 | struct {
|
---|
1264 | ULONG MD5:1;
|
---|
1265 | ULONG SHA_1:1;
|
---|
1266 | ULONG Transport:1;
|
---|
1267 | ULONG Tunnel:1;
|
---|
1268 | ULONG Send:1;
|
---|
1269 | ULONG Receive:1;
|
---|
1270 | } V4AH;
|
---|
1271 | struct {
|
---|
1272 | ULONG DES:1;
|
---|
1273 | ULONG RESERVED:1;
|
---|
1274 | ULONG TRIPLE_DES:1;
|
---|
1275 | ULONG NULL_ESP:1;
|
---|
1276 | ULONG Transport:1;
|
---|
1277 | ULONG Tunnel:1;
|
---|
1278 | ULONG Send:1;
|
---|
1279 | ULONG Receive:1;
|
---|
1280 | } V4ESP;
|
---|
1281 | } NDIS_TASK_IPSEC, *PNDIS_TASK_IPSEC;
|
---|
1282 |
|
---|
1283 | #endif /* NDIS_LEGACY_DRIVER */
|
---|
1284 |
|
---|
1285 | #define IPSEC_TPT_UDPESP_ENCAPTYPE_IKE 0x00000001
|
---|
1286 | #define IPSEC_TUN_UDPESP_ENCAPTYPE_IKE 0x00000002
|
---|
1287 | #define IPSEC_TPTOVERTUN_UDPESP_ENCAPTYPE_IKE 0x00000004
|
---|
1288 | #define IPSEC_TPT_UDPESP_OVER_PURE_TUN_ENCAPTYPE_IKE 0x00000008
|
---|
1289 | #define IPSEC_TPT_UDPESP_ENCAPTYPE_OTHER 0x00000010
|
---|
1290 | #define IPSEC_TUN_UDPESP_ENCAPTYPE_OTHER 0x00000020
|
---|
1291 | #define IPSEC_TPTOVERTUN_UDPESP_ENCAPTYPE_OTHER 0x00000040
|
---|
1292 | #define IPSEC_TPT_UDPESP_OVER_PURE_TUN_ENCAPTYPE_OTHER 0x00000080
|
---|
1293 |
|
---|
1294 | #if NDIS_LEGACY_DRIVER
|
---|
1295 |
|
---|
1296 | /*
|
---|
1297 | * PNDIS_PACKET
|
---|
1298 | * NDIS_GET_ORIGINAL_PACKET(
|
---|
1299 | * IN PNDIS_PACKET Packet);
|
---|
1300 | */
|
---|
1301 | #define NDIS_GET_ORIGINAL_PACKET(Packet) \
|
---|
1302 | NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, OriginalPacketInfo)
|
---|
1303 |
|
---|
1304 | /*
|
---|
1305 | * PVOID
|
---|
1306 | * NDIS_GET_PACKET_CANCEL_ID(
|
---|
1307 | * IN PNDIS_PACKET Packet);
|
---|
1308 | */
|
---|
1309 | #define NDIS_GET_PACKET_CANCEL_ID(Packet) \
|
---|
1310 | NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, PacketCancelId)
|
---|
1311 |
|
---|
1312 | /*
|
---|
1313 | * PNDIS_PACKET_EXTENSION
|
---|
1314 | * NDIS_PACKET_EXTENSION_FROM_PACKET(
|
---|
1315 | * IN PNDIS_PACKET Packet);
|
---|
1316 | */
|
---|
1317 | #define NDIS_PACKET_EXTENSION_FROM_PACKET(Packet) \
|
---|
1318 | ((PNDIS_PACKET_EXTENSION)((PUCHAR)(Packet) \
|
---|
1319 | + (Packet)->Private.NdisPacketOobOffset + sizeof(NDIS_PACKET_OOB_DATA)))
|
---|
1320 |
|
---|
1321 | /*
|
---|
1322 | * PVOID
|
---|
1323 | * NDIS_PER_PACKET_INFO_FROM_PACKET(
|
---|
1324 | * IN OUT PNDIS_PACKET Packet,
|
---|
1325 | * IN NDIS_PER_PACKET_INFO InfoType);
|
---|
1326 | */
|
---|
1327 | #define NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, InfoType) \
|
---|
1328 | ((PNDIS_PACKET_EXTENSION)((PUCHAR)(Packet) + (Packet)->Private.NdisPacketOobOffset \
|
---|
1329 | + sizeof(NDIS_PACKET_OOB_DATA)))->NdisPacketInfo[(InfoType)]
|
---|
1330 |
|
---|
1331 | /*
|
---|
1332 | * VOID
|
---|
1333 | * NDIS_SET_ORIGINAL_PACKET(
|
---|
1334 | * IN OUT PNDIS_PACKET Packet,
|
---|
1335 | * IN PNDIS_PACKET OriginalPacket);
|
---|
1336 | */
|
---|
1337 | #define NDIS_SET_ORIGINAL_PACKET(Packet, OriginalPacket) \
|
---|
1338 | NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, OriginalPacketInfo) = (OriginalPacket)
|
---|
1339 |
|
---|
1340 | /*
|
---|
1341 | * VOID
|
---|
1342 | * NDIS_SET_PACKET_CANCEL_ID(
|
---|
1343 | * IN PNDIS_PACKET Packet
|
---|
1344 | * IN ULONG_PTR CancelId);
|
---|
1345 | */
|
---|
1346 | #define NDIS_SET_PACKET_CANCEL_ID(Packet, CancelId) \
|
---|
1347 | NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, PacketCancelId) = (CancelId)
|
---|
1348 |
|
---|
1349 | #define NdisSetPacketCancelId(_Packet, _CancelId) NDIS_SET_PACKET_CANCEL_ID(_Packet, _CancelId)
|
---|
1350 | #define NdisGetPacketCancelId(_Packet) NDIS_GET_PACKET_CANCEL_ID(_Packet)
|
---|
1351 |
|
---|
1352 | #endif /* NDIS_LEGACY_DRIVER */
|
---|
1353 |
|
---|
1354 | #if NDIS_SUPPORT_NDIS6
|
---|
1355 | typedef struct _NDIS_GENERIC_OBJECT {
|
---|
1356 | NDIS_OBJECT_HEADER Header;
|
---|
1357 | PVOID Caller;
|
---|
1358 | PVOID CallersCaller;
|
---|
1359 | PDRIVER_OBJECT DriverObject;
|
---|
1360 | } NDIS_GENERIC_OBJECT, *PNDIS_GENERIC_OBJECT;
|
---|
1361 | #endif
|
---|
1362 |
|
---|
1363 | /* NDIS_TASK_OFFLOAD_HEADER.Version constants */
|
---|
1364 | #define NDIS_TASK_OFFLOAD_VERSION 1
|
---|
1365 |
|
---|
1366 | #define MAX_HASHES 4
|
---|
1367 | #define TRUNCATED_HASH_LEN 12
|
---|
1368 |
|
---|
1369 | #define CRYPTO_SUCCESS 0
|
---|
1370 | #define CRYPTO_GENERIC_ERROR 1
|
---|
1371 | #define CRYPTO_TRANSPORT_AH_AUTH_FAILED 2
|
---|
1372 | #define CRYPTO_TRANSPORT_ESP_AUTH_FAILED 3
|
---|
1373 | #define CRYPTO_TUNNEL_AH_AUTH_FAILED 4
|
---|
1374 | #define CRYPTO_TUNNEL_ESP_AUTH_FAILED 5
|
---|
1375 | #define CRYPTO_INVALID_PACKET_SYNTAX 6
|
---|
1376 | #define CRYPTO_INVALID_PROTOCOL 7
|
---|
1377 |
|
---|
1378 | typedef struct _NDIS_TCP_IP_CHECKSUM_PACKET_INFO {
|
---|
1379 | __MINGW_EXTENSION union {
|
---|
1380 | struct {
|
---|
1381 | ULONG NdisPacketChecksumV4:1;
|
---|
1382 | ULONG NdisPacketChecksumV6:1;
|
---|
1383 | ULONG NdisPacketTcpChecksum:1;
|
---|
1384 | ULONG NdisPacketUdpChecksum:1;
|
---|
1385 | ULONG NdisPacketIpChecksum:1;
|
---|
1386 | } Transmit;
|
---|
1387 | struct {
|
---|
1388 | ULONG NdisPacketTcpChecksumFailed:1;
|
---|
1389 | ULONG NdisPacketUdpChecksumFailed:1;
|
---|
1390 | ULONG NdisPacketIpChecksumFailed:1;
|
---|
1391 | ULONG NdisPacketTcpChecksumSucceeded:1;
|
---|
1392 | ULONG NdisPacketUdpChecksumSucceeded:1;
|
---|
1393 | ULONG NdisPacketIpChecksumSucceeded:1;
|
---|
1394 | ULONG NdisPacketLoopback:1;
|
---|
1395 | } Receive;
|
---|
1396 | ULONG Value;
|
---|
1397 | };
|
---|
1398 | } NDIS_TCP_IP_CHECKSUM_PACKET_INFO, *PNDIS_TCP_IP_CHECKSUM_PACKET_INFO;
|
---|
1399 |
|
---|
1400 | typedef struct _NDIS_WAN_CO_FRAGMENT {
|
---|
1401 | ULONG Errors;
|
---|
1402 | } NDIS_WAN_CO_FRAGMENT, *PNDIS_WAN_CO_FRAGMENT;
|
---|
1403 |
|
---|
1404 | typedef struct _NDIS_WAN_FRAGMENT {
|
---|
1405 | UCHAR RemoteAddress[6];
|
---|
1406 | UCHAR LocalAddress[6];
|
---|
1407 | } NDIS_WAN_FRAGMENT, *PNDIS_WAN_FRAGMENT;
|
---|
1408 |
|
---|
1409 | typedef struct _WAN_CO_LINKPARAMS {
|
---|
1410 | ULONG TransmitSpeed;
|
---|
1411 | ULONG ReceiveSpeed;
|
---|
1412 | ULONG SendWindow;
|
---|
1413 | } WAN_CO_LINKPARAMS, *PWAN_CO_LINKPARAMS;
|
---|
1414 |
|
---|
1415 | typedef struct _NDIS_WAN_GET_STATS {
|
---|
1416 | UCHAR LocalAddress[6];
|
---|
1417 | ULONG BytesSent;
|
---|
1418 | ULONG BytesRcvd;
|
---|
1419 | ULONG FramesSent;
|
---|
1420 | ULONG FramesRcvd;
|
---|
1421 | ULONG CRCErrors;
|
---|
1422 | ULONG TimeoutErrors;
|
---|
1423 | ULONG AlignmentErrors;
|
---|
1424 | ULONG SerialOverrunErrors;
|
---|
1425 | ULONG FramingErrors;
|
---|
1426 | ULONG BufferOverrunErrors;
|
---|
1427 | ULONG BytesTransmittedUncompressed;
|
---|
1428 | ULONG BytesReceivedUncompressed;
|
---|
1429 | ULONG BytesTransmittedCompressed;
|
---|
1430 | ULONG BytesReceivedCompressed;
|
---|
1431 | } NDIS_WAN_GET_STATS, *PNDIS_WAN_GET_STATS;
|
---|
1432 |
|
---|
1433 | /* Call Manager */
|
---|
1434 |
|
---|
1435 | typedef VOID
|
---|
1436 | (NTAPI *CM_ACTIVATE_VC_COMPLETE_HANDLER)(
|
---|
1437 | IN NDIS_STATUS Status,
|
---|
1438 | IN NDIS_HANDLE CallMgrVcContext,
|
---|
1439 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
1440 |
|
---|
1441 | typedef NDIS_STATUS
|
---|
1442 | (NTAPI *CM_ADD_PARTY_HANDLER)(
|
---|
1443 | IN NDIS_HANDLE CallMgrVcContext,
|
---|
1444 | IN OUT PCO_CALL_PARAMETERS CallParameters,
|
---|
1445 | IN NDIS_HANDLE NdisPartyHandle,
|
---|
1446 | OUT PNDIS_HANDLE CallMgrPartyContext);
|
---|
1447 |
|
---|
1448 | typedef NDIS_STATUS
|
---|
1449 | (NTAPI *CM_CLOSE_AF_HANDLER)(
|
---|
1450 | IN NDIS_HANDLE CallMgrAfContext);
|
---|
1451 |
|
---|
1452 | typedef NDIS_STATUS
|
---|
1453 | (NTAPI *CM_CLOSE_CALL_HANDLER)(
|
---|
1454 | IN NDIS_HANDLE CallMgrVcContext,
|
---|
1455 | IN NDIS_HANDLE CallMgrPartyContext OPTIONAL,
|
---|
1456 | IN PVOID CloseData OPTIONAL,
|
---|
1457 | IN UINT Size OPTIONAL);
|
---|
1458 |
|
---|
1459 | typedef NDIS_STATUS
|
---|
1460 | (NTAPI *CM_DEREG_SAP_HANDLER)(
|
---|
1461 | IN NDIS_HANDLE CallMgrSapContext);
|
---|
1462 |
|
---|
1463 | typedef VOID
|
---|
1464 | (NTAPI *CM_DEACTIVATE_VC_COMPLETE_HANDLER)(
|
---|
1465 | IN NDIS_STATUS Status,
|
---|
1466 | IN NDIS_HANDLE CallMgrVcContext);
|
---|
1467 |
|
---|
1468 | typedef NDIS_STATUS
|
---|
1469 | (NTAPI *CM_DROP_PARTY_HANDLER)(
|
---|
1470 | IN NDIS_HANDLE CallMgrPartyContext,
|
---|
1471 | IN PVOID CloseData OPTIONAL,
|
---|
1472 | IN UINT Size OPTIONAL);
|
---|
1473 |
|
---|
1474 | typedef VOID
|
---|
1475 | (NTAPI *CM_INCOMING_CALL_COMPLETE_HANDLER)(
|
---|
1476 | IN NDIS_STATUS Status,
|
---|
1477 | IN NDIS_HANDLE CallMgrVcContext,
|
---|
1478 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
1479 |
|
---|
1480 | typedef NDIS_STATUS
|
---|
1481 | (NTAPI *CM_MAKE_CALL_HANDLER)(
|
---|
1482 | IN NDIS_HANDLE CallMgrVcContext,
|
---|
1483 | IN OUT PCO_CALL_PARAMETERS CallParameters,
|
---|
1484 | IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
|
---|
1485 | OUT PNDIS_HANDLE CallMgrPartyContext OPTIONAL);
|
---|
1486 |
|
---|
1487 | typedef NDIS_STATUS
|
---|
1488 | (NTAPI *CM_MODIFY_CALL_QOS_HANDLER)(
|
---|
1489 | IN NDIS_HANDLE CallMgrVcContext,
|
---|
1490 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
1491 |
|
---|
1492 | typedef NDIS_STATUS
|
---|
1493 | (NTAPI *CM_OPEN_AF_HANDLER)(
|
---|
1494 | IN NDIS_HANDLE CallMgrBindingContext,
|
---|
1495 | IN PCO_ADDRESS_FAMILY AddressFamily,
|
---|
1496 | IN NDIS_HANDLE NdisAfHandle,
|
---|
1497 | OUT PNDIS_HANDLE CallMgrAfContext);
|
---|
1498 |
|
---|
1499 | typedef NDIS_STATUS
|
---|
1500 | (NTAPI *CM_REG_SAP_HANDLER)(
|
---|
1501 | IN NDIS_HANDLE CallMgrAfContext,
|
---|
1502 | IN PCO_SAP Sap,
|
---|
1503 | IN NDIS_HANDLE NdisSapHandle,
|
---|
1504 | OUT PNDIS_HANDLE CallMgrSapContext);
|
---|
1505 |
|
---|
1506 | typedef NDIS_STATUS
|
---|
1507 | (NTAPI *CO_CREATE_VC_HANDLER)(
|
---|
1508 | IN NDIS_HANDLE ProtocolAfContext,
|
---|
1509 | IN NDIS_HANDLE NdisVcHandle,
|
---|
1510 | OUT PNDIS_HANDLE ProtocolVcContext);
|
---|
1511 |
|
---|
1512 | typedef NDIS_STATUS
|
---|
1513 | (NTAPI *CO_DELETE_VC_HANDLER)(
|
---|
1514 | IN NDIS_HANDLE ProtocolVcContext);
|
---|
1515 |
|
---|
1516 | #define PROTOCOL_RESERVED_SIZE_IN_PACKET (4 * sizeof(PVOID))
|
---|
1517 |
|
---|
1518 | /* Prototypes for NDIS 5.0 protocol characteristics */
|
---|
1519 |
|
---|
1520 | typedef VOID
|
---|
1521 | (NTAPI *CO_SEND_COMPLETE_HANDLER)(
|
---|
1522 | IN NDIS_STATUS Status,
|
---|
1523 | IN NDIS_HANDLE ProtocolVcContext,
|
---|
1524 | IN PNDIS_PACKET Packet);
|
---|
1525 |
|
---|
1526 | typedef VOID
|
---|
1527 | (NTAPI *CO_STATUS_HANDLER)(
|
---|
1528 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1529 | IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
|
---|
1530 | IN NDIS_STATUS GeneralStatus,
|
---|
1531 | IN PVOID StatusBuffer,
|
---|
1532 | IN UINT StatusBufferSize);
|
---|
1533 |
|
---|
1534 | typedef UINT
|
---|
1535 | (NTAPI *CO_RECEIVE_PACKET_HANDLER)(
|
---|
1536 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1537 | IN NDIS_HANDLE ProtocolVcContext,
|
---|
1538 | IN PNDIS_PACKET Packet);
|
---|
1539 |
|
---|
1540 | typedef NDIS_STATUS
|
---|
1541 | (NTAPI *CO_REQUEST_HANDLER)(
|
---|
1542 | IN NDIS_HANDLE ProtocolAfContext,
|
---|
1543 | IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
|
---|
1544 | IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
|
---|
1545 | IN OUT PNDIS_REQUEST NdisRequest);
|
---|
1546 |
|
---|
1547 | typedef VOID
|
---|
1548 | (NTAPI *CO_REQUEST_COMPLETE_HANDLER)(
|
---|
1549 | IN NDIS_STATUS Status,
|
---|
1550 | IN NDIS_HANDLE ProtocolAfContext OPTIONAL,
|
---|
1551 | IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
|
---|
1552 | IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
|
---|
1553 | IN PNDIS_REQUEST NdisRequest);
|
---|
1554 |
|
---|
1555 | typedef struct _NDIS_CALL_MANAGER_CHARACTERISTICS {
|
---|
1556 | UCHAR MajorVersion;
|
---|
1557 | UCHAR MinorVersion;
|
---|
1558 | USHORT Filler;
|
---|
1559 | UINT Reserved;
|
---|
1560 | CO_CREATE_VC_HANDLER CmCreateVcHandler;
|
---|
1561 | CO_DELETE_VC_HANDLER CmDeleteVcHandler;
|
---|
1562 | CM_OPEN_AF_HANDLER CmOpenAfHandler;
|
---|
1563 | CM_CLOSE_AF_HANDLER CmCloseAfHandler;
|
---|
1564 | CM_REG_SAP_HANDLER CmRegisterSapHandler;
|
---|
1565 | CM_DEREG_SAP_HANDLER CmDeregisterSapHandler;
|
---|
1566 | CM_MAKE_CALL_HANDLER CmMakeCallHandler;
|
---|
1567 | CM_CLOSE_CALL_HANDLER CmCloseCallHandler;
|
---|
1568 | CM_INCOMING_CALL_COMPLETE_HANDLER CmIncomingCallCompleteHandler;
|
---|
1569 | CM_ADD_PARTY_HANDLER CmAddPartyHandler;
|
---|
1570 | CM_DROP_PARTY_HANDLER CmDropPartyHandler;
|
---|
1571 | CM_ACTIVATE_VC_COMPLETE_HANDLER CmActivateVcCompleteHandler;
|
---|
1572 | CM_DEACTIVATE_VC_COMPLETE_HANDLER CmDeactivateVcCompleteHandler;
|
---|
1573 | CM_MODIFY_CALL_QOS_HANDLER CmModifyCallQoSHandler;
|
---|
1574 | CO_REQUEST_HANDLER CmRequestHandler;
|
---|
1575 | CO_REQUEST_COMPLETE_HANDLER CmRequestCompleteHandler;
|
---|
1576 | } NDIS_CALL_MANAGER_CHARACTERISTICS, *PNDIS_CALL_MANAGER_CHARACTERISTICS;
|
---|
1577 |
|
---|
1578 |
|
---|
1579 |
|
---|
1580 | /* Call Manager clients */
|
---|
1581 |
|
---|
1582 | typedef VOID (*CL_OPEN_AF_COMPLETE_HANDLER)(
|
---|
1583 | IN NDIS_STATUS Status,
|
---|
1584 | IN NDIS_HANDLE ProtocolAfContext,
|
---|
1585 | IN NDIS_HANDLE NdisAfHandle);
|
---|
1586 |
|
---|
1587 | typedef VOID
|
---|
1588 | (NTAPI *CL_CLOSE_AF_COMPLETE_HANDLER)(
|
---|
1589 | IN NDIS_STATUS Status,
|
---|
1590 | IN NDIS_HANDLE ProtocolAfContext);
|
---|
1591 |
|
---|
1592 | typedef VOID
|
---|
1593 | (NTAPI *CL_REG_SAP_COMPLETE_HANDLER)(
|
---|
1594 | IN NDIS_STATUS Status,
|
---|
1595 | IN NDIS_HANDLE ProtocolSapContext,
|
---|
1596 | IN PCO_SAP Sap,
|
---|
1597 | IN NDIS_HANDLE NdisSapHandle);
|
---|
1598 |
|
---|
1599 | typedef VOID
|
---|
1600 | (NTAPI *CL_DEREG_SAP_COMPLETE_HANDLER)(
|
---|
1601 | IN NDIS_STATUS Status,
|
---|
1602 | IN NDIS_HANDLE ProtocolSapContext);
|
---|
1603 |
|
---|
1604 | typedef VOID
|
---|
1605 | (NTAPI *CL_MAKE_CALL_COMPLETE_HANDLER)(
|
---|
1606 | IN NDIS_STATUS Status,
|
---|
1607 | IN NDIS_HANDLE ProtocolVcContext,
|
---|
1608 | IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
|
---|
1609 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
1610 |
|
---|
1611 | typedef VOID
|
---|
1612 | (NTAPI *CL_MODIFY_CALL_QOS_COMPLETE_HANDLER)(
|
---|
1613 | IN NDIS_STATUS Status,
|
---|
1614 | IN NDIS_HANDLE ProtocolVcContext,
|
---|
1615 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
1616 |
|
---|
1617 | typedef VOID
|
---|
1618 | (NTAPI *CL_CLOSE_CALL_COMPLETE_HANDLER)(
|
---|
1619 | IN NDIS_STATUS Status,
|
---|
1620 | IN NDIS_HANDLE ProtocolVcContext,
|
---|
1621 | IN NDIS_HANDLE ProtocolPartyContext OPTIONAL);
|
---|
1622 |
|
---|
1623 | typedef VOID
|
---|
1624 | (NTAPI *CL_ADD_PARTY_COMPLETE_HANDLER)(
|
---|
1625 | IN NDIS_STATUS Status,
|
---|
1626 | IN NDIS_HANDLE ProtocolPartyContext,
|
---|
1627 | IN NDIS_HANDLE NdisPartyHandle,
|
---|
1628 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
1629 |
|
---|
1630 | typedef VOID
|
---|
1631 | (NTAPI *CL_DROP_PARTY_COMPLETE_HANDLER)(
|
---|
1632 | IN NDIS_STATUS Status,
|
---|
1633 | IN NDIS_HANDLE ProtocolPartyContext);
|
---|
1634 |
|
---|
1635 | typedef NDIS_STATUS
|
---|
1636 | (NTAPI *CL_INCOMING_CALL_HANDLER)(
|
---|
1637 | IN NDIS_HANDLE ProtocolSapContext,
|
---|
1638 | IN NDIS_HANDLE ProtocolVcContext,
|
---|
1639 | IN OUT PCO_CALL_PARAMETERS CallParameters);
|
---|
1640 |
|
---|
1641 | typedef VOID
|
---|
1642 | (NTAPI *CL_INCOMING_CALL_QOS_CHANGE_HANDLER)(
|
---|
1643 | IN NDIS_HANDLE ProtocolVcContext,
|
---|
1644 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
1645 |
|
---|
1646 | typedef VOID
|
---|
1647 | (NTAPI *CL_INCOMING_CLOSE_CALL_HANDLER)(
|
---|
1648 | IN NDIS_STATUS CloseStatus,
|
---|
1649 | IN NDIS_HANDLE ProtocolVcContext,
|
---|
1650 | IN PVOID CloseData OPTIONAL,
|
---|
1651 | IN UINT Size OPTIONAL);
|
---|
1652 |
|
---|
1653 | typedef VOID
|
---|
1654 | (NTAPI *CL_INCOMING_DROP_PARTY_HANDLER)(
|
---|
1655 | IN NDIS_STATUS DropStatus,
|
---|
1656 | IN NDIS_HANDLE ProtocolPartyContext,
|
---|
1657 | IN PVOID CloseData OPTIONAL,
|
---|
1658 | IN UINT Size OPTIONAL);
|
---|
1659 |
|
---|
1660 | typedef VOID
|
---|
1661 | (NTAPI *CL_CALL_CONNECTED_HANDLER)(
|
---|
1662 | IN NDIS_HANDLE ProtocolVcContext);
|
---|
1663 |
|
---|
1664 |
|
---|
1665 | typedef struct _NDIS_CLIENT_CHARACTERISTICS {
|
---|
1666 | UCHAR MajorVersion;
|
---|
1667 | UCHAR MinorVersion;
|
---|
1668 | USHORT Filler;
|
---|
1669 | UINT Reserved;
|
---|
1670 | CO_CREATE_VC_HANDLER ClCreateVcHandler;
|
---|
1671 | CO_DELETE_VC_HANDLER ClDeleteVcHandler;
|
---|
1672 | CO_REQUEST_HANDLER ClRequestHandler;
|
---|
1673 | CO_REQUEST_COMPLETE_HANDLER ClRequestCompleteHandler;
|
---|
1674 | CL_OPEN_AF_COMPLETE_HANDLER ClOpenAfCompleteHandler;
|
---|
1675 | CL_CLOSE_AF_COMPLETE_HANDLER ClCloseAfCompleteHandler;
|
---|
1676 | CL_REG_SAP_COMPLETE_HANDLER ClRegisterSapCompleteHandler;
|
---|
1677 | CL_DEREG_SAP_COMPLETE_HANDLER ClDeregisterSapCompleteHandler;
|
---|
1678 | CL_MAKE_CALL_COMPLETE_HANDLER ClMakeCallCompleteHandler;
|
---|
1679 | CL_MODIFY_CALL_QOS_COMPLETE_HANDLER ClModifyCallQoSCompleteHandler;
|
---|
1680 | CL_CLOSE_CALL_COMPLETE_HANDLER ClCloseCallCompleteHandler;
|
---|
1681 | CL_ADD_PARTY_COMPLETE_HANDLER ClAddPartyCompleteHandler;
|
---|
1682 | CL_DROP_PARTY_COMPLETE_HANDLER ClDropPartyCompleteHandler;
|
---|
1683 | CL_INCOMING_CALL_HANDLER ClIncomingCallHandler;
|
---|
1684 | CL_INCOMING_CALL_QOS_CHANGE_HANDLER ClIncomingCallQoSChangeHandler;
|
---|
1685 | CL_INCOMING_CLOSE_CALL_HANDLER ClIncomingCloseCallHandler;
|
---|
1686 | CL_INCOMING_DROP_PARTY_HANDLER ClIncomingDropPartyHandler;
|
---|
1687 | CL_CALL_CONNECTED_HANDLER ClCallConnectedHandler;
|
---|
1688 | } NDIS_CLIENT_CHARACTERISTICS, *PNDIS_CLIENT_CHARACTERISTICS;
|
---|
1689 |
|
---|
1690 |
|
---|
1691 | /* NDIS protocol structures */
|
---|
1692 |
|
---|
1693 | /* Prototypes for NDIS 3.0 protocol characteristics */
|
---|
1694 |
|
---|
1695 | typedef VOID
|
---|
1696 | (NTAPI *OPEN_ADAPTER_COMPLETE_HANDLER)(
|
---|
1697 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1698 | IN NDIS_STATUS Status,
|
---|
1699 | IN NDIS_STATUS OpenErrorStatus);
|
---|
1700 |
|
---|
1701 | typedef VOID
|
---|
1702 | (NTAPI *CLOSE_ADAPTER_COMPLETE_HANDLER)(
|
---|
1703 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1704 | IN NDIS_STATUS Status);
|
---|
1705 |
|
---|
1706 | typedef VOID
|
---|
1707 | (NTAPI *RESET_COMPLETE_HANDLER)(
|
---|
1708 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1709 | IN NDIS_STATUS Status);
|
---|
1710 |
|
---|
1711 | typedef VOID
|
---|
1712 | (NTAPI *REQUEST_COMPLETE_HANDLER)(
|
---|
1713 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1714 | IN PNDIS_REQUEST NdisRequest,
|
---|
1715 | IN NDIS_STATUS Status);
|
---|
1716 |
|
---|
1717 | typedef VOID
|
---|
1718 | (NTAPI *STATUS_HANDLER)(
|
---|
1719 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1720 | IN NDIS_STATUS GeneralStatus,
|
---|
1721 | IN PVOID StatusBuffer,
|
---|
1722 | IN UINT StatusBufferSize);
|
---|
1723 |
|
---|
1724 | typedef VOID
|
---|
1725 | (NTAPI *STATUS_COMPLETE_HANDLER)(
|
---|
1726 | IN NDIS_HANDLE ProtocolBindingContext);
|
---|
1727 |
|
---|
1728 | typedef VOID
|
---|
1729 | (NTAPI *SEND_COMPLETE_HANDLER)(
|
---|
1730 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1731 | IN PNDIS_PACKET Packet,
|
---|
1732 | IN NDIS_STATUS Status);
|
---|
1733 |
|
---|
1734 | typedef VOID
|
---|
1735 | (NTAPI *WAN_SEND_COMPLETE_HANDLER)(
|
---|
1736 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1737 | IN PNDIS_WAN_PACKET Packet,
|
---|
1738 | IN NDIS_STATUS Status);
|
---|
1739 |
|
---|
1740 | typedef VOID
|
---|
1741 | (NTAPI *TRANSFER_DATA_COMPLETE_HANDLER)(
|
---|
1742 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1743 | IN PNDIS_PACKET Packet,
|
---|
1744 | IN NDIS_STATUS Status,
|
---|
1745 | IN UINT BytesTransferred);
|
---|
1746 |
|
---|
1747 | typedef VOID
|
---|
1748 | (NTAPI *WAN_TRANSFER_DATA_COMPLETE_HANDLER)(
|
---|
1749 | VOID);
|
---|
1750 |
|
---|
1751 | typedef NDIS_STATUS
|
---|
1752 | (NTAPI *RECEIVE_HANDLER)(
|
---|
1753 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1754 | IN NDIS_HANDLE MacReceiveContext,
|
---|
1755 | IN PVOID HeaderBuffer,
|
---|
1756 | IN UINT HeaderBufferSize,
|
---|
1757 | IN PVOID LookAheadBuffer,
|
---|
1758 | IN UINT LookaheadBufferSize,
|
---|
1759 | IN UINT PacketSize);
|
---|
1760 |
|
---|
1761 | typedef NDIS_STATUS
|
---|
1762 | (NTAPI *WAN_RECEIVE_HANDLER)(
|
---|
1763 | IN NDIS_HANDLE NdisLinkHandle,
|
---|
1764 | IN PUCHAR Packet,
|
---|
1765 | IN ULONG PacketSize);
|
---|
1766 |
|
---|
1767 | typedef VOID
|
---|
1768 | (NTAPI *RECEIVE_COMPLETE_HANDLER)(
|
---|
1769 | IN NDIS_HANDLE ProtocolBindingContext);
|
---|
1770 |
|
---|
1771 | /* Protocol characteristics for NDIS 3.0 protocols */
|
---|
1772 |
|
---|
1773 | #define NDIS30_PROTOCOL_CHARACTERISTICS_S \
|
---|
1774 | UCHAR MajorNdisVersion; \
|
---|
1775 | UCHAR MinorNdisVersion; \
|
---|
1776 | USHORT Filler; \
|
---|
1777 | _ANONYMOUS_UNION union { \
|
---|
1778 | UINT Reserved; \
|
---|
1779 | UINT Flags; \
|
---|
1780 | } DUMMYUNIONNAME; \
|
---|
1781 | OPEN_ADAPTER_COMPLETE_HANDLER OpenAdapterCompleteHandler; \
|
---|
1782 | CLOSE_ADAPTER_COMPLETE_HANDLER CloseAdapterCompleteHandler; \
|
---|
1783 | _ANONYMOUS_UNION union { \
|
---|
1784 | SEND_COMPLETE_HANDLER SendCompleteHandler; \
|
---|
1785 | WAN_SEND_COMPLETE_HANDLER WanSendCompleteHandler; \
|
---|
1786 | } DUMMYUNIONNAME2; \
|
---|
1787 | _ANONYMOUS_UNION union { \
|
---|
1788 | TRANSFER_DATA_COMPLETE_HANDLER TransferDataCompleteHandler; \
|
---|
1789 | WAN_TRANSFER_DATA_COMPLETE_HANDLER WanTransferDataCompleteHandler; \
|
---|
1790 | } DUMMYUNIONNAME3; \
|
---|
1791 | RESET_COMPLETE_HANDLER ResetCompleteHandler; \
|
---|
1792 | REQUEST_COMPLETE_HANDLER RequestCompleteHandler; \
|
---|
1793 | _ANONYMOUS_UNION union { \
|
---|
1794 | RECEIVE_HANDLER ReceiveHandler; \
|
---|
1795 | WAN_RECEIVE_HANDLER WanReceiveHandler; \
|
---|
1796 | } DUMMYUNIONNAME4; \
|
---|
1797 | RECEIVE_COMPLETE_HANDLER ReceiveCompleteHandler; \
|
---|
1798 | STATUS_HANDLER StatusHandler; \
|
---|
1799 | STATUS_COMPLETE_HANDLER StatusCompleteHandler; \
|
---|
1800 | NDIS_STRING Name;
|
---|
1801 |
|
---|
1802 | typedef struct _NDIS30_PROTOCOL_CHARACTERISTICS {
|
---|
1803 | NDIS30_PROTOCOL_CHARACTERISTICS_S
|
---|
1804 | } NDIS30_PROTOCOL_CHARACTERISTICS, *PNDIS30_PROTOCOL_CHARACTERISTICS;
|
---|
1805 |
|
---|
1806 |
|
---|
1807 | /* Prototypes for NDIS 4.0 protocol characteristics */
|
---|
1808 |
|
---|
1809 | typedef INT
|
---|
1810 | (NTAPI *RECEIVE_PACKET_HANDLER)(
|
---|
1811 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1812 | IN PNDIS_PACKET Packet);
|
---|
1813 |
|
---|
1814 | typedef VOID
|
---|
1815 | (NTAPI *BIND_HANDLER)(
|
---|
1816 | OUT PNDIS_STATUS Status,
|
---|
1817 | IN NDIS_HANDLE BindContext,
|
---|
1818 | IN PNDIS_STRING DeviceName,
|
---|
1819 | IN PVOID SystemSpecific1,
|
---|
1820 | IN PVOID SystemSpecific2);
|
---|
1821 |
|
---|
1822 | typedef VOID
|
---|
1823 | (NTAPI *UNBIND_HANDLER)(
|
---|
1824 | OUT PNDIS_STATUS Status,
|
---|
1825 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1826 | IN NDIS_HANDLE UnbindContext);
|
---|
1827 |
|
---|
1828 | typedef NDIS_STATUS
|
---|
1829 | (NTAPI *PNP_EVENT_HANDLER)(
|
---|
1830 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1831 | IN PNET_PNP_EVENT NetPnPEvent);
|
---|
1832 |
|
---|
1833 | typedef VOID
|
---|
1834 | (NTAPI *UNLOAD_PROTOCOL_HANDLER)(
|
---|
1835 | VOID);
|
---|
1836 |
|
---|
1837 | /* Protocol characteristics for NDIS 4.0 protocols */
|
---|
1838 |
|
---|
1839 | typedef struct _NDIS40_PROTOCOL_CHARACTERISTICS {
|
---|
1840 | UCHAR MajorNdisVersion;
|
---|
1841 | UCHAR MinorNdisVersion;
|
---|
1842 | USHORT Filler;
|
---|
1843 | __MINGW_EXTENSION union {
|
---|
1844 | UINT Reserved;
|
---|
1845 | UINT Flags;
|
---|
1846 | };
|
---|
1847 | OPEN_ADAPTER_COMPLETE_HANDLER OpenAdapterCompleteHandler;
|
---|
1848 | CLOSE_ADAPTER_COMPLETE_HANDLER CloseAdapterCompleteHandler;
|
---|
1849 | __MINGW_EXTENSION union {
|
---|
1850 | SEND_COMPLETE_HANDLER SendCompleteHandler;
|
---|
1851 | WAN_SEND_COMPLETE_HANDLER WanSendCompleteHandler;
|
---|
1852 | };
|
---|
1853 | __MINGW_EXTENSION union {
|
---|
1854 | TRANSFER_DATA_COMPLETE_HANDLER TransferDataCompleteHandler;
|
---|
1855 | WAN_TRANSFER_DATA_COMPLETE_HANDLER WanTransferDataCompleteHandler;
|
---|
1856 | };
|
---|
1857 | RESET_COMPLETE_HANDLER ResetCompleteHandler;
|
---|
1858 | REQUEST_COMPLETE_HANDLER RequestCompleteHandler;
|
---|
1859 | __MINGW_EXTENSION union {
|
---|
1860 | RECEIVE_HANDLER ReceiveHandler;
|
---|
1861 | WAN_RECEIVE_HANDLER WanReceiveHandler;
|
---|
1862 | };
|
---|
1863 | RECEIVE_COMPLETE_HANDLER ReceiveCompleteHandler;
|
---|
1864 | STATUS_HANDLER StatusHandler;
|
---|
1865 | STATUS_COMPLETE_HANDLER StatusCompleteHandler;
|
---|
1866 | NDIS_STRING Name;
|
---|
1867 | RECEIVE_PACKET_HANDLER ReceivePacketHandler;
|
---|
1868 | BIND_HANDLER BindAdapterHandler;
|
---|
1869 | UNBIND_HANDLER UnbindAdapterHandler;
|
---|
1870 | PNP_EVENT_HANDLER PnPEventHandler;
|
---|
1871 | UNLOAD_PROTOCOL_HANDLER UnloadHandler;
|
---|
1872 | } NDIS40_PROTOCOL_CHARACTERISTICS;
|
---|
1873 |
|
---|
1874 | typedef VOID
|
---|
1875 | (NTAPI PROTCOL_CO_AF_REGISTER_NOTIFY)(
|
---|
1876 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
1877 | IN PCO_ADDRESS_FAMILY AddressFamily);
|
---|
1878 | typedef PROTCOL_CO_AF_REGISTER_NOTIFY *CO_AF_REGISTER_NOTIFY_HANDLER;
|
---|
1879 |
|
---|
1880 | #if NDIS_LEGACY_PROTOCOL
|
---|
1881 |
|
---|
1882 | typedef struct _NDIS50_PROTOCOL_CHARACTERISTICS {
|
---|
1883 | #ifdef __cplusplus
|
---|
1884 | NDIS40_PROTOCOL_CHARACTERISTICS Ndis40Chars;
|
---|
1885 | #else
|
---|
1886 | NDIS40_PROTOCOL_CHARACTERISTICS;
|
---|
1887 | #endif
|
---|
1888 | PVOID ReservedHandlers[4];
|
---|
1889 | CO_SEND_COMPLETE_HANDLER CoSendCompleteHandler;
|
---|
1890 | CO_STATUS_HANDLER CoStatusHandler;
|
---|
1891 | CO_RECEIVE_PACKET_HANDLER CoReceivePacketHandler;
|
---|
1892 | CO_AF_REGISTER_NOTIFY_HANDLER CoAfRegisterNotifyHandler;
|
---|
1893 | } NDIS50_PROTOCOL_CHARACTERISTICS;
|
---|
1894 |
|
---|
1895 | #if (defined(NDIS50) || defined(NDIS51))
|
---|
1896 | typedef NDIS50_PROTOCOL_CHARACTERISTICS NDIS_PROTOCOL_CHARACTERISTICS;
|
---|
1897 | #else
|
---|
1898 | typedef NDIS40_PROTOCOL_CHARACTERISTICS NDIS_PROTOCOL_CHARACTERISTICS;
|
---|
1899 | #endif
|
---|
1900 |
|
---|
1901 | typedef NDIS_PROTOCOL_CHARACTERISTICS *PNDIS_PROTOCOL_CHARACTERISTICS;
|
---|
1902 |
|
---|
1903 | #endif /* NDIS_LEGACY_PROTOCOL */
|
---|
1904 |
|
---|
1905 | /* Prototypes for NDIS_MINIPORT_CHARACTERISTICS */
|
---|
1906 |
|
---|
1907 | typedef BOOLEAN
|
---|
1908 | (NTAPI *W_CHECK_FOR_HANG_HANDLER)(
|
---|
1909 | IN NDIS_HANDLE MiniportAdapterContext);
|
---|
1910 |
|
---|
1911 | typedef VOID
|
---|
1912 | (NTAPI *W_DISABLE_INTERRUPT_HANDLER)(
|
---|
1913 | IN NDIS_HANDLE MiniportAdapterContext);
|
---|
1914 |
|
---|
1915 | typedef VOID
|
---|
1916 | (NTAPI *W_ENABLE_INTERRUPT_HANDLER)(
|
---|
1917 | IN NDIS_HANDLE MiniportAdapterContext);
|
---|
1918 |
|
---|
1919 | typedef VOID
|
---|
1920 | (NTAPI *W_HALT_HANDLER)(
|
---|
1921 | IN NDIS_HANDLE MiniportAdapterContext);
|
---|
1922 |
|
---|
1923 | typedef VOID
|
---|
1924 | (NTAPI *W_HANDLE_INTERRUPT_HANDLER)(
|
---|
1925 | IN NDIS_HANDLE MiniportAdapterContext);
|
---|
1926 |
|
---|
1927 | typedef NDIS_STATUS
|
---|
1928 | (NTAPI *W_INITIALIZE_HANDLER)(
|
---|
1929 | OUT PNDIS_STATUS OpenErrorStatus,
|
---|
1930 | OUT PUINT SelectedMediumIndex,
|
---|
1931 | IN PNDIS_MEDIUM MediumArray,
|
---|
1932 | IN UINT MediumArraySize,
|
---|
1933 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
1934 | IN NDIS_HANDLE WrapperConfigurationContext);
|
---|
1935 |
|
---|
1936 | typedef VOID
|
---|
1937 | (NTAPI *W_ISR_HANDLER)(
|
---|
1938 | OUT PBOOLEAN InterruptRecognized,
|
---|
1939 | OUT PBOOLEAN QueueMiniportHandleInterrupt,
|
---|
1940 | IN NDIS_HANDLE MiniportAdapterContext);
|
---|
1941 |
|
---|
1942 | typedef NDIS_STATUS
|
---|
1943 | (NTAPI *W_QUERY_INFORMATION_HANDLER)(
|
---|
1944 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
1945 | IN NDIS_OID Oid,
|
---|
1946 | IN PVOID InformationBuffer,
|
---|
1947 | IN ULONG InformationBufferLength,
|
---|
1948 | OUT PULONG BytesWritten,
|
---|
1949 | OUT PULONG BytesNeeded);
|
---|
1950 |
|
---|
1951 | typedef NDIS_STATUS
|
---|
1952 | (NTAPI *W_RECONFIGURE_HANDLER)(
|
---|
1953 | OUT PNDIS_STATUS OpenErrorStatus,
|
---|
1954 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
1955 | IN NDIS_HANDLE WrapperConfigurationContext);
|
---|
1956 |
|
---|
1957 | typedef NDIS_STATUS
|
---|
1958 | (NTAPI *W_RESET_HANDLER)(
|
---|
1959 | OUT PBOOLEAN AddressingReset,
|
---|
1960 | IN NDIS_HANDLE MiniportAdapterContext);
|
---|
1961 |
|
---|
1962 | typedef NDIS_STATUS
|
---|
1963 | (NTAPI *W_SEND_HANDLER)(
|
---|
1964 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
1965 | IN PNDIS_PACKET Packet,
|
---|
1966 | IN UINT Flags);
|
---|
1967 |
|
---|
1968 | typedef NDIS_STATUS
|
---|
1969 | (NTAPI *WM_SEND_HANDLER)(
|
---|
1970 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
1971 | IN NDIS_HANDLE NdisLinkHandle,
|
---|
1972 | IN PNDIS_WAN_PACKET Packet);
|
---|
1973 |
|
---|
1974 | typedef NDIS_STATUS
|
---|
1975 | (NTAPI *W_SET_INFORMATION_HANDLER)(
|
---|
1976 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
1977 | IN NDIS_OID Oid,
|
---|
1978 | IN PVOID InformationBuffer,
|
---|
1979 | IN ULONG InformationBufferLength,
|
---|
1980 | OUT PULONG BytesRead,
|
---|
1981 | OUT PULONG BytesNeeded);
|
---|
1982 |
|
---|
1983 | typedef NDIS_STATUS
|
---|
1984 | (NTAPI *W_TRANSFER_DATA_HANDLER)(
|
---|
1985 | OUT PNDIS_PACKET Packet,
|
---|
1986 | OUT PUINT BytesTransferred,
|
---|
1987 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
1988 | IN NDIS_HANDLE MiniportReceiveContext,
|
---|
1989 | IN UINT ByteOffset,
|
---|
1990 | IN UINT BytesToTransfer);
|
---|
1991 |
|
---|
1992 | typedef NDIS_STATUS
|
---|
1993 | (NTAPI *WM_TRANSFER_DATA_HANDLER)(
|
---|
1994 | VOID);
|
---|
1995 |
|
---|
1996 | typedef VOID
|
---|
1997 | (NTAPI *ADAPTER_SHUTDOWN_HANDLER)(
|
---|
1998 | IN PVOID ShutdownContext);
|
---|
1999 |
|
---|
2000 | typedef VOID
|
---|
2001 | (NTAPI *W_RETURN_PACKET_HANDLER)(
|
---|
2002 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
2003 | IN PNDIS_PACKET Packet);
|
---|
2004 |
|
---|
2005 | typedef VOID
|
---|
2006 | (NTAPI *W_SEND_PACKETS_HANDLER)(
|
---|
2007 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
2008 | IN PPNDIS_PACKET PacketArray,
|
---|
2009 | IN UINT NumberOfPackets);
|
---|
2010 |
|
---|
2011 | typedef VOID
|
---|
2012 | (NTAPI *W_ALLOCATE_COMPLETE_HANDLER)(
|
---|
2013 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
2014 | IN PVOID VirtualAddress,
|
---|
2015 | IN PNDIS_PHYSICAL_ADDRESS PhysicalAddress,
|
---|
2016 | IN ULONG Length,
|
---|
2017 | IN PVOID Context);
|
---|
2018 |
|
---|
2019 | /* NDIS structures available only to miniport drivers */
|
---|
2020 |
|
---|
2021 | #define NDIS30_MINIPORT_CHARACTERISTICS_S \
|
---|
2022 | UCHAR MajorNdisVersion; \
|
---|
2023 | UCHAR MinorNdisVersion; \
|
---|
2024 | UINT Reserved; \
|
---|
2025 | W_CHECK_FOR_HANG_HANDLER CheckForHangHandler; \
|
---|
2026 | W_DISABLE_INTERRUPT_HANDLER DisableInterruptHandler; \
|
---|
2027 | W_ENABLE_INTERRUPT_HANDLER EnableInterruptHandler; \
|
---|
2028 | W_HALT_HANDLER HaltHandler; \
|
---|
2029 | W_HANDLE_INTERRUPT_HANDLER HandleInterruptHandler; \
|
---|
2030 | W_INITIALIZE_HANDLER InitializeHandler; \
|
---|
2031 | W_ISR_HANDLER ISRHandler; \
|
---|
2032 | W_QUERY_INFORMATION_HANDLER QueryInformationHandler; \
|
---|
2033 | W_RECONFIGURE_HANDLER ReconfigureHandler; \
|
---|
2034 | W_RESET_HANDLER ResetHandler; \
|
---|
2035 | W_SEND_HANDLER SendHandler; \
|
---|
2036 | W_SET_INFORMATION_HANDLER SetInformationHandler; \
|
---|
2037 | W_TRANSFER_DATA_HANDLER TransferDataHandler;
|
---|
2038 |
|
---|
2039 | typedef struct _NDIS30_MINIPORT_CHARACTERISTICS {
|
---|
2040 | NDIS30_MINIPORT_CHARACTERISTICS_S
|
---|
2041 | } NDIS30_MINIPORT_CHARACTERISTICS, *PSNDIS30_MINIPORT_CHARACTERISTICS;
|
---|
2042 |
|
---|
2043 | #ifdef __cplusplus
|
---|
2044 |
|
---|
2045 | #define NDIS40_MINIPORT_CHARACTERISTICS_S \
|
---|
2046 | NDIS30_MINIPORT_CHARACTERISTICS Ndis30Chars; \
|
---|
2047 | W_RETURN_PACKET_HANDLER ReturnPacketHandler; \
|
---|
2048 | W_SEND_PACKETS_HANDLER SendPacketsHandler; \
|
---|
2049 | W_ALLOCATE_COMPLETE_HANDLER AllocateCompleteHandler;
|
---|
2050 |
|
---|
2051 | #else /* !__cplusplus */
|
---|
2052 |
|
---|
2053 | #define NDIS40_MINIPORT_CHARACTERISTICS_S \
|
---|
2054 | NDIS30_MINIPORT_CHARACTERISTICS_S \
|
---|
2055 | W_RETURN_PACKET_HANDLER ReturnPacketHandler; \
|
---|
2056 | W_SEND_PACKETS_HANDLER SendPacketsHandler; \
|
---|
2057 | W_ALLOCATE_COMPLETE_HANDLER AllocateCompleteHandler;
|
---|
2058 |
|
---|
2059 | #endif /* !__cplusplus */
|
---|
2060 |
|
---|
2061 | typedef struct _NDIS40_MINIPORT_CHARACTERISTICS {
|
---|
2062 | NDIS40_MINIPORT_CHARACTERISTICS_S
|
---|
2063 | } NDIS40_MINIPORT_CHARACTERISTICS, *PNDIS40_MINIPORT_CHARACTERISTICS;
|
---|
2064 |
|
---|
2065 | /* Extensions for NDIS 5.0 miniports */
|
---|
2066 |
|
---|
2067 | typedef NDIS_STATUS
|
---|
2068 | (NTAPI MINIPORT_CO_CREATE_VC)(
|
---|
2069 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
2070 | IN NDIS_HANDLE NdisVcHandle,
|
---|
2071 | OUT PNDIS_HANDLE MiniportVcContext);
|
---|
2072 | typedef MINIPORT_CO_CREATE_VC *W_CO_CREATE_VC_HANDLER;
|
---|
2073 |
|
---|
2074 | typedef NDIS_STATUS
|
---|
2075 | (NTAPI MINIPORT_CO_DELETE_VC)(
|
---|
2076 | IN NDIS_HANDLE MiniportVcContext);
|
---|
2077 | typedef MINIPORT_CO_DELETE_VC *W_CO_DELETE_VC_HANDLER;
|
---|
2078 |
|
---|
2079 | typedef NDIS_STATUS
|
---|
2080 | (NTAPI MINIPORT_CO_ACTIVATE_VC)(
|
---|
2081 | IN NDIS_HANDLE MiniportVcContext,
|
---|
2082 | IN OUT PCO_CALL_PARAMETERS CallParameters);
|
---|
2083 | typedef MINIPORT_CO_ACTIVATE_VC *W_CO_ACTIVATE_VC_HANDLER;
|
---|
2084 |
|
---|
2085 | typedef NDIS_STATUS
|
---|
2086 | (NTAPI MINIPORT_CO_DEACTIVATE_VC)(
|
---|
2087 | IN NDIS_HANDLE MiniportVcContext);
|
---|
2088 | typedef MINIPORT_CO_DEACTIVATE_VC *W_CO_DEACTIVATE_VC_HANDLER;
|
---|
2089 |
|
---|
2090 | typedef VOID
|
---|
2091 | (NTAPI *W_CO_SEND_PACKETS_HANDLER)(
|
---|
2092 | IN NDIS_HANDLE MiniportVcContext,
|
---|
2093 | IN PPNDIS_PACKET PacketArray,
|
---|
2094 | IN UINT NumberOfPackets);
|
---|
2095 |
|
---|
2096 | typedef NDIS_STATUS
|
---|
2097 | (NTAPI *W_CO_REQUEST_HANDLER)(
|
---|
2098 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
2099 | IN NDIS_HANDLE MiniportVcContext OPTIONAL,
|
---|
2100 | IN OUT PNDIS_REQUEST NdisRequest);
|
---|
2101 |
|
---|
2102 | #ifdef __cplusplus
|
---|
2103 |
|
---|
2104 | #define NDIS50_MINIPORT_CHARACTERISTICS_S \
|
---|
2105 | NDIS40_MINIPORT_CHARACTERISTICS Ndis40Chars; \
|
---|
2106 | W_CO_CREATE_VC_HANDLER CoCreateVcHandler; \
|
---|
2107 | W_CO_DELETE_VC_HANDLER CoDeleteVcHandler; \
|
---|
2108 | W_CO_ACTIVATE_VC_HANDLER CoActivateVcHandler; \
|
---|
2109 | W_CO_DEACTIVATE_VC_HANDLER CoDeactivateVcHandler; \
|
---|
2110 | W_CO_SEND_PACKETS_HANDLER CoSendPacketsHandler; \
|
---|
2111 | W_CO_REQUEST_HANDLER CoRequestHandler;
|
---|
2112 |
|
---|
2113 | #else /* !__cplusplus */
|
---|
2114 |
|
---|
2115 | #define NDIS50_MINIPORT_CHARACTERISTICS_S \
|
---|
2116 | NDIS40_MINIPORT_CHARACTERISTICS_S \
|
---|
2117 | W_CO_CREATE_VC_HANDLER CoCreateVcHandler; \
|
---|
2118 | W_CO_DELETE_VC_HANDLER CoDeleteVcHandler; \
|
---|
2119 | W_CO_ACTIVATE_VC_HANDLER CoActivateVcHandler; \
|
---|
2120 | W_CO_DEACTIVATE_VC_HANDLER CoDeactivateVcHandler; \
|
---|
2121 | W_CO_SEND_PACKETS_HANDLER CoSendPacketsHandler; \
|
---|
2122 | W_CO_REQUEST_HANDLER CoRequestHandler;
|
---|
2123 |
|
---|
2124 | #endif /* !__cplusplus */
|
---|
2125 |
|
---|
2126 | typedef struct _NDIS50_MINIPORT_CHARACTERISTICS {
|
---|
2127 | NDIS50_MINIPORT_CHARACTERISTICS_S
|
---|
2128 | } NDIS50_MINIPORT_CHARACTERISTICS, *PSNDIS50_MINIPORT_CHARACTERISTICS;
|
---|
2129 |
|
---|
2130 | /* Extensions for NDIS 5.1 miniports */
|
---|
2131 |
|
---|
2132 | typedef VOID
|
---|
2133 | (NTAPI *W_CANCEL_SEND_PACKETS_HANDLER)(
|
---|
2134 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
2135 | IN PVOID CancelId);
|
---|
2136 |
|
---|
2137 | typedef VOID
|
---|
2138 | (NTAPI *W_PNP_EVENT_NOTIFY_HANDLER)(
|
---|
2139 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
2140 | IN NDIS_DEVICE_PNP_EVENT PnPEvent,
|
---|
2141 | IN PVOID InformationBuffer,
|
---|
2142 | IN ULONG InformationBufferLength);
|
---|
2143 |
|
---|
2144 | typedef VOID
|
---|
2145 | (NTAPI *W_MINIPORT_SHUTDOWN_HANDLER)(
|
---|
2146 | IN PVOID ShutdownContext);
|
---|
2147 |
|
---|
2148 | #ifdef __cplusplus
|
---|
2149 |
|
---|
2150 | #define NDIS51_MINIPORT_CHARACTERISTICS_S \
|
---|
2151 | NDIS50_MINIPORT_CHARACTERISTICS Ndis50Chars; \
|
---|
2152 | W_CANCEL_SEND_PACKETS_HANDLER CancelSendPacketsHandler; \
|
---|
2153 | W_PNP_EVENT_NOTIFY_HANDLER PnPEventNotifyHandler; \
|
---|
2154 | W_MINIPORT_SHUTDOWN_HANDLER AdapterShutdownHandler; \
|
---|
2155 | PVOID Reserved1; \
|
---|
2156 | PVOID Reserved2; \
|
---|
2157 | PVOID Reserved3; \
|
---|
2158 | PVOID Reserved4;
|
---|
2159 |
|
---|
2160 | #else
|
---|
2161 |
|
---|
2162 | #define NDIS51_MINIPORT_CHARACTERISTICS_S \
|
---|
2163 | NDIS50_MINIPORT_CHARACTERISTICS_S \
|
---|
2164 | W_CANCEL_SEND_PACKETS_HANDLER CancelSendPacketsHandler; \
|
---|
2165 | W_PNP_EVENT_NOTIFY_HANDLER PnPEventNotifyHandler; \
|
---|
2166 | W_MINIPORT_SHUTDOWN_HANDLER AdapterShutdownHandler; \
|
---|
2167 | PVOID Reserved1; \
|
---|
2168 | PVOID Reserved2; \
|
---|
2169 | PVOID Reserved3; \
|
---|
2170 | PVOID Reserved4;
|
---|
2171 |
|
---|
2172 | #endif
|
---|
2173 |
|
---|
2174 | typedef struct _NDIS51_MINIPORT_CHARACTERISTICS {
|
---|
2175 | NDIS51_MINIPORT_CHARACTERISTICS_S
|
---|
2176 | } NDIS51_MINIPORT_CHARACTERISTICS, *PSNDIS51_MINIPORT_CHARACTERISTICS;
|
---|
2177 |
|
---|
2178 | #if defined(NDIS51_MINIPORT)
|
---|
2179 | typedef struct _NDIS_MINIPORT_CHARACTERISTICS {
|
---|
2180 | NDIS51_MINIPORT_CHARACTERISTICS_S
|
---|
2181 | } NDIS_MINIPORT_CHARACTERISTICS, *PNDIS_MINIPORT_CHARACTERISTICS;
|
---|
2182 | #elif defined(NDIS50_MINIPORT)
|
---|
2183 | typedef struct _NDIS_MINIPORT_CHARACTERISTICS {
|
---|
2184 | NDIS50_MINIPORT_CHARACTERISTICS_S
|
---|
2185 | } NDIS_MINIPORT_CHARACTERISTICS, *PNDIS_MINIPORT_CHARACTERISTICS;
|
---|
2186 | #elif defined(NDIS40_MINIPORT)
|
---|
2187 | typedef struct _NDIS_MINIPORT_CHARACTERISTICS {
|
---|
2188 | NDIS40_MINIPORT_CHARACTERISTICS_S
|
---|
2189 | } NDIS_MINIPORT_CHARACTERISTICS, *PNDIS_MINIPORT_CHARACTERISTICS;
|
---|
2190 | #else /* NDIS30 */
|
---|
2191 | typedef struct _NDIS_MINIPORT_CHARACTERISTICS {
|
---|
2192 | NDIS30_MINIPORT_CHARACTERISTICS_S
|
---|
2193 | } NDIS_MINIPORT_CHARACTERISTICS, *PNDIS_MINIPORT_CHARACTERISTICS;
|
---|
2194 | #endif
|
---|
2195 |
|
---|
2196 | typedef struct _NDIS_MINIPORT_INTERRUPT {
|
---|
2197 | PKINTERRUPT InterruptObject;
|
---|
2198 | KSPIN_LOCK DpcCountLock;
|
---|
2199 | PVOID Reserved;
|
---|
2200 | W_ISR_HANDLER MiniportIsr;
|
---|
2201 | W_HANDLE_INTERRUPT_HANDLER MiniportDpc;
|
---|
2202 | KDPC InterruptDpc;
|
---|
2203 | PNDIS_MINIPORT_BLOCK Miniport;
|
---|
2204 | UCHAR DpcCount;
|
---|
2205 | BOOLEAN Filler1;
|
---|
2206 | KEVENT DpcsCompletedEvent;
|
---|
2207 | BOOLEAN SharedInterrupt;
|
---|
2208 | BOOLEAN IsrRequested;
|
---|
2209 | } NDIS_MINIPORT_INTERRUPT, *PNDIS_MINIPORT_INTERRUPT;
|
---|
2210 |
|
---|
2211 | /* Structures available only to full MAC drivers */
|
---|
2212 |
|
---|
2213 | typedef BOOLEAN
|
---|
2214 | (NTAPI *PNDIS_INTERRUPT_SERVICE)(
|
---|
2215 | IN PVOID InterruptContext);
|
---|
2216 |
|
---|
2217 | typedef VOID
|
---|
2218 | (NTAPI *PNDIS_DEFERRED_PROCESSING)(
|
---|
2219 | IN PVOID SystemSpecific1,
|
---|
2220 | IN PVOID InterruptContext,
|
---|
2221 | IN PVOID SystemSpecific2,
|
---|
2222 | IN PVOID SystemSpecific3);
|
---|
2223 |
|
---|
2224 | typedef struct _NDIS_WRAPPER_HANDLE NDIS_WRAPPER_HANDLE, *PNDIS_WRAPPER_HANDLE;
|
---|
2225 | typedef struct _NDIS_PROTOCOL_BLOCK NDIS_PROTOCOL_BLOCK, *PNDIS_PROTOCOL_BLOCK;
|
---|
2226 | typedef struct _NDIS_OPEN_BLOCK NDIS_OPEN_BLOCK, *PNDIS_OPEN_BLOCK;
|
---|
2227 | typedef struct _NDIS_M_DRIVER_BLOCK NDIS_M_DRIVER_BLOCK, *PNDIS_M_DRIVER_BLOCK;
|
---|
2228 | typedef struct _NDIS_OFFLOAD NDIS_OFFLOAD, *PNDIS_OFFLOAD;
|
---|
2229 | typedef struct _NDIS_AF_LIST NDIS_AF_LIST, *PNDIS_AF_LIST;
|
---|
2230 | typedef struct _X_FILTER ETH_FILTER, *PETH_FILTER;
|
---|
2231 | #if NDIS_SUPPORT_NDIS6
|
---|
2232 | typedef USHORT NET_FRAME_TYPE, *PNET_FRAME_TYPE;
|
---|
2233 | #endif
|
---|
2234 |
|
---|
2235 | typedef struct _NDIS_MINIPORT_TIMER {
|
---|
2236 | KTIMER Timer;
|
---|
2237 | KDPC Dpc;
|
---|
2238 | PNDIS_TIMER_FUNCTION MiniportTimerFunction;
|
---|
2239 | PVOID MiniportTimerContext;
|
---|
2240 | PNDIS_MINIPORT_BLOCK Miniport;
|
---|
2241 | struct _NDIS_MINIPORT_TIMER *NextDeferredTimer;
|
---|
2242 | } NDIS_MINIPORT_TIMER, *PNDIS_MINIPORT_TIMER;
|
---|
2243 |
|
---|
2244 | typedef struct _NDIS_INTERRUPT {
|
---|
2245 | PKINTERRUPT InterruptObject;
|
---|
2246 | KSPIN_LOCK DpcCountLock;
|
---|
2247 | PNDIS_INTERRUPT_SERVICE MacIsr;
|
---|
2248 | PNDIS_DEFERRED_PROCESSING MacDpc;
|
---|
2249 | KDPC InterruptDpc;
|
---|
2250 | PVOID InterruptContext;
|
---|
2251 | UCHAR DpcCount;
|
---|
2252 | BOOLEAN Removing;
|
---|
2253 | KEVENT DpcsCompletedEvent;
|
---|
2254 | } NDIS_INTERRUPT, *PNDIS_INTERRUPT;
|
---|
2255 |
|
---|
2256 |
|
---|
2257 | typedef enum _NDIS_WORK_ITEM_TYPE {
|
---|
2258 | NdisWorkItemRequest,
|
---|
2259 | NdisWorkItemSend,
|
---|
2260 | NdisWorkItemReturnPackets,
|
---|
2261 | NdisWorkItemResetRequested,
|
---|
2262 | NdisWorkItemResetInProgress,
|
---|
2263 | NdisWorkItemHalt,
|
---|
2264 | NdisWorkItemSendLoopback,
|
---|
2265 | NdisWorkItemMiniportCallback,
|
---|
2266 | NdisMaxWorkItems
|
---|
2267 | } NDIS_WORK_ITEM_TYPE, *PNDIS_WORK_ITEM_TYPE;
|
---|
2268 |
|
---|
2269 | #define NUMBER_OF_WORK_ITEM_TYPES NdisMaxWorkItems
|
---|
2270 | #define NUMBER_OF_SINGLE_WORK_ITEMS 6
|
---|
2271 |
|
---|
2272 | typedef struct _NDIS_MINIPORT_WORK_ITEM {
|
---|
2273 | SINGLE_LIST_ENTRY Link;
|
---|
2274 | NDIS_WORK_ITEM_TYPE WorkItemType;
|
---|
2275 | PVOID WorkItemContext;
|
---|
2276 | } NDIS_MINIPORT_WORK_ITEM, *PNDIS_MINIPORT_WORK_ITEM;
|
---|
2277 |
|
---|
2278 | struct _NDIS_WORK_ITEM;
|
---|
2279 | typedef VOID (*NDIS_PROC)(struct _NDIS_WORK_ITEM *, PVOID);
|
---|
2280 |
|
---|
2281 | typedef struct _NDIS_WORK_ITEM {
|
---|
2282 | PVOID Context;
|
---|
2283 | NDIS_PROC Routine;
|
---|
2284 | UCHAR WrapperReserved[8*sizeof(PVOID)];
|
---|
2285 | } NDIS_WORK_ITEM, *PNDIS_WORK_ITEM;
|
---|
2286 |
|
---|
2287 | typedef struct _NDIS_BIND_PATHS {
|
---|
2288 | UINT Number;
|
---|
2289 | NDIS_STRING Paths[1];
|
---|
2290 | } NDIS_BIND_PATHS, *PNDIS_BIND_PATHS;
|
---|
2291 |
|
---|
2292 |
|
---|
2293 | typedef VOID
|
---|
2294 | (NTAPI *ETH_RCV_COMPLETE_HANDLER)(
|
---|
2295 | IN PETH_FILTER Filter);
|
---|
2296 |
|
---|
2297 | typedef VOID
|
---|
2298 | (NTAPI *ETH_RCV_INDICATE_HANDLER)(
|
---|
2299 | IN PETH_FILTER Filter,
|
---|
2300 | IN NDIS_HANDLE MacReceiveContext,
|
---|
2301 | IN PCHAR Address,
|
---|
2302 | IN PVOID HeaderBuffer,
|
---|
2303 | IN UINT HeaderBufferSize,
|
---|
2304 | IN PVOID LookaheadBuffer,
|
---|
2305 | IN UINT LookaheadBufferSize,
|
---|
2306 | IN UINT PacketSize);
|
---|
2307 |
|
---|
2308 | typedef VOID
|
---|
2309 | (NTAPI *FDDI_RCV_COMPLETE_HANDLER)(
|
---|
2310 | IN PFDDI_FILTER Filter);
|
---|
2311 |
|
---|
2312 | typedef VOID
|
---|
2313 | (NTAPI *FDDI_RCV_INDICATE_HANDLER)(
|
---|
2314 | IN PFDDI_FILTER Filter,
|
---|
2315 | IN NDIS_HANDLE MacReceiveContext,
|
---|
2316 | IN PCHAR Address,
|
---|
2317 | IN UINT AddressLength,
|
---|
2318 | IN PVOID HeaderBuffer,
|
---|
2319 | IN UINT HeaderBufferSize,
|
---|
2320 | IN PVOID LookaheadBuffer,
|
---|
2321 | IN UINT LookaheadBufferSize,
|
---|
2322 | IN UINT PacketSize);
|
---|
2323 |
|
---|
2324 | typedef VOID
|
---|
2325 | (NTAPI *FILTER_PACKET_INDICATION_HANDLER)(
|
---|
2326 | IN NDIS_HANDLE Miniport,
|
---|
2327 | IN PPNDIS_PACKET PacketArray,
|
---|
2328 | IN UINT NumberOfPackets);
|
---|
2329 |
|
---|
2330 | typedef VOID
|
---|
2331 | (NTAPI *TR_RCV_COMPLETE_HANDLER)(
|
---|
2332 | IN PTR_FILTER Filter);
|
---|
2333 |
|
---|
2334 | typedef VOID
|
---|
2335 | (NTAPI *TR_RCV_INDICATE_HANDLER)(
|
---|
2336 | IN PTR_FILTER Filter,
|
---|
2337 | IN NDIS_HANDLE MacReceiveContext,
|
---|
2338 | IN PVOID HeaderBuffer,
|
---|
2339 | IN UINT HeaderBufferSize,
|
---|
2340 | IN PVOID LookaheadBuffer,
|
---|
2341 | IN UINT LookaheadBufferSize,
|
---|
2342 | IN UINT PacketSize);
|
---|
2343 |
|
---|
2344 | typedef VOID
|
---|
2345 | (NTAPI *WAN_RCV_COMPLETE_HANDLER)(
|
---|
2346 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
2347 | IN NDIS_HANDLE NdisLinkContext);
|
---|
2348 |
|
---|
2349 | typedef VOID
|
---|
2350 | (NTAPI *WAN_RCV_HANDLER)(
|
---|
2351 | OUT PNDIS_STATUS Status,
|
---|
2352 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
2353 | IN NDIS_HANDLE NdisLinkContext,
|
---|
2354 | IN PUCHAR Packet,
|
---|
2355 | IN ULONG PacketSize);
|
---|
2356 |
|
---|
2357 | typedef VOID
|
---|
2358 | (FASTCALL *NDIS_M_DEQUEUE_WORK_ITEM)(
|
---|
2359 | IN PNDIS_MINIPORT_BLOCK Miniport,
|
---|
2360 | IN NDIS_WORK_ITEM_TYPE WorkItemType,
|
---|
2361 | OUT PVOID *WorkItemContext);
|
---|
2362 |
|
---|
2363 | typedef NDIS_STATUS
|
---|
2364 | (FASTCALL *NDIS_M_QUEUE_NEW_WORK_ITEM)(
|
---|
2365 | IN PNDIS_MINIPORT_BLOCK Miniport,
|
---|
2366 | IN NDIS_WORK_ITEM_TYPE WorkItemType,
|
---|
2367 | IN PVOID WorkItemContext);
|
---|
2368 |
|
---|
2369 | typedef NDIS_STATUS
|
---|
2370 | (FASTCALL *NDIS_M_QUEUE_WORK_ITEM)(
|
---|
2371 | IN PNDIS_MINIPORT_BLOCK Miniport,
|
---|
2372 | IN NDIS_WORK_ITEM_TYPE WorkItemType,
|
---|
2373 | IN PVOID WorkItemContext);
|
---|
2374 |
|
---|
2375 | typedef VOID
|
---|
2376 | (NTAPI *NDIS_M_REQ_COMPLETE_HANDLER)(
|
---|
2377 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
2378 | IN NDIS_STATUS Status);
|
---|
2379 |
|
---|
2380 | typedef VOID
|
---|
2381 | (NTAPI *NDIS_M_RESET_COMPLETE_HANDLER)(
|
---|
2382 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
2383 | IN NDIS_STATUS Status,
|
---|
2384 | IN BOOLEAN AddressingReset);
|
---|
2385 |
|
---|
2386 | typedef VOID
|
---|
2387 | (NTAPI *NDIS_M_SEND_COMPLETE_HANDLER)(
|
---|
2388 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
2389 | IN PNDIS_PACKET Packet,
|
---|
2390 | IN NDIS_STATUS Status);
|
---|
2391 |
|
---|
2392 | typedef VOID
|
---|
2393 | (NTAPI *NDIS_M_SEND_RESOURCES_HANDLER)(
|
---|
2394 | IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
2395 |
|
---|
2396 | typedef BOOLEAN
|
---|
2397 | (FASTCALL *NDIS_M_START_SENDS)(
|
---|
2398 | IN PNDIS_MINIPORT_BLOCK Miniport);
|
---|
2399 |
|
---|
2400 | typedef VOID
|
---|
2401 | (NTAPI *NDIS_M_STATUS_HANDLER)(
|
---|
2402 | IN NDIS_HANDLE MiniportHandle,
|
---|
2403 | IN NDIS_STATUS GeneralStatus,
|
---|
2404 | IN PVOID StatusBuffer,
|
---|
2405 | IN UINT StatusBufferSize);
|
---|
2406 |
|
---|
2407 | typedef VOID
|
---|
2408 | (NTAPI *NDIS_M_STS_COMPLETE_HANDLER)(
|
---|
2409 | IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
2410 |
|
---|
2411 | typedef VOID
|
---|
2412 | (NTAPI *NDIS_M_TD_COMPLETE_HANDLER)(
|
---|
2413 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
2414 | IN PNDIS_PACKET Packet,
|
---|
2415 | IN NDIS_STATUS Status,
|
---|
2416 | IN UINT BytesTransferred);
|
---|
2417 |
|
---|
2418 | typedef VOID (NTAPI *NDIS_WM_SEND_COMPLETE_HANDLER)(
|
---|
2419 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
2420 | IN PVOID Packet,
|
---|
2421 | IN NDIS_STATUS Status);
|
---|
2422 |
|
---|
2423 |
|
---|
2424 | #if ARCNET
|
---|
2425 |
|
---|
2426 | #define ARC_SEND_BUFFERS 8
|
---|
2427 | #define ARC_HEADER_SIZE 4
|
---|
2428 |
|
---|
2429 | typedef struct _NDIS_ARC_BUF {
|
---|
2430 | NDIS_HANDLE ArcnetBufferPool;
|
---|
2431 | PUCHAR ArcnetLookaheadBuffer;
|
---|
2432 | UINT NumFree;
|
---|
2433 | ARC_BUFFER_LIST ArcnetBuffers[ARC_SEND_BUFFERS];
|
---|
2434 | } NDIS_ARC_BUF, *PNDIS_ARC_BUF;
|
---|
2435 |
|
---|
2436 | #endif /* ARCNET */
|
---|
2437 |
|
---|
2438 | typedef struct _NDIS_LOG {
|
---|
2439 | PNDIS_MINIPORT_BLOCK Miniport;
|
---|
2440 | KSPIN_LOCK LogLock;
|
---|
2441 | PIRP Irp;
|
---|
2442 | UINT TotalSize;
|
---|
2443 | UINT CurrentSize;
|
---|
2444 | UINT InPtr;
|
---|
2445 | UINT OutPtr;
|
---|
2446 | UCHAR LogBuf[1];
|
---|
2447 | } NDIS_LOG, *PNDIS_LOG;
|
---|
2448 |
|
---|
2449 | #if ARCNET
|
---|
2450 | #define FILTERDBS_ARCNET_S \
|
---|
2451 | PARC_FILTER ArcDB;
|
---|
2452 | #else /* !ARCNET */
|
---|
2453 | #define FILTERDBS_ARCNET_S \
|
---|
2454 | PVOID XXXDB;
|
---|
2455 | #endif /* !ARCNET */
|
---|
2456 |
|
---|
2457 | #define FILTERDBS_S \
|
---|
2458 | _ANONYMOUS_UNION union { \
|
---|
2459 | PETH_FILTER EthDB; \
|
---|
2460 | PNULL_FILTER NullDB; \
|
---|
2461 | } DUMMYUNIONNAME; \
|
---|
2462 | PTR_FILTER TrDB; \
|
---|
2463 | PFDDI_FILTER FddiDB; \
|
---|
2464 | FILTERDBS_ARCNET_S
|
---|
2465 |
|
---|
2466 | typedef struct _FILTERDBS {
|
---|
2467 | FILTERDBS_S
|
---|
2468 | } FILTERDBS, *PFILTERDBS;
|
---|
2469 |
|
---|
2470 | struct _NDIS_MINIPORT_BLOCK {
|
---|
2471 | NDIS_OBJECT_HEADER Header;
|
---|
2472 | PNDIS_MINIPORT_BLOCK NextMiniport;
|
---|
2473 | PNDIS_M_DRIVER_BLOCK DriverHandle;
|
---|
2474 | NDIS_HANDLE MiniportAdapterContext;
|
---|
2475 | UNICODE_STRING MiniportName;
|
---|
2476 | PNDIS_BIND_PATHS BindPaths;
|
---|
2477 | NDIS_HANDLE OpenQueue;
|
---|
2478 | REFERENCE ShortRef;
|
---|
2479 | NDIS_HANDLE DeviceContext;
|
---|
2480 | UCHAR Padding1;
|
---|
2481 | UCHAR LockAcquired;
|
---|
2482 | UCHAR PmodeOpens;
|
---|
2483 | UCHAR AssignedProcessor;
|
---|
2484 | KSPIN_LOCK Lock;
|
---|
2485 | PNDIS_REQUEST MediaRequest;
|
---|
2486 | PNDIS_MINIPORT_INTERRUPT Interrupt;
|
---|
2487 | ULONG Flags;
|
---|
2488 | ULONG PnPFlags;
|
---|
2489 | LIST_ENTRY PacketList;
|
---|
2490 | PNDIS_PACKET FirstPendingPacket;
|
---|
2491 | PNDIS_PACKET ReturnPacketsQueue;
|
---|
2492 | ULONG RequestBuffer;
|
---|
2493 | PVOID SetMCastBuffer;
|
---|
2494 | PNDIS_MINIPORT_BLOCK PrimaryMiniport;
|
---|
2495 | PVOID WrapperContext;
|
---|
2496 | PVOID BusDataContext;
|
---|
2497 | ULONG PnPCapabilities;
|
---|
2498 | PCM_RESOURCE_LIST Resources;
|
---|
2499 | NDIS_TIMER WakeUpDpcTimer;
|
---|
2500 | UNICODE_STRING BaseName;
|
---|
2501 | UNICODE_STRING SymbolicLinkName;
|
---|
2502 | ULONG CheckForHangSeconds;
|
---|
2503 | USHORT CFHangTicks;
|
---|
2504 | USHORT CFHangCurrentTick;
|
---|
2505 | NDIS_STATUS ResetStatus;
|
---|
2506 | NDIS_HANDLE ResetOpen;
|
---|
2507 | FILTERDBS_S
|
---|
2508 | FILTER_PACKET_INDICATION_HANDLER PacketIndicateHandler;
|
---|
2509 | NDIS_M_SEND_COMPLETE_HANDLER SendCompleteHandler;
|
---|
2510 | NDIS_M_SEND_RESOURCES_HANDLER SendResourcesHandler;
|
---|
2511 | NDIS_M_RESET_COMPLETE_HANDLER ResetCompleteHandler;
|
---|
2512 | NDIS_MEDIUM MediaType;
|
---|
2513 | ULONG BusNumber;
|
---|
2514 | NDIS_INTERFACE_TYPE BusType;
|
---|
2515 | NDIS_INTERFACE_TYPE AdapterType;
|
---|
2516 | PDEVICE_OBJECT DeviceObject;
|
---|
2517 | PDEVICE_OBJECT PhysicalDeviceObject;
|
---|
2518 | PDEVICE_OBJECT NextDeviceObject;
|
---|
2519 | PMAP_REGISTER_ENTRY MapRegisters;
|
---|
2520 | PNDIS_AF_LIST CallMgrAfList;
|
---|
2521 | PVOID MiniportThread;
|
---|
2522 | PVOID SetInfoBuf;
|
---|
2523 | USHORT SetInfoBufLen;
|
---|
2524 | USHORT MaxSendPackets;
|
---|
2525 | NDIS_STATUS FakeStatus;
|
---|
2526 | PVOID LockHandler;
|
---|
2527 | PUNICODE_STRING pAdapterInstanceName;
|
---|
2528 | PNDIS_MINIPORT_TIMER TimerQueue;
|
---|
2529 | UINT MacOptions;
|
---|
2530 | PNDIS_REQUEST PendingRequest;
|
---|
2531 | UINT MaximumLongAddresses;
|
---|
2532 | UINT MaximumShortAddresses;
|
---|
2533 | UINT CurrentLookahead;
|
---|
2534 | UINT MaximumLookahead;
|
---|
2535 | W_HANDLE_INTERRUPT_HANDLER HandleInterruptHandler;
|
---|
2536 | W_DISABLE_INTERRUPT_HANDLER DisableInterruptHandler;
|
---|
2537 | W_ENABLE_INTERRUPT_HANDLER EnableInterruptHandler;
|
---|
2538 | W_SEND_PACKETS_HANDLER SendPacketsHandler;
|
---|
2539 | NDIS_M_START_SENDS DeferredSendHandler;
|
---|
2540 | ETH_RCV_INDICATE_HANDLER EthRxIndicateHandler;
|
---|
2541 | TR_RCV_INDICATE_HANDLER TrRxIndicateHandler;
|
---|
2542 | FDDI_RCV_INDICATE_HANDLER FddiRxIndicateHandler;
|
---|
2543 | ETH_RCV_COMPLETE_HANDLER EthRxCompleteHandler;
|
---|
2544 | TR_RCV_COMPLETE_HANDLER TrRxCompleteHandler;
|
---|
2545 | FDDI_RCV_COMPLETE_HANDLER FddiRxCompleteHandler;
|
---|
2546 | NDIS_M_STATUS_HANDLER StatusHandler;
|
---|
2547 | NDIS_M_STS_COMPLETE_HANDLER StatusCompleteHandler;
|
---|
2548 | NDIS_M_TD_COMPLETE_HANDLER TDCompleteHandler;
|
---|
2549 | NDIS_M_REQ_COMPLETE_HANDLER QueryCompleteHandler;
|
---|
2550 | NDIS_M_REQ_COMPLETE_HANDLER SetCompleteHandler;
|
---|
2551 | NDIS_WM_SEND_COMPLETE_HANDLER WanSendCompleteHandler;
|
---|
2552 | WAN_RCV_HANDLER WanRcvHandler;
|
---|
2553 | WAN_RCV_COMPLETE_HANDLER WanRcvCompleteHandler;
|
---|
2554 | #if defined(NDIS_WRAPPER)
|
---|
2555 | PNDIS_MINIPORT_BLOCK NextGlobalMiniport;
|
---|
2556 | SINGLE_LIST_ENTRY WorkQueue[NUMBER_OF_WORK_ITEM_TYPES];
|
---|
2557 | SINGLE_LIST_ENTRY SingleWorkItems[NUMBER_OF_SINGLE_WORK_ITEMS];
|
---|
2558 | UCHAR SendFlags;
|
---|
2559 | UCHAR TrResetRing;
|
---|
2560 | UCHAR ArcnetAddress;
|
---|
2561 | UCHAR XState;
|
---|
2562 | _ANONYMOUS_UNION union {
|
---|
2563 | #if ARCNET
|
---|
2564 | PNDIS_ARC_BUF ArcBuf;
|
---|
2565 | #endif
|
---|
2566 | PVOID BusInterface;
|
---|
2567 | } DUMMYUNIONNAME;
|
---|
2568 | PNDIS_LOG Log;
|
---|
2569 | ULONG SlotNumber;
|
---|
2570 | PCM_RESOURCE_LIST AllocatedResources;
|
---|
2571 | PCM_RESOURCE_LIST AllocatedResourcesTranslated;
|
---|
2572 | SINGLE_LIST_ENTRY PatternList;
|
---|
2573 | NDIS_PNP_CAPABILITIES PMCapabilities;
|
---|
2574 | DEVICE_CAPABILITIES DeviceCaps;
|
---|
2575 | ULONG WakeUpEnable;
|
---|
2576 | DEVICE_POWER_STATE CurrentDevicePowerState;
|
---|
2577 | PIRP pIrpWaitWake;
|
---|
2578 | SYSTEM_POWER_STATE WaitWakeSystemState;
|
---|
2579 | LARGE_INTEGER VcIndex;
|
---|
2580 | KSPIN_LOCK VcCountLock;
|
---|
2581 | LIST_ENTRY WmiEnabledVcs;
|
---|
2582 | PNDIS_GUID pNdisGuidMap;
|
---|
2583 | PNDIS_GUID pCustomGuidMap;
|
---|
2584 | USHORT VcCount;
|
---|
2585 | USHORT cNdisGuidMap;
|
---|
2586 | USHORT cCustomGuidMap;
|
---|
2587 | USHORT CurrentMapRegister;
|
---|
2588 | PKEVENT AllocationEvent;
|
---|
2589 | USHORT BaseMapRegistersNeeded;
|
---|
2590 | USHORT SGMapRegistersNeeded;
|
---|
2591 | ULONG MaximumPhysicalMapping;
|
---|
2592 | NDIS_TIMER MediaDisconnectTimer;
|
---|
2593 | USHORT MediaDisconnectTimeOut;
|
---|
2594 | USHORT InstanceNumber;
|
---|
2595 | NDIS_EVENT OpenReadyEvent;
|
---|
2596 | NDIS_PNP_DEVICE_STATE PnPDeviceState;
|
---|
2597 | NDIS_PNP_DEVICE_STATE OldPnPDeviceState;
|
---|
2598 | PGET_SET_DEVICE_DATA SetBusData;
|
---|
2599 | PGET_SET_DEVICE_DATA GetBusData;
|
---|
2600 | KDPC DeferredDpc;
|
---|
2601 | #if 0
|
---|
2602 | /* FIXME: */
|
---|
2603 | NDIS_STATS NdisStats;
|
---|
2604 | #else
|
---|
2605 | ULONG NdisStats;
|
---|
2606 | #endif
|
---|
2607 | PNDIS_PACKET IndicatedPacket[MAXIMUM_PROCESSORS];
|
---|
2608 | PKEVENT RemoveReadyEvent;
|
---|
2609 | PKEVENT AllOpensClosedEvent;
|
---|
2610 | PKEVENT AllRequestsCompletedEvent;
|
---|
2611 | ULONG InitTimeMs;
|
---|
2612 | NDIS_MINIPORT_WORK_ITEM WorkItemBuffer[NUMBER_OF_SINGLE_WORK_ITEMS];
|
---|
2613 | PDMA_ADAPTER SystemAdapterObject;
|
---|
2614 | ULONG DriverVerifyFlags;
|
---|
2615 | POID_LIST OidList;
|
---|
2616 | USHORT InternalResetCount;
|
---|
2617 | USHORT MiniportResetCount;
|
---|
2618 | USHORT MediaSenseConnectCount;
|
---|
2619 | USHORT MediaSenseDisconnectCount;
|
---|
2620 | PNDIS_PACKET *xPackets;
|
---|
2621 | ULONG UserModeOpenReferences;
|
---|
2622 | _ANONYMOUS_UNION union {
|
---|
2623 | PVOID SavedSendHandler;
|
---|
2624 | PVOID SavedWanSendHandler;
|
---|
2625 | } DUMMYUNIONNAME2;
|
---|
2626 | PVOID SavedSendPacketsHandler;
|
---|
2627 | PVOID SavedCancelSendPacketsHandler;
|
---|
2628 | W_SEND_PACKETS_HANDLER WSendPacketsHandler;
|
---|
2629 | ULONG MiniportAttributes;
|
---|
2630 | PDMA_ADAPTER SavedSystemAdapterObject;
|
---|
2631 | USHORT NumOpens;
|
---|
2632 | USHORT CFHangXTicks;
|
---|
2633 | ULONG RequestCount;
|
---|
2634 | ULONG IndicatedPacketsCount;
|
---|
2635 | ULONG PhysicalMediumType;
|
---|
2636 | PNDIS_REQUEST LastRequest;
|
---|
2637 | LONG DmaAdapterRefCount;
|
---|
2638 | PVOID FakeMac;
|
---|
2639 | ULONG LockDbg;
|
---|
2640 | ULONG LockDbgX;
|
---|
2641 | PVOID LockThread;
|
---|
2642 | ULONG InfoFlags;
|
---|
2643 | KSPIN_LOCK TimerQueueLock;
|
---|
2644 | PKEVENT ResetCompletedEvent;
|
---|
2645 | PKEVENT QueuedBindingCompletedEvent;
|
---|
2646 | PKEVENT DmaResourcesReleasedEvent;
|
---|
2647 | FILTER_PACKET_INDICATION_HANDLER SavedPacketIndicateHandler;
|
---|
2648 | ULONG RegisteredInterrupts;
|
---|
2649 | PNPAGED_LOOKASIDE_LIST SGListLookasideList;
|
---|
2650 | ULONG ScatterGatherListSize;
|
---|
2651 | #endif /* _NDIS_ */
|
---|
2652 | };
|
---|
2653 |
|
---|
2654 | #if NDIS_LEGACY_DRIVER
|
---|
2655 |
|
---|
2656 | typedef NDIS_STATUS
|
---|
2657 | (NTAPI *WAN_SEND_HANDLER)(
|
---|
2658 | IN NDIS_HANDLE MacBindingHandle,
|
---|
2659 | IN NDIS_HANDLE LinkHandle,
|
---|
2660 | IN PVOID Packet);
|
---|
2661 |
|
---|
2662 | typedef VOID
|
---|
2663 | (NTAPI *SEND_PACKETS_HANDLER)(
|
---|
2664 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
2665 | IN PPNDIS_PACKET PacketArray,
|
---|
2666 | IN UINT NumberOfPackets);
|
---|
2667 |
|
---|
2668 | typedef NDIS_STATUS
|
---|
2669 | (NTAPI *SEND_HANDLER)(
|
---|
2670 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
2671 | IN PNDIS_PACKET Packet);
|
---|
2672 |
|
---|
2673 | typedef NDIS_STATUS
|
---|
2674 | (NTAPI *TRANSFER_DATA_HANDLER)(
|
---|
2675 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
2676 | IN NDIS_HANDLE MacReceiveContext,
|
---|
2677 | IN UINT ByteOffset,
|
---|
2678 | IN UINT BytesToTransfer,
|
---|
2679 | OUT PNDIS_PACKET Packet,
|
---|
2680 | OUT PUINT BytesTransferred);
|
---|
2681 |
|
---|
2682 | typedef NDIS_STATUS
|
---|
2683 | (NTAPI *RESET_HANDLER)(
|
---|
2684 | IN NDIS_HANDLE NdisBindingHandle);
|
---|
2685 |
|
---|
2686 | typedef NDIS_STATUS
|
---|
2687 | (NTAPI *REQUEST_HANDLER)(
|
---|
2688 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
2689 | IN PNDIS_REQUEST NdisRequest);
|
---|
2690 |
|
---|
2691 | #endif /* NDIS_LEGACY_DRIVER */
|
---|
2692 |
|
---|
2693 | #if defined(NDIS_WRAPPER)
|
---|
2694 | #define NDIS_COMMON_OPEN_BLOCK_WRAPPER_S \
|
---|
2695 | ULONG Flags; \
|
---|
2696 | ULONG References; \
|
---|
2697 | KSPIN_LOCK SpinLock; \
|
---|
2698 | NDIS_HANDLE FilterHandle; \
|
---|
2699 | ULONG ProtocolOptions; \
|
---|
2700 | USHORT CurrentLookahead; \
|
---|
2701 | USHORT ConnectDampTicks; \
|
---|
2702 | USHORT DisconnectDampTicks; \
|
---|
2703 | W_SEND_HANDLER WSendHandler; \
|
---|
2704 | W_TRANSFER_DATA_HANDLER WTransferDataHandler; \
|
---|
2705 | W_SEND_PACKETS_HANDLER WSendPacketsHandler; \
|
---|
2706 | W_CANCEL_SEND_PACKETS_HANDLER CancelSendPacketsHandler; \
|
---|
2707 | ULONG WakeUpEnable; \
|
---|
2708 | PKEVENT CloseCompleteEvent; \
|
---|
2709 | QUEUED_CLOSE QC; \
|
---|
2710 | ULONG AfReferences; \
|
---|
2711 | PNDIS_OPEN_BLOCK NextGlobalOpen;
|
---|
2712 | #else
|
---|
2713 | #define NDIS_COMMON_OPEN_BLOCK_WRAPPER_S
|
---|
2714 | #endif
|
---|
2715 |
|
---|
2716 | #define NDIS_COMMON_OPEN_BLOCK_S \
|
---|
2717 | PVOID MacHandle; \
|
---|
2718 | NDIS_HANDLE BindingHandle; \
|
---|
2719 | PNDIS_MINIPORT_BLOCK MiniportHandle; \
|
---|
2720 | PNDIS_PROTOCOL_BLOCK ProtocolHandle; \
|
---|
2721 | NDIS_HANDLE ProtocolBindingContext; \
|
---|
2722 | PNDIS_OPEN_BLOCK MiniportNextOpen; \
|
---|
2723 | PNDIS_OPEN_BLOCK ProtocolNextOpen; \
|
---|
2724 | NDIS_HANDLE MiniportAdapterContext; \
|
---|
2725 | BOOLEAN Reserved1; \
|
---|
2726 | BOOLEAN Reserved2; \
|
---|
2727 | BOOLEAN Reserved3; \
|
---|
2728 | BOOLEAN Reserved4; \
|
---|
2729 | PNDIS_STRING BindDeviceName; \
|
---|
2730 | KSPIN_LOCK Reserved5; \
|
---|
2731 | PNDIS_STRING RootDeviceName; \
|
---|
2732 | _ANONYMOUS_UNION union { \
|
---|
2733 | SEND_HANDLER SendHandler; \
|
---|
2734 | WAN_SEND_HANDLER WanSendHandler; \
|
---|
2735 | } DUMMYUNIONNAME; \
|
---|
2736 | TRANSFER_DATA_HANDLER TransferDataHandler; \
|
---|
2737 | SEND_COMPLETE_HANDLER SendCompleteHandler; \
|
---|
2738 | TRANSFER_DATA_COMPLETE_HANDLER TransferDataCompleteHandler; \
|
---|
2739 | RECEIVE_HANDLER ReceiveHandler; \
|
---|
2740 | RECEIVE_COMPLETE_HANDLER ReceiveCompleteHandler; \
|
---|
2741 | WAN_RECEIVE_HANDLER WanReceiveHandler; \
|
---|
2742 | REQUEST_COMPLETE_HANDLER RequestCompleteHandler; \
|
---|
2743 | RECEIVE_PACKET_HANDLER ReceivePacketHandler; \
|
---|
2744 | SEND_PACKETS_HANDLER SendPacketsHandler; \
|
---|
2745 | RESET_HANDLER ResetHandler; \
|
---|
2746 | REQUEST_HANDLER RequestHandler; \
|
---|
2747 | RESET_COMPLETE_HANDLER ResetCompleteHandler; \
|
---|
2748 | STATUS_HANDLER StatusHandler; \
|
---|
2749 | STATUS_COMPLETE_HANDLER StatusCompleteHandler; \
|
---|
2750 | NDIS_COMMON_OPEN_BLOCK_WRAPPER_S
|
---|
2751 |
|
---|
2752 | typedef struct _NDIS_COMMON_OPEN_BLOCK {
|
---|
2753 | NDIS_COMMON_OPEN_BLOCK_S
|
---|
2754 | } NDIS_COMMON_OPEN_BLOCK;
|
---|
2755 |
|
---|
2756 | struct _NDIS_OPEN_BLOCK
|
---|
2757 | {
|
---|
2758 | #ifdef __cplusplus
|
---|
2759 | NDIS_COMMON_OPEN_BLOCK NdisCommonOpenBlock;
|
---|
2760 | #else
|
---|
2761 | NDIS_COMMON_OPEN_BLOCK_S
|
---|
2762 | #endif
|
---|
2763 | };
|
---|
2764 |
|
---|
2765 | #include <xfilter.h>
|
---|
2766 |
|
---|
2767 | #define NDIS_M_MAX_LOOKAHEAD 526
|
---|
2768 |
|
---|
2769 | NDISAPI
|
---|
2770 | VOID
|
---|
2771 | NTAPI
|
---|
2772 | NdisInitializeTimer(
|
---|
2773 | PNDIS_TIMER Timer,
|
---|
2774 | PNDIS_TIMER_FUNCTION TimerFunction,
|
---|
2775 | PVOID FunctionContext);
|
---|
2776 |
|
---|
2777 | NDISAPI
|
---|
2778 | VOID
|
---|
2779 | NTAPI
|
---|
2780 | NdisCancelTimer(
|
---|
2781 | PNDIS_TIMER Timer,
|
---|
2782 | PBOOLEAN TimerCancelled);
|
---|
2783 |
|
---|
2784 | NDISAPI
|
---|
2785 | VOID
|
---|
2786 | NTAPI
|
---|
2787 | NdisSetTimer(
|
---|
2788 | PNDIS_TIMER Timer,
|
---|
2789 | UINT MillisecondsToDelay);
|
---|
2790 |
|
---|
2791 | NDISAPI
|
---|
2792 | VOID
|
---|
2793 | NTAPI
|
---|
2794 | NdisSetPeriodicTimer(
|
---|
2795 | PNDIS_TIMER NdisTimer,
|
---|
2796 | UINT MillisecondsPeriod);
|
---|
2797 |
|
---|
2798 | NDISAPI
|
---|
2799 | VOID
|
---|
2800 | NTAPI
|
---|
2801 | NdisSetTimerEx(
|
---|
2802 | PNDIS_TIMER NdisTimer,
|
---|
2803 | UINT MillisecondsToDelay,
|
---|
2804 | PVOID FunctionContext);
|
---|
2805 |
|
---|
2806 | NDISAPI
|
---|
2807 | PVOID
|
---|
2808 | NTAPI
|
---|
2809 | NdisGetRoutineAddress(
|
---|
2810 | PNDIS_STRING NdisRoutineName);
|
---|
2811 |
|
---|
2812 | NDISAPI
|
---|
2813 | UINT
|
---|
2814 | NTAPI
|
---|
2815 | NdisGetVersion(VOID);
|
---|
2816 |
|
---|
2817 | #if NDIS_LEGACY_DRIVER
|
---|
2818 |
|
---|
2819 | NDISAPI
|
---|
2820 | VOID
|
---|
2821 | NTAPI
|
---|
2822 | NdisAllocateBuffer(
|
---|
2823 | OUT PNDIS_STATUS Status,
|
---|
2824 | OUT PNDIS_BUFFER *Buffer,
|
---|
2825 | IN NDIS_HANDLE PoolHandle OPTIONAL,
|
---|
2826 | IN PVOID VirtualAddress,
|
---|
2827 | IN UINT Length);
|
---|
2828 |
|
---|
2829 | NDISAPI
|
---|
2830 | VOID
|
---|
2831 | NTAPI
|
---|
2832 | NdisAllocateBufferPool(
|
---|
2833 | OUT PNDIS_STATUS Status,
|
---|
2834 | OUT PNDIS_HANDLE PoolHandle,
|
---|
2835 | IN UINT NumberOfDescriptors);
|
---|
2836 |
|
---|
2837 | NDISAPI
|
---|
2838 | VOID
|
---|
2839 | NTAPI
|
---|
2840 | NdisFreeBufferPool(
|
---|
2841 | IN NDIS_HANDLE PoolHandle);
|
---|
2842 |
|
---|
2843 | /*
|
---|
2844 | NDISAPI
|
---|
2845 | VOID
|
---|
2846 | NTAPI
|
---|
2847 | NdisFreeBuffer(
|
---|
2848 | IN PNDIS_BUFFER Buffer);
|
---|
2849 | */
|
---|
2850 | #define NdisFreeBuffer IoFreeMdl
|
---|
2851 |
|
---|
2852 | NDISAPI
|
---|
2853 | VOID
|
---|
2854 | NTAPI
|
---|
2855 | NdisAllocatePacketPool(
|
---|
2856 | OUT PNDIS_STATUS Status,
|
---|
2857 | OUT PNDIS_HANDLE PoolHandle,
|
---|
2858 | IN UINT NumberOfDescriptors,
|
---|
2859 | IN UINT ProtocolReservedLength);
|
---|
2860 |
|
---|
2861 | NDISAPI
|
---|
2862 | VOID
|
---|
2863 | NTAPI
|
---|
2864 | NdisAllocatePacketPoolEx(
|
---|
2865 | OUT PNDIS_STATUS Status,
|
---|
2866 | OUT PNDIS_HANDLE PoolHandle,
|
---|
2867 | IN UINT NumberOfDescriptors,
|
---|
2868 | IN UINT NumberOfOverflowDescriptors,
|
---|
2869 | IN UINT ProtocolReservedLength);
|
---|
2870 |
|
---|
2871 | NDISAPI
|
---|
2872 | VOID
|
---|
2873 | NTAPI
|
---|
2874 | NdisSetPacketPoolProtocolId(
|
---|
2875 | IN NDIS_HANDLE PacketPoolHandle,
|
---|
2876 | IN UINT ProtocolId);
|
---|
2877 |
|
---|
2878 | NDISAPI
|
---|
2879 | UINT
|
---|
2880 | NTAPI
|
---|
2881 | NdisPacketPoolUsage(
|
---|
2882 | IN NDIS_HANDLE PoolHandle);
|
---|
2883 |
|
---|
2884 | NDISAPI
|
---|
2885 | UINT
|
---|
2886 | NTAPI
|
---|
2887 | NdisPacketSize(
|
---|
2888 | IN UINT ProtocolReservedSize);
|
---|
2889 |
|
---|
2890 | NDISAPI
|
---|
2891 | NDIS_HANDLE
|
---|
2892 | NTAPI
|
---|
2893 | NdisGetPoolFromPacket(
|
---|
2894 | IN PNDIS_PACKET Packet);
|
---|
2895 |
|
---|
2896 | NDISAPI
|
---|
2897 | PNDIS_PACKET_STACK
|
---|
2898 | NTAPI
|
---|
2899 | NdisIMGetCurrentPacketStack(
|
---|
2900 | IN PNDIS_PACKET Packet,
|
---|
2901 | OUT BOOLEAN * StacksRemaining);
|
---|
2902 |
|
---|
2903 | NDISAPI
|
---|
2904 | VOID
|
---|
2905 | NTAPI
|
---|
2906 | NdisFreePacketPool(
|
---|
2907 | IN NDIS_HANDLE PoolHandle);
|
---|
2908 |
|
---|
2909 | NDISAPI
|
---|
2910 | VOID
|
---|
2911 | NTAPI
|
---|
2912 | NdisFreePacket(
|
---|
2913 | IN PNDIS_PACKET Packet);
|
---|
2914 |
|
---|
2915 | NDISAPI
|
---|
2916 | VOID
|
---|
2917 | NTAPI
|
---|
2918 | NdisDprFreePacket(
|
---|
2919 | IN PNDIS_PACKET Packet);
|
---|
2920 |
|
---|
2921 | NDISAPI
|
---|
2922 | VOID
|
---|
2923 | NTAPI
|
---|
2924 | NdisDprFreePacketNonInterlocked(
|
---|
2925 | IN PNDIS_PACKET Packet);
|
---|
2926 |
|
---|
2927 | NDISAPI
|
---|
2928 | VOID
|
---|
2929 | NTAPI
|
---|
2930 | NdisAllocatePacket(
|
---|
2931 | OUT PNDIS_STATUS Status,
|
---|
2932 | OUT PNDIS_PACKET *Packet,
|
---|
2933 | IN NDIS_HANDLE PoolHandle);
|
---|
2934 |
|
---|
2935 | NDISAPI
|
---|
2936 | VOID
|
---|
2937 | NTAPI
|
---|
2938 | NdisDprAllocatePacket(
|
---|
2939 | OUT PNDIS_STATUS Status,
|
---|
2940 | OUT PNDIS_PACKET *Packet,
|
---|
2941 | IN NDIS_HANDLE PoolHandle);
|
---|
2942 |
|
---|
2943 | NDISAPI
|
---|
2944 | VOID
|
---|
2945 | NTAPI
|
---|
2946 | NdisDprAllocatePacketNonInterlocked(
|
---|
2947 | OUT PNDIS_STATUS Status,
|
---|
2948 | OUT PNDIS_PACKET *Packet,
|
---|
2949 | IN NDIS_HANDLE PoolHandle);
|
---|
2950 |
|
---|
2951 | /*
|
---|
2952 | * VOID
|
---|
2953 | * NdisReinitializePacket(
|
---|
2954 | * IN OUT PNDIS_PACKET Packet);
|
---|
2955 | */
|
---|
2956 | #define NdisReinitializePacket(Packet) { \
|
---|
2957 | (Packet)->Private.Head = (PNDIS_BUFFER)NULL; \
|
---|
2958 | (Packet)->Private.ValidCounts = FALSE; \
|
---|
2959 | }
|
---|
2960 |
|
---|
2961 | /*
|
---|
2962 | NDISAPI
|
---|
2963 | VOID
|
---|
2964 | NTAPI
|
---|
2965 | NdisQueryBuffer(
|
---|
2966 | IN PNDIS_BUFFER Buffer,
|
---|
2967 | OUT PVOID *VirtualAddress OPTIONAL,
|
---|
2968 | OUT PUINT Length);
|
---|
2969 | */
|
---|
2970 | #define NdisQueryBuffer(_Buffer, _VirtualAddress, _Length) { \
|
---|
2971 | if (ARGUMENT_PRESENT(_VirtualAddress)) { \
|
---|
2972 | *(PVOID *)(_VirtualAddress) = MmGetSystemAddressForMdl(_Buffer); \
|
---|
2973 | } \
|
---|
2974 | *(_Length) = MmGetMdlByteCount(_Buffer); \
|
---|
2975 | }
|
---|
2976 |
|
---|
2977 | NDISAPI
|
---|
2978 | VOID
|
---|
2979 | NTAPI
|
---|
2980 | NdisGetFirstBufferFromPacket(
|
---|
2981 | IN PNDIS_PACKET _Packet,
|
---|
2982 | OUT PNDIS_BUFFER *_FirstBuffer,
|
---|
2983 | OUT PVOID *_FirstBufferVA,
|
---|
2984 | OUT PUINT _FirstBufferLength,
|
---|
2985 | OUT PUINT _TotalBufferLength);
|
---|
2986 |
|
---|
2987 | /*
|
---|
2988 | * VOID
|
---|
2989 | * NdisGetFirstBufferFromPacketSafe(
|
---|
2990 | * IN PNDIS_PACKET _Packet,
|
---|
2991 | * OUT PNDIS_BUFFER * _FirstBuffer,
|
---|
2992 | * OUT PVOID * _FirstBufferVA,
|
---|
2993 | * OUT PUINT _FirstBufferLength,
|
---|
2994 | * OUT PUINT _TotalBufferLength),
|
---|
2995 | * IN MM_PAGE_PRIORITY _Priority)
|
---|
2996 | */
|
---|
2997 | #define NdisGetFirstBufferFromPacketSafe(_Packet, \
|
---|
2998 | _FirstBuffer, \
|
---|
2999 | _FirstBufferVA, \
|
---|
3000 | _FirstBufferLength, \
|
---|
3001 | _TotalBufferLength, \
|
---|
3002 | _Priority) \
|
---|
3003 | { \
|
---|
3004 | PNDIS_BUFFER _Buffer; \
|
---|
3005 | \
|
---|
3006 | _Buffer = (_Packet)->Private.Head; \
|
---|
3007 | *(_FirstBuffer) = _Buffer; \
|
---|
3008 | if (_Buffer != NULL) { \
|
---|
3009 | *(_FirstBufferVA) = MmGetSystemAddressForMdlSafe(_Buffer, _Priority); \
|
---|
3010 | *(_FirstBufferLength) = MmGetMdlByteCount(_Buffer); \
|
---|
3011 | _Buffer = _Buffer->Next; \
|
---|
3012 | *(_TotalBufferLength) = *(_FirstBufferLength); \
|
---|
3013 | while (_Buffer != NULL) { \
|
---|
3014 | *(_TotalBufferLength) += MmGetMdlByteCount(_Buffer); \
|
---|
3015 | _Buffer = _Buffer->Next; \
|
---|
3016 | } \
|
---|
3017 | } \
|
---|
3018 | else { \
|
---|
3019 | *(_FirstBufferVA) = 0; \
|
---|
3020 | *(_FirstBufferLength) = 0; \
|
---|
3021 | *(_TotalBufferLength) = 0; \
|
---|
3022 | } \
|
---|
3023 | }
|
---|
3024 |
|
---|
3025 | /*
|
---|
3026 | * VOID
|
---|
3027 | * NdisRecalculatePacketCounts(
|
---|
3028 | * IN OUT PNDIS_PACKET Packet);
|
---|
3029 | */
|
---|
3030 | #define NdisRecalculatePacketCounts(Packet) { \
|
---|
3031 | PNDIS_BUFFER _Buffer = (Packet)->Private.Head; \
|
---|
3032 | if (_Buffer != NULL) { \
|
---|
3033 | while (_Buffer->Next != NULL) { \
|
---|
3034 | _Buffer = _Buffer->Next; \
|
---|
3035 | } \
|
---|
3036 | (Packet)->Private.Tail = _Buffer; \
|
---|
3037 | } \
|
---|
3038 | (Packet)->Private.ValidCounts = FALSE; \
|
---|
3039 | }
|
---|
3040 |
|
---|
3041 | /*
|
---|
3042 | * VOID
|
---|
3043 | * NdisChainBufferAtFront(
|
---|
3044 | * IN OUT PNDIS_PACKET Packet,
|
---|
3045 | * IN OUT PNDIS_BUFFER Buffer)
|
---|
3046 | */
|
---|
3047 | #define NdisChainBufferAtFront(Packet, \
|
---|
3048 | Buffer) \
|
---|
3049 | { \
|
---|
3050 | PNDIS_BUFFER _NdisBuffer = (Buffer); \
|
---|
3051 | \
|
---|
3052 | while (_NdisBuffer->Next != NULL) \
|
---|
3053 | _NdisBuffer = _NdisBuffer->Next; \
|
---|
3054 | \
|
---|
3055 | if ((Packet)->Private.Head == NULL) \
|
---|
3056 | (Packet)->Private.Tail = _NdisBuffer; \
|
---|
3057 | \
|
---|
3058 | _NdisBuffer->Next = (Packet)->Private.Head; \
|
---|
3059 | (Packet)->Private.Head = (Buffer); \
|
---|
3060 | (Packet)->Private.ValidCounts = FALSE; \
|
---|
3061 | }
|
---|
3062 |
|
---|
3063 | /*
|
---|
3064 | * VOID
|
---|
3065 | * NdisChainBufferAtBack(
|
---|
3066 | * IN OUT PNDIS_PACKET Packet,
|
---|
3067 | * IN OUT PNDIS_BUFFER Buffer)
|
---|
3068 | */
|
---|
3069 | #define NdisChainBufferAtBack(Packet, \
|
---|
3070 | Buffer) \
|
---|
3071 | { \
|
---|
3072 | PNDIS_BUFFER _NdisBuffer = (Buffer); \
|
---|
3073 | \
|
---|
3074 | while (_NdisBuffer->Next != NULL) \
|
---|
3075 | _NdisBuffer = _NdisBuffer->Next; \
|
---|
3076 | \
|
---|
3077 | _NdisBuffer->Next = NULL; \
|
---|
3078 | \
|
---|
3079 | if ((Packet)->Private.Head != NULL) \
|
---|
3080 | (Packet)->Private.Tail->Next = (Buffer); \
|
---|
3081 | else \
|
---|
3082 | (Packet)->Private.Head = (Buffer); \
|
---|
3083 | \
|
---|
3084 | (Packet)->Private.Tail = _NdisBuffer; \
|
---|
3085 | (Packet)->Private.ValidCounts = FALSE; \
|
---|
3086 | }
|
---|
3087 |
|
---|
3088 | NDISAPI
|
---|
3089 | VOID
|
---|
3090 | NTAPI
|
---|
3091 | NdisUnchainBufferAtFront(
|
---|
3092 | IN OUT PNDIS_PACKET Packet,
|
---|
3093 | OUT PNDIS_BUFFER *Buffer);
|
---|
3094 |
|
---|
3095 | NDISAPI
|
---|
3096 | VOID
|
---|
3097 | NTAPI
|
---|
3098 | NdisUnchainBufferAtBack(
|
---|
3099 | IN OUT PNDIS_PACKET Packet,
|
---|
3100 | OUT PNDIS_BUFFER *Buffer);
|
---|
3101 |
|
---|
3102 | NDISAPI
|
---|
3103 | VOID
|
---|
3104 | NTAPI
|
---|
3105 | NdisCopyFromPacketToPacket(
|
---|
3106 | IN PNDIS_PACKET Destination,
|
---|
3107 | IN UINT DestinationOffset,
|
---|
3108 | IN UINT BytesToCopy,
|
---|
3109 | IN PNDIS_PACKET Source,
|
---|
3110 | IN UINT SourceOffset,
|
---|
3111 | OUT PUINT BytesCopied);
|
---|
3112 |
|
---|
3113 | NDISAPI
|
---|
3114 | VOID
|
---|
3115 | NTAPI
|
---|
3116 | NdisCopyFromPacketToPacketSafe(
|
---|
3117 | IN PNDIS_PACKET Destination,
|
---|
3118 | IN UINT DestinationOffset,
|
---|
3119 | IN UINT BytesToCopy,
|
---|
3120 | IN PNDIS_PACKET Source,
|
---|
3121 | IN UINT SourceOffset,
|
---|
3122 | OUT PUINT BytesCopied,
|
---|
3123 | IN MM_PAGE_PRIORITY Priority);
|
---|
3124 |
|
---|
3125 | NDISAPI
|
---|
3126 | NDIS_STATUS
|
---|
3127 | NTAPI
|
---|
3128 | NdisAllocateMemory(
|
---|
3129 | OUT PVOID *VirtualAddress,
|
---|
3130 | IN UINT Length,
|
---|
3131 | IN UINT MemoryFlags,
|
---|
3132 | IN NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress);
|
---|
3133 |
|
---|
3134 | #define NdisInitializeWorkItem(_WI_, _R_, _C_) { \
|
---|
3135 | (_WI_)->Context = _C_; \
|
---|
3136 | (_WI_)->Routine = _R_; \
|
---|
3137 | }
|
---|
3138 |
|
---|
3139 | NDISAPI
|
---|
3140 | NDIS_STATUS
|
---|
3141 | NTAPI
|
---|
3142 | NdisScheduleWorkItem(
|
---|
3143 | IN PNDIS_WORK_ITEM WorkItem);
|
---|
3144 |
|
---|
3145 | NDISAPI
|
---|
3146 | VOID
|
---|
3147 | NTAPI
|
---|
3148 | NdisSetPacketStatus(
|
---|
3149 | IN PNDIS_PACKET Packet,
|
---|
3150 | IN NDIS_STATUS Status,
|
---|
3151 | IN NDIS_HANDLE Handle,
|
---|
3152 | IN ULONG Code);
|
---|
3153 |
|
---|
3154 | #endif /* NDIS_LEGACY_DRIVER */
|
---|
3155 |
|
---|
3156 | NDISAPI
|
---|
3157 | VOID
|
---|
3158 | NTAPI
|
---|
3159 | NdisOpenFile(
|
---|
3160 | OUT PNDIS_STATUS Status,
|
---|
3161 | OUT PNDIS_HANDLE FileHandle,
|
---|
3162 | OUT PUINT FileLength,
|
---|
3163 | IN PNDIS_STRING FileName,
|
---|
3164 | IN NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress);
|
---|
3165 |
|
---|
3166 | NDISAPI
|
---|
3167 | VOID
|
---|
3168 | NTAPI
|
---|
3169 | NdisCloseFile(
|
---|
3170 | IN NDIS_HANDLE FileHandle);
|
---|
3171 |
|
---|
3172 | NDISAPI
|
---|
3173 | VOID
|
---|
3174 | NTAPI
|
---|
3175 | NdisMapFile(
|
---|
3176 | OUT PNDIS_STATUS Status,
|
---|
3177 | OUT PVOID *MappedBuffer,
|
---|
3178 | IN NDIS_HANDLE FileHandle);
|
---|
3179 |
|
---|
3180 | NDISAPI
|
---|
3181 | VOID
|
---|
3182 | NTAPI
|
---|
3183 | NdisUnmapFile(
|
---|
3184 | IN NDIS_HANDLE FileHandle);
|
---|
3185 |
|
---|
3186 | NDISAPI
|
---|
3187 | ULONG
|
---|
3188 | NTAPI
|
---|
3189 | NdisGetSharedDataAlignment(VOID);
|
---|
3190 |
|
---|
3191 | #define NdisFlushBuffer(Buffer,WriteToDevice) \
|
---|
3192 | KeFlushIoBuffers((Buffer),!(WriteToDevice), TRUE)
|
---|
3193 |
|
---|
3194 | NDISAPI
|
---|
3195 | VOID
|
---|
3196 | NTAPI
|
---|
3197 | NdisCopyBuffer(
|
---|
3198 | OUT PNDIS_STATUS Status,
|
---|
3199 | OUT PNDIS_BUFFER *Buffer,
|
---|
3200 | IN NDIS_HANDLE PoolHandle,
|
---|
3201 | IN PVOID MemoryDescriptor,
|
---|
3202 | IN UINT Offset,
|
---|
3203 | IN UINT Length);
|
---|
3204 |
|
---|
3205 | /*
|
---|
3206 | * VOID
|
---|
3207 | * NdisCopyLookaheadData(
|
---|
3208 | * IN PVOID Destination,
|
---|
3209 | * IN PVOID Source,
|
---|
3210 | * IN ULONG Length,
|
---|
3211 | * IN ULONG ReceiveFlags);
|
---|
3212 | */
|
---|
3213 |
|
---|
3214 | #if defined(_M_IX86) || defined(_M_AMD64)
|
---|
3215 | #define NdisCopyLookaheadData(Destination, Source, Length, MacOptions) \
|
---|
3216 | RtlCopyMemory(Destination, Source, Length)
|
---|
3217 | #else
|
---|
3218 | #define NdisCopyLookaheadData(Destination, Source, Length, MacOptions) \
|
---|
3219 | { \
|
---|
3220 | if ((MacOptions) & NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA) \
|
---|
3221 | { \
|
---|
3222 | RtlCopyMemory(_Destination, _Source, _Length); \
|
---|
3223 | } \
|
---|
3224 | else \
|
---|
3225 | { \
|
---|
3226 | PUCHAR _Src = (PUCHAR)(Source); \
|
---|
3227 | PUCHAR _Dest = (PUCHAR)(Destination); \
|
---|
3228 | PUCHAR _End = _Dest + (Length); \
|
---|
3229 | while (_Dest < _End) \
|
---|
3230 | *_Dest++ = *_Src++; \
|
---|
3231 | } \
|
---|
3232 | }
|
---|
3233 | #endif
|
---|
3234 |
|
---|
3235 | /*
|
---|
3236 | NDISAPI
|
---|
3237 | VOID
|
---|
3238 | NTAPI
|
---|
3239 | NdisAdjustBufferLength(
|
---|
3240 | IN PNDIS_BUFFER Buffer,
|
---|
3241 | IN UINT Length);
|
---|
3242 | */
|
---|
3243 | #define NdisAdjustBufferLength(Buffer, Length) \
|
---|
3244 | (((Buffer)->ByteCount) = (Length))
|
---|
3245 |
|
---|
3246 | #if NDIS_SUPPORT_NDIS6
|
---|
3247 | #define NdisAdjustMdlLength(_Mdl, _Length) \
|
---|
3248 | (((_Mdl)->ByteCount) = (_Length))
|
---|
3249 | #endif
|
---|
3250 |
|
---|
3251 | /*
|
---|
3252 | NDISAPI
|
---|
3253 | ULONG
|
---|
3254 | NTAPI
|
---|
3255 | NdisBufferLength(
|
---|
3256 | IN PNDIS_BUFFER Buffer);
|
---|
3257 | */
|
---|
3258 | #define NdisBufferLength MmGetMdlByteCount
|
---|
3259 |
|
---|
3260 | /*
|
---|
3261 | NDISAPI
|
---|
3262 | PVOID
|
---|
3263 | NTAPI
|
---|
3264 | NdisBufferVirtualAddress(
|
---|
3265 | IN PNDIS_BUFFER Buffer);
|
---|
3266 | */
|
---|
3267 | #define NdisBufferVirtualAddress MmGetSystemAddressForMdl
|
---|
3268 |
|
---|
3269 | #define NdisBufferVirtualAddressSafe MmGetSystemAddressForMdlSafe
|
---|
3270 |
|
---|
3271 | NDISAPI
|
---|
3272 | ULONG
|
---|
3273 | NTAPI
|
---|
3274 | NDIS_BUFFER_TO_SPAN_PAGES(
|
---|
3275 | IN PNDIS_BUFFER Buffer);
|
---|
3276 |
|
---|
3277 | /*
|
---|
3278 | NDISAPI
|
---|
3279 | VOID
|
---|
3280 | NTAPI
|
---|
3281 | NdisGetBufferPhysicalArraySize(
|
---|
3282 | IN PNDIS_BUFFER Buffer,
|
---|
3283 | OUT PUINT ArraySize);
|
---|
3284 | */
|
---|
3285 | #define NdisGetBufferPhysicalArraySize(Buffer, ArraySize) \
|
---|
3286 | (*(ArraySize) = NDIS_BUFFER_TO_SPAN_PAGES(Buffer))
|
---|
3287 |
|
---|
3288 | /*
|
---|
3289 | NDISAPI
|
---|
3290 | VOID
|
---|
3291 | NTAPI
|
---|
3292 | NdisQueryBufferOffset(
|
---|
3293 | IN PNDIS_BUFFER Buffer,
|
---|
3294 | OUT PUINT Offset,
|
---|
3295 | OUT PUINT Length);
|
---|
3296 | */
|
---|
3297 | #define NdisQueryBufferOffset(_Buffer, _Offset, _Length) { \
|
---|
3298 | *(_Offset) = MmGetMdlByteOffset(_Buffer); \
|
---|
3299 | *(_Length) = MmGetMdlByteCount(_Buffer); \
|
---|
3300 | }
|
---|
3301 |
|
---|
3302 | /*
|
---|
3303 | * PVOID
|
---|
3304 | * NDIS_BUFFER_LINKAGE(
|
---|
3305 | * IN PNDIS_BUFFER Buffer);
|
---|
3306 | */
|
---|
3307 | #define NDIS_BUFFER_LINKAGE(Buffer) (Buffer)->Next
|
---|
3308 |
|
---|
3309 | /*
|
---|
3310 | * VOID
|
---|
3311 | * NdisGetNextBuffer(
|
---|
3312 | * IN PNDIS_BUFFER CurrentBuffer,
|
---|
3313 | * OUT PNDIS_BUFFER * NextBuffer)
|
---|
3314 | */
|
---|
3315 | #define NdisGetNextBuffer(CurrentBuffer, \
|
---|
3316 | NextBuffer) \
|
---|
3317 | { \
|
---|
3318 | *(NextBuffer) = (CurrentBuffer)->Next; \
|
---|
3319 | }
|
---|
3320 |
|
---|
3321 | #if NDIS_LEGACY_DRIVER
|
---|
3322 |
|
---|
3323 | #define NDIS_PACKET_FIRST_NDIS_BUFFER(_Packet) ((_Packet)->Private.Head)
|
---|
3324 | #define NDIS_PACKET_LAST_NDIS_BUFFER(_Packet) ((_Packet)->Private.Tail)
|
---|
3325 | #define NDIS_PACKET_VALID_COUNTS(_Packet) ((_Packet)->Private.ValidCounts)
|
---|
3326 |
|
---|
3327 | /*
|
---|
3328 | * UINT
|
---|
3329 | * NdisGetPacketFlags(
|
---|
3330 | * IN PNDIS_PACKET Packet);
|
---|
3331 | */
|
---|
3332 | #define NdisGetPacketFlags(Packet) (Packet)->Private.Flags
|
---|
3333 |
|
---|
3334 | /*
|
---|
3335 | * ULONG
|
---|
3336 | * NDIS_GET_PACKET_PROTOCOL_TYPE(
|
---|
3337 | * IN PNDIS_PACKET Packet);
|
---|
3338 | */
|
---|
3339 | #define NDIS_GET_PACKET_PROTOCOL_TYPE(_Packet) \
|
---|
3340 | ((_Packet)->Private.Flags & NDIS_PROTOCOL_ID_MASK)
|
---|
3341 |
|
---|
3342 | /*
|
---|
3343 | * PNDIS_PACKET_OOB_DATA
|
---|
3344 | * NDIS_OOB_DATA_FROM_PACKET(
|
---|
3345 | * IN PNDIS_PACKET Packet);
|
---|
3346 | */
|
---|
3347 | #define NDIS_OOB_DATA_FROM_PACKET(_Packet) \
|
---|
3348 | (PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3349 | (_Packet)->Private.NdisPacketOobOffset)
|
---|
3350 |
|
---|
3351 | /*
|
---|
3352 | * ULONG
|
---|
3353 | * NDIS_GET_PACKET_HEADER_SIZE(
|
---|
3354 | * IN PNDIS_PACKET Packet);
|
---|
3355 | */
|
---|
3356 | #define NDIS_GET_PACKET_HEADER_SIZE(_Packet) \
|
---|
3357 | ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3358 | (_Packet)->Private.NdisPacketOobOffset))->HeaderSize
|
---|
3359 |
|
---|
3360 | /*
|
---|
3361 | * NDIS_STATUS
|
---|
3362 | * NDIS_GET_PACKET_STATUS(
|
---|
3363 | * IN PNDIS_PACKET Packet);
|
---|
3364 | */
|
---|
3365 | #define NDIS_GET_PACKET_STATUS(_Packet) \
|
---|
3366 | ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3367 | (_Packet)->Private.NdisPacketOobOffset))->Status
|
---|
3368 |
|
---|
3369 | /*
|
---|
3370 | * ULONGLONG
|
---|
3371 | * NDIS_GET_PACKET_TIME_TO_SEND(
|
---|
3372 | * IN PNDIS_PACKET Packet);
|
---|
3373 | */
|
---|
3374 | #define NDIS_GET_PACKET_TIME_TO_SEND(_Packet) \
|
---|
3375 | ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3376 | (_Packet)->Private.NdisPacketOobOffset))->TimeToSend
|
---|
3377 |
|
---|
3378 | /*
|
---|
3379 | * ULONGLONG
|
---|
3380 | * NDIS_GET_PACKET_TIME_SENT(
|
---|
3381 | * IN PNDIS_PACKET Packet);
|
---|
3382 | */
|
---|
3383 | #define NDIS_GET_PACKET_TIME_SENT(_Packet) \
|
---|
3384 | ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3385 | (_Packet)->Private.NdisPacketOobOffset))->TimeSent
|
---|
3386 |
|
---|
3387 | /*
|
---|
3388 | * ULONGLONG
|
---|
3389 | * NDIS_GET_PACKET_TIME_RECEIVED(
|
---|
3390 | * IN PNDIS_PACKET Packet);
|
---|
3391 | */
|
---|
3392 | #define NDIS_GET_PACKET_TIME_RECEIVED(_Packet) \
|
---|
3393 | ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3394 | (_Packet)->Private.NdisPacketOobOffset))->TimeReceived
|
---|
3395 |
|
---|
3396 | /*
|
---|
3397 | * VOID
|
---|
3398 | * NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO(
|
---|
3399 | * IN PNDIS_PACKET Packet,
|
---|
3400 | * IN PPVOID pMediaSpecificInfo,
|
---|
3401 | * IN PUINT pSizeMediaSpecificInfo);
|
---|
3402 | */
|
---|
3403 | #define NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO(_Packet, \
|
---|
3404 | _pMediaSpecificInfo, \
|
---|
3405 | _pSizeMediaSpecificInfo) \
|
---|
3406 | { \
|
---|
3407 | if (!((_Packet)->Private.NdisPacketFlags & fPACKET_ALLOCATED_BY_NDIS) || \
|
---|
3408 | !((_Packet)->Private.NdisPacketFlags & fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO)) \
|
---|
3409 | { \
|
---|
3410 | *(_pMediaSpecificInfo) = NULL; \
|
---|
3411 | *(_pSizeMediaSpecificInfo) = 0; \
|
---|
3412 | } \
|
---|
3413 | else \
|
---|
3414 | { \
|
---|
3415 | *(_pMediaSpecificInfo) = ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3416 | (_Packet)->Private.NdisPacketOobOffset))->MediaSpecificInformation; \
|
---|
3417 | *(_pSizeMediaSpecificInfo) = ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3418 | (_Packet)->Private.NdisPacketOobOffset))->SizeMediaSpecificInfo; \
|
---|
3419 | } \
|
---|
3420 | }
|
---|
3421 |
|
---|
3422 | /*
|
---|
3423 | * VOID
|
---|
3424 | * NDIS_SET_PACKET_HEADER_SIZE(
|
---|
3425 | * IN PNDIS_PACKET Packet,
|
---|
3426 | * IN UINT HdrSize);
|
---|
3427 | */
|
---|
3428 | #define NDIS_SET_PACKET_HEADER_SIZE(_Packet, _HdrSize) \
|
---|
3429 | ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3430 | (_Packet)->Private.NdisPacketOobOffset))->HeaderSize = (_HdrSize)
|
---|
3431 |
|
---|
3432 | /*
|
---|
3433 | * VOID
|
---|
3434 | * NDIS_SET_PACKET_STATUS(
|
---|
3435 | * IN PNDIS_PACKET Packet,
|
---|
3436 | * IN NDIS_STATUS Status);
|
---|
3437 | */
|
---|
3438 | #define NDIS_SET_PACKET_STATUS(_Packet, _Status) \
|
---|
3439 | ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3440 | (_Packet)->Private.NdisPacketOobOffset))->Status = (_Status)
|
---|
3441 |
|
---|
3442 | /*
|
---|
3443 | * VOID
|
---|
3444 | * NDIS_SET_PACKET_TIME_TO_SEND(
|
---|
3445 | * IN PNDIS_PACKET Packet,
|
---|
3446 | * IN ULONGLONG TimeToSend);
|
---|
3447 | */
|
---|
3448 | #define NDIS_SET_PACKET_TIME_TO_SEND(_Packet, _TimeToSend) \
|
---|
3449 | ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3450 | (_Packet)->Private.NdisPacketOobOffset))->TimeToSend = (_TimeToSend)
|
---|
3451 |
|
---|
3452 | /*
|
---|
3453 | * VOID
|
---|
3454 | * NDIS_SET_PACKET_TIME_SENT(
|
---|
3455 | * IN PNDIS_PACKET Packet,
|
---|
3456 | * IN ULONGLONG TimeSent);
|
---|
3457 | */
|
---|
3458 | #define NDIS_SET_PACKET_TIME_SENT(_Packet, _TimeSent) \
|
---|
3459 | ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3460 | (_Packet)->Private.NdisPacketOobOffset))->TimeSent = (_TimeSent)
|
---|
3461 |
|
---|
3462 | /*
|
---|
3463 | * VOID
|
---|
3464 | * NDIS_SET_PACKET_TIME_RECEIVED(
|
---|
3465 | * IN PNDIS_PACKET Packet,
|
---|
3466 | * IN ULONGLONG TimeReceived);
|
---|
3467 | */
|
---|
3468 | #define NDIS_SET_PACKET_TIME_RECEIVED(_Packet, _TimeReceived) \
|
---|
3469 | ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3470 | (_Packet)->Private.NdisPacketOobOffset))->TimeReceived = (_TimeReceived)
|
---|
3471 |
|
---|
3472 | /*
|
---|
3473 | * VOID
|
---|
3474 | * NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO(
|
---|
3475 | * IN PNDIS_PACKET Packet,
|
---|
3476 | * IN PVOID MediaSpecificInfo,
|
---|
3477 | * IN UINT SizeMediaSpecificInfo);
|
---|
3478 | */
|
---|
3479 | #define NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO(_Packet, \
|
---|
3480 | _MediaSpecificInfo, \
|
---|
3481 | _SizeMediaSpecificInfo) \
|
---|
3482 | { \
|
---|
3483 | if ((_Packet)->Private.NdisPacketFlags & fPACKET_ALLOCATED_BY_NDIS) \
|
---|
3484 | { \
|
---|
3485 | (_Packet)->Private.NdisPacketFlags |= fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO; \
|
---|
3486 | ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3487 | (_Packet)->Private.NdisPacketOobOffset))->MediaSpecificInformation = \
|
---|
3488 | (_MediaSpecificInfo); \
|
---|
3489 | ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
|
---|
3490 | (_Packet)->Private.NdisPacketOobOffset))->SizeMediaSpecificInfo = \
|
---|
3491 | (_SizeMediaSpecificInfo); \
|
---|
3492 | } \
|
---|
3493 | }
|
---|
3494 |
|
---|
3495 | /*
|
---|
3496 | * VOID
|
---|
3497 | * NdisSetPacketFlags(
|
---|
3498 | * IN PNDIS_PACKET Packet,
|
---|
3499 | * IN UINT Flags);
|
---|
3500 | */
|
---|
3501 | #define NdisSetPacketFlags(Packet, Flags) (Packet)->Private.Flags |= (Flags)
|
---|
3502 |
|
---|
3503 | /*
|
---|
3504 | * VOID
|
---|
3505 | * NdisClearPacketFlags(
|
---|
3506 | * IN PNDIS_PACKET Packet,
|
---|
3507 | * IN UINT Flags);
|
---|
3508 | */
|
---|
3509 | #define NdisClearPacketFlags(Packet, Flags) (Packet)->Private.Flags &= ~(Flags)
|
---|
3510 |
|
---|
3511 | /*
|
---|
3512 | * VOID
|
---|
3513 | * NdisQueryPacket(
|
---|
3514 | * IN PNDIS_PACKET Packet,
|
---|
3515 | * OUT PUINT PhysicalBufferCount OPTIONAL,
|
---|
3516 | * OUT PUINT BufferCount OPTIONAL,
|
---|
3517 | * OUT PNDIS_BUFFER *FirstBuffer OPTIONAL,
|
---|
3518 | * OUT PUINT TotalPacketLength OPTIONAL);
|
---|
3519 | */
|
---|
3520 | static __inline
|
---|
3521 | VOID
|
---|
3522 | NdisQueryPacket(
|
---|
3523 | IN PNDIS_PACKET Packet,
|
---|
3524 | OUT PUINT PhysicalBufferCount OPTIONAL,
|
---|
3525 | OUT PUINT BufferCount OPTIONAL,
|
---|
3526 | OUT PNDIS_BUFFER *FirstBuffer OPTIONAL,
|
---|
3527 | OUT PUINT TotalPacketLength OPTIONAL)
|
---|
3528 | {
|
---|
3529 | if (FirstBuffer)
|
---|
3530 | *FirstBuffer = Packet->Private.Head;
|
---|
3531 | if (TotalPacketLength || BufferCount || PhysicalBufferCount) {
|
---|
3532 | if (!Packet->Private.ValidCounts) {
|
---|
3533 | UINT Offset;
|
---|
3534 | UINT PacketLength;
|
---|
3535 | PNDIS_BUFFER NdisBuffer;
|
---|
3536 | UINT PhysicalBufferCount = 0;
|
---|
3537 | UINT TotalPacketLength = 0;
|
---|
3538 | UINT Count = 0;
|
---|
3539 |
|
---|
3540 | for (NdisBuffer = Packet->Private.Head;
|
---|
3541 | NdisBuffer != (PNDIS_BUFFER)NULL;
|
---|
3542 | NdisBuffer = NdisBuffer->Next) {
|
---|
3543 | PhysicalBufferCount += NDIS_BUFFER_TO_SPAN_PAGES(NdisBuffer);
|
---|
3544 | NdisQueryBufferOffset(NdisBuffer, &Offset, &PacketLength);
|
---|
3545 | TotalPacketLength += PacketLength;
|
---|
3546 | Count++;
|
---|
3547 | }
|
---|
3548 | Packet->Private.PhysicalCount = PhysicalBufferCount;
|
---|
3549 | Packet->Private.TotalLength = TotalPacketLength;
|
---|
3550 | Packet->Private.Count = Count;
|
---|
3551 | Packet->Private.ValidCounts = TRUE;
|
---|
3552 | }
|
---|
3553 |
|
---|
3554 | if (PhysicalBufferCount)
|
---|
3555 | *PhysicalBufferCount = Packet->Private.PhysicalCount;
|
---|
3556 |
|
---|
3557 | if (BufferCount)
|
---|
3558 | *BufferCount = Packet->Private.Count;
|
---|
3559 |
|
---|
3560 | if (TotalPacketLength)
|
---|
3561 | *TotalPacketLength = Packet->Private.TotalLength;
|
---|
3562 | }
|
---|
3563 | }
|
---|
3564 |
|
---|
3565 | /*
|
---|
3566 | * VOID
|
---|
3567 | * NdisQueryPacketLength(
|
---|
3568 | * IN PNDIS_PACKET Packet,
|
---|
3569 | * OUT PUINT PhysicalBufferCount OPTIONAL,
|
---|
3570 | * OUT PUINT BufferCount OPTIONAL,
|
---|
3571 | * OUT PNDIS_BUFFER *FirstBuffer OPTIONAL,
|
---|
3572 | * OUT PUINT TotalPacketLength OPTIONAL);
|
---|
3573 | */
|
---|
3574 | #define NdisQueryPacketLength(_Packet, \
|
---|
3575 | _TotalPacketLength) \
|
---|
3576 | { \
|
---|
3577 | if (!(_Packet)->Private.ValidCounts) { \
|
---|
3578 | NdisQueryPacket(_Packet, NULL, NULL, NULL, _TotalPacketLength); \
|
---|
3579 | } \
|
---|
3580 | else *(_TotalPacketLength) = (_Packet)->Private.TotalLength; \
|
---|
3581 | }
|
---|
3582 |
|
---|
3583 | #endif /* NDIS_LEGACY_DRIVER */
|
---|
3584 |
|
---|
3585 | /* Memory management routines */
|
---|
3586 |
|
---|
3587 | /*
|
---|
3588 | NDISAPI
|
---|
3589 | VOID
|
---|
3590 | NTAPI
|
---|
3591 | NdisCreateLookaheadBufferFromSharedMemory(
|
---|
3592 | IN PVOID pSharedMemory,
|
---|
3593 | IN UINT LookaheadLength,
|
---|
3594 | OUT PVOID *pLookaheadBuffer);
|
---|
3595 | */
|
---|
3596 | #define NdisCreateLookaheadBufferFromSharedMemory(_S, _L, _B) ((*(_B)) = (_S))
|
---|
3597 |
|
---|
3598 | NDISAPI
|
---|
3599 | VOID
|
---|
3600 | NTAPI
|
---|
3601 | NdisDestroyLookaheadBufferFromSharedMemory(
|
---|
3602 | IN PVOID pLookaheadBuffer);
|
---|
3603 |
|
---|
3604 | #if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_ARM) || defined(_M_PPC)
|
---|
3605 |
|
---|
3606 | /*
|
---|
3607 | * VOID
|
---|
3608 | * NdisMoveMappedMemory(
|
---|
3609 | * OUT PVOID Destination,
|
---|
3610 | * IN PVOID Source,
|
---|
3611 | * IN ULONG Length);
|
---|
3612 | */
|
---|
3613 | #define NdisMoveMappedMemory(Destination, Source, Length) \
|
---|
3614 | RtlCopyMemory(Destination, Source, Length)
|
---|
3615 |
|
---|
3616 | /*
|
---|
3617 | * VOID
|
---|
3618 | * NdisZeroMappedMemory(
|
---|
3619 | * IN PVOID Destination,
|
---|
3620 | * IN ULONG Length);
|
---|
3621 | */
|
---|
3622 | #define NdisZeroMappedMemory(Destination, Length) \
|
---|
3623 | RtlZeroMemory(Destination, Length)
|
---|
3624 |
|
---|
3625 | #else
|
---|
3626 |
|
---|
3627 | #define NdisMoveMappedMemory(Destination, Source, Length) \
|
---|
3628 | { \
|
---|
3629 | PUCHAR _Dest = Destination, _Src = Source, _End = _Dest + Length; \
|
---|
3630 | while (_Dest < _End) \
|
---|
3631 | *_Dest++ = _Src++; \
|
---|
3632 | }
|
---|
3633 |
|
---|
3634 | #define NdisZeroMappedMemory(Destination, Length) \
|
---|
3635 | { \
|
---|
3636 | PUCHAR _Dest = Destination, _End = _Dest + Length; \
|
---|
3637 | while (_Dest < _End) \
|
---|
3638 | *_Dest++ = 0; \
|
---|
3639 | }
|
---|
3640 |
|
---|
3641 | #endif /* _M_IX86 or _M_AMD64 */
|
---|
3642 |
|
---|
3643 | /*
|
---|
3644 | * VOID
|
---|
3645 | * NdisMoveFromMappedMemory(
|
---|
3646 | * OUT PVOID Destination,
|
---|
3647 | * IN PVOID Source,
|
---|
3648 | * IN ULONG Length);
|
---|
3649 | */
|
---|
3650 | #define NdisMoveFromMappedMemory(Destination, Source, Length) \
|
---|
3651 | NdisMoveMappedMemory(Destination, Source, Length)
|
---|
3652 |
|
---|
3653 | /*
|
---|
3654 | * VOID
|
---|
3655 | * NdisMoveToMappedMemory(
|
---|
3656 | * OUT PVOID Destination,
|
---|
3657 | * IN PVOID Source,
|
---|
3658 | * IN ULONG Length);
|
---|
3659 | */
|
---|
3660 | #define NdisMoveToMappedMemory(Destination, Source, Length) \
|
---|
3661 | NdisMoveMappedMemory(Destination, Source, Length)
|
---|
3662 |
|
---|
3663 | /*
|
---|
3664 | * VOID
|
---|
3665 | * NdisMUpdateSharedMemory(
|
---|
3666 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
3667 | * IN ULONG Length,
|
---|
3668 | * IN PVOID VirtualAddress,
|
---|
3669 | * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
|
---|
3670 | */
|
---|
3671 | #define NdisMUpdateSharedMemory(_H, _L, _V, _P) \
|
---|
3672 | NdisUpdateSharedMemory(_H, _L, _V, _P)
|
---|
3673 |
|
---|
3674 | NDISAPI
|
---|
3675 | VOID
|
---|
3676 | NTAPI
|
---|
3677 | NdisFreeMemory(
|
---|
3678 | IN PVOID VirtualAddress,
|
---|
3679 | IN UINT Length,
|
---|
3680 | IN UINT MemoryFlags);
|
---|
3681 |
|
---|
3682 | NDISAPI
|
---|
3683 | VOID
|
---|
3684 | NTAPI
|
---|
3685 | NdisFreeMemoryWithTag(
|
---|
3686 | IN PVOID VirtualAddress,
|
---|
3687 | IN ULONG Tag);
|
---|
3688 |
|
---|
3689 | NDISAPI
|
---|
3690 | VOID
|
---|
3691 | NTAPI
|
---|
3692 | NdisImmediateReadSharedMemory(
|
---|
3693 | IN NDIS_HANDLE WrapperConfigurationContext,
|
---|
3694 | IN ULONG SharedMemoryAddress,
|
---|
3695 | OUT PUCHAR Buffer,
|
---|
3696 | IN ULONG Length);
|
---|
3697 |
|
---|
3698 | NDISAPI
|
---|
3699 | VOID
|
---|
3700 | NTAPI
|
---|
3701 | NdisImmediateWriteSharedMemory(
|
---|
3702 | IN NDIS_HANDLE WrapperConfigurationContext,
|
---|
3703 | IN ULONG SharedMemoryAddress,
|
---|
3704 | IN PUCHAR Buffer,
|
---|
3705 | IN ULONG Length);
|
---|
3706 |
|
---|
3707 | NDISAPI
|
---|
3708 | VOID
|
---|
3709 | NTAPI
|
---|
3710 | NdisMAllocateSharedMemory(
|
---|
3711 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
3712 | IN ULONG Length,
|
---|
3713 | IN BOOLEAN Cached,
|
---|
3714 | OUT PVOID *VirtualAddress,
|
---|
3715 | OUT PNDIS_PHYSICAL_ADDRESS PhysicalAddress);
|
---|
3716 |
|
---|
3717 | NDISAPI
|
---|
3718 | NDIS_STATUS
|
---|
3719 | NTAPI
|
---|
3720 | NdisMAllocateSharedMemoryAsync(
|
---|
3721 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
3722 | IN ULONG Length,
|
---|
3723 | IN BOOLEAN Cached,
|
---|
3724 | IN PVOID Context);
|
---|
3725 |
|
---|
3726 | #if defined(NDIS50)
|
---|
3727 |
|
---|
3728 | #define NdisUpdateSharedMemory(NdisAdapterHandle, \
|
---|
3729 | Length, \
|
---|
3730 | VirtualAddress, \
|
---|
3731 | PhysicalAddress)
|
---|
3732 |
|
---|
3733 | #else
|
---|
3734 |
|
---|
3735 | NDISAPI
|
---|
3736 | VOID
|
---|
3737 | NTAPI
|
---|
3738 | NdisUpdateSharedMemory(
|
---|
3739 | IN NDIS_HANDLE NdisAdapterHandle,
|
---|
3740 | IN ULONG Length,
|
---|
3741 | IN PVOID VirtualAddress,
|
---|
3742 | IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
|
---|
3743 |
|
---|
3744 | #endif /* defined(NDIS50) */
|
---|
3745 |
|
---|
3746 | /*
|
---|
3747 | * ULONG
|
---|
3748 | * NdisGetPhysicalAddressHigh(
|
---|
3749 | * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
|
---|
3750 | */
|
---|
3751 | #define NdisGetPhysicalAddressHigh(PhysicalAddress) \
|
---|
3752 | ((PhysicalAddress).HighPart)
|
---|
3753 |
|
---|
3754 | /*
|
---|
3755 | * VOID
|
---|
3756 | * NdisSetPhysicalAddressHigh(
|
---|
3757 | * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress,
|
---|
3758 | * IN ULONG Value);
|
---|
3759 | */
|
---|
3760 | #define NdisSetPhysicalAddressHigh(PhysicalAddress, Value) \
|
---|
3761 | ((PhysicalAddress).HighPart) = (Value)
|
---|
3762 |
|
---|
3763 | /*
|
---|
3764 | * ULONG
|
---|
3765 | * NdisGetPhysicalAddressLow(
|
---|
3766 | * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
|
---|
3767 | */
|
---|
3768 | #define NdisGetPhysicalAddressLow(PhysicalAddress) \
|
---|
3769 | ((PhysicalAddress).LowPart)
|
---|
3770 |
|
---|
3771 |
|
---|
3772 | /*
|
---|
3773 | * VOID
|
---|
3774 | * NdisSetPhysicalAddressLow(
|
---|
3775 | * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress,
|
---|
3776 | * IN ULONG Value);
|
---|
3777 | */
|
---|
3778 | #define NdisSetPhysicalAddressLow(PhysicalAddress, Value) \
|
---|
3779 | ((PhysicalAddress).LowPart) = (Value)
|
---|
3780 |
|
---|
3781 | /*
|
---|
3782 | * VOID
|
---|
3783 | * NDIS_PHYSICAL_ADDRESS_CONST(
|
---|
3784 | * IN ULONG Low,
|
---|
3785 | * IN LONG High);
|
---|
3786 | */
|
---|
3787 | #define NDIS_PHYSICAL_ADDRESS_CONST(Low, High) \
|
---|
3788 | { {(ULONG)(Low), (LONG)(High)} }
|
---|
3789 |
|
---|
3790 | /*
|
---|
3791 | * ULONG
|
---|
3792 | * NdisEqualMemory(
|
---|
3793 | * IN CONST VOID *Source1,
|
---|
3794 | * IN CONST VOID *Source2,
|
---|
3795 | * IN ULONG Length);
|
---|
3796 | */
|
---|
3797 | #define NdisEqualMemory(Source1, Source2, Length) \
|
---|
3798 | RtlEqualMemory(Source1, Source2, Length)
|
---|
3799 |
|
---|
3800 | /*
|
---|
3801 | * VOID
|
---|
3802 | * NdisFillMemory(
|
---|
3803 | * IN PVOID Destination,
|
---|
3804 | * IN ULONG Length,
|
---|
3805 | * IN UCHAR Fill);
|
---|
3806 | */
|
---|
3807 | #define NdisFillMemory(Destination, Length, Fill) \
|
---|
3808 | RtlFillMemory(Destination, Length, Fill)
|
---|
3809 |
|
---|
3810 | /*
|
---|
3811 | * VOID
|
---|
3812 | * NdisMoveMemory(
|
---|
3813 | * OUT PVOID Destination,
|
---|
3814 | * IN PVOID Source,
|
---|
3815 | * IN ULONG Length);
|
---|
3816 | */
|
---|
3817 | #define NdisMoveMemory(Destination, Source, Length) \
|
---|
3818 | RtlCopyMemory(Destination, Source, Length)
|
---|
3819 |
|
---|
3820 |
|
---|
3821 | /*
|
---|
3822 | * VOID
|
---|
3823 | * NdisRetrieveUlong(
|
---|
3824 | * IN PULONG DestinationAddress,
|
---|
3825 | * IN PULONG SourceAddress);
|
---|
3826 | */
|
---|
3827 | #define NdisRetrieveUlong(DestinationAddress, SourceAddress) \
|
---|
3828 | RtlRetrieveUlong(DestinationAddress, SourceAddress)
|
---|
3829 |
|
---|
3830 |
|
---|
3831 | /*
|
---|
3832 | * VOID
|
---|
3833 | * NdisStoreUlong(
|
---|
3834 | * IN PULONG DestinationAddress,
|
---|
3835 | * IN ULONG Value);
|
---|
3836 | */
|
---|
3837 | #define NdisStoreUlong(DestinationAddress, Value) \
|
---|
3838 | RtlStoreUlong(DestinationAddress, Value)
|
---|
3839 |
|
---|
3840 |
|
---|
3841 | /*
|
---|
3842 | * VOID
|
---|
3843 | * NdisZeroMemory(
|
---|
3844 | * IN PVOID Destination,
|
---|
3845 | * IN ULONG Length)
|
---|
3846 | */
|
---|
3847 | #define NdisZeroMemory(Destination, Length) \
|
---|
3848 | RtlZeroMemory(Destination, Length)
|
---|
3849 |
|
---|
3850 | typedef VOID
|
---|
3851 | (NTAPI *NDIS_BLOCK_INITIALIZER) (
|
---|
3852 | IN PUCHAR Block,
|
---|
3853 | IN SIZE_T NumberOfBytes
|
---|
3854 | );
|
---|
3855 |
|
---|
3856 | /* Configuration routines */
|
---|
3857 |
|
---|
3858 | #if NDIS_LEGACY_DRIVER
|
---|
3859 | NDISAPI
|
---|
3860 | VOID
|
---|
3861 | NTAPI
|
---|
3862 | NdisOpenConfiguration(
|
---|
3863 | OUT PNDIS_STATUS Status,
|
---|
3864 | OUT PNDIS_HANDLE ConfigurationHandle,
|
---|
3865 | IN NDIS_HANDLE WrapperConfigurationContext);
|
---|
3866 | #endif
|
---|
3867 |
|
---|
3868 | NDISAPI
|
---|
3869 | VOID
|
---|
3870 | NTAPI
|
---|
3871 | NdisReadNetworkAddress(
|
---|
3872 | OUT PNDIS_STATUS Status,
|
---|
3873 | OUT PVOID *NetworkAddress,
|
---|
3874 | OUT PUINT NetworkAddressLength,
|
---|
3875 | IN NDIS_HANDLE ConfigurationHandle);
|
---|
3876 |
|
---|
3877 | NDISAPI
|
---|
3878 | VOID
|
---|
3879 | NTAPI
|
---|
3880 | NdisReadEisaSlotInformation(
|
---|
3881 | OUT PNDIS_STATUS Status,
|
---|
3882 | IN NDIS_HANDLE WrapperConfigurationContext,
|
---|
3883 | OUT PUINT SlotNumber,
|
---|
3884 | OUT PNDIS_EISA_FUNCTION_INFORMATION EisaData);
|
---|
3885 |
|
---|
3886 | NDISAPI
|
---|
3887 | VOID
|
---|
3888 | NTAPI
|
---|
3889 | NdisReadEisaSlotInformationEx(
|
---|
3890 | OUT PNDIS_STATUS Status,
|
---|
3891 | IN NDIS_HANDLE WrapperConfigurationContext,
|
---|
3892 | OUT PUINT SlotNumber,
|
---|
3893 | OUT PNDIS_EISA_FUNCTION_INFORMATION *EisaData,
|
---|
3894 | OUT PUINT NumberOfFunctions);
|
---|
3895 |
|
---|
3896 | #if NDIS_LEGACY_MINIPORT
|
---|
3897 |
|
---|
3898 | NDISAPI
|
---|
3899 | ULONG
|
---|
3900 | NTAPI
|
---|
3901 | NdisReadPciSlotInformation(
|
---|
3902 | IN NDIS_HANDLE NdisAdapterHandle,
|
---|
3903 | IN ULONG SlotNumber,
|
---|
3904 | IN ULONG Offset,
|
---|
3905 | OUT PVOID Buffer,
|
---|
3906 | IN ULONG Length);
|
---|
3907 |
|
---|
3908 | NDISAPI
|
---|
3909 | ULONG
|
---|
3910 | NTAPI
|
---|
3911 | NdisWritePciSlotInformation(
|
---|
3912 | IN NDIS_HANDLE NdisAdapterHandle,
|
---|
3913 | IN ULONG SlotNumber,
|
---|
3914 | IN ULONG Offset,
|
---|
3915 | IN PVOID Buffer,
|
---|
3916 | IN ULONG Length);
|
---|
3917 |
|
---|
3918 | NDISAPI
|
---|
3919 | ULONG
|
---|
3920 | NTAPI
|
---|
3921 | NdisReadPcmciaAttributeMemory(
|
---|
3922 | IN NDIS_HANDLE NdisAdapterHandle,
|
---|
3923 | IN ULONG Offset,
|
---|
3924 | OUT PVOID Buffer,
|
---|
3925 | IN ULONG Length);
|
---|
3926 |
|
---|
3927 | NDISAPI
|
---|
3928 | ULONG
|
---|
3929 | NTAPI
|
---|
3930 | NdisWritePcmciaAttributeMemory(
|
---|
3931 | IN NDIS_HANDLE NdisAdapterHandle,
|
---|
3932 | IN ULONG Offset,
|
---|
3933 | IN PVOID Buffer,
|
---|
3934 | IN ULONG Length);
|
---|
3935 |
|
---|
3936 | #endif /* NDIS_LEGACY_MINIPORT */
|
---|
3937 |
|
---|
3938 | /* String management routines */
|
---|
3939 |
|
---|
3940 | /*
|
---|
3941 | NDISAPI
|
---|
3942 | NDIS_STATUS
|
---|
3943 | NTAPI
|
---|
3944 | NdisAnsiStringToUnicodeString(
|
---|
3945 | IN OUT PNDIS_STRING DestinationString,
|
---|
3946 | IN PNDIS_ANSI_STRING SourceString);
|
---|
3947 | */
|
---|
3948 | #define NdisAnsiStringToUnicodeString(_us, _as) RtlAnsiStringToUnicodeString(_us, _as, FALSE)
|
---|
3949 |
|
---|
3950 | /*
|
---|
3951 | * BOOLEAN
|
---|
3952 | * NdisEqualString(
|
---|
3953 | * IN PNDIS_STRING String1,
|
---|
3954 | * IN PNDIS_STRING String2,
|
---|
3955 | * IN BOOLEAN CaseInsensitive);
|
---|
3956 | */
|
---|
3957 | #define NdisEqualString RtlEqualString
|
---|
3958 |
|
---|
3959 | #define NdisEqualUnicodeString RtlEqualUnicodeString
|
---|
3960 |
|
---|
3961 | /*
|
---|
3962 | NDISAPI
|
---|
3963 | VOID
|
---|
3964 | NTAPI
|
---|
3965 | NdisInitAnsiString(
|
---|
3966 | IN OUT PNDIS_ANSI_STRING DestinationString,
|
---|
3967 | IN PCSTR SourceString);
|
---|
3968 | */
|
---|
3969 | #define NdisInitAnsiString RtlInitString
|
---|
3970 |
|
---|
3971 | NDISAPI
|
---|
3972 | VOID
|
---|
3973 | NTAPI
|
---|
3974 | NdisInitUnicodeString(
|
---|
3975 | IN OUT PNDIS_STRING DestinationString,
|
---|
3976 | IN PCWSTR SourceString);
|
---|
3977 |
|
---|
3978 | /*
|
---|
3979 | NDISAPI
|
---|
3980 | NDIS_STATUS
|
---|
3981 | NTAPI
|
---|
3982 | NdisUnicodeStringToAnsiString(
|
---|
3983 | IN OUT PNDIS_ANSI_STRING DestinationString,
|
---|
3984 | IN PNDIS_STRING SourceString);
|
---|
3985 | */
|
---|
3986 | #define NdisUnicodeStringToAnsiString(_as, _us) RtlUnicodeStringToAnsiString(_as, _us, FALSE)
|
---|
3987 |
|
---|
3988 | #define NdisFreeString(_s) NdisFreeMemory((_s).Buffer, (_s).MaximumLength, 0)
|
---|
3989 | #define NdisPrintString(_s) DbgPrint("%ls", (_s).Buffer)
|
---|
3990 |
|
---|
3991 | /* Spin lock reoutines */
|
---|
3992 |
|
---|
3993 | /*
|
---|
3994 | NDISAPI
|
---|
3995 | VOID
|
---|
3996 | NTAPI
|
---|
3997 | NdisAllocateSpinLock(
|
---|
3998 | IN PNDIS_SPIN_LOCK SpinLock);
|
---|
3999 | */
|
---|
4000 | #define NdisAllocateSpinLock(_SpinLock) KeInitializeSpinLock(&(_SpinLock)->SpinLock)
|
---|
4001 |
|
---|
4002 | /*
|
---|
4003 | NDISAPI
|
---|
4004 | VOID
|
---|
4005 | NTAPI
|
---|
4006 | NdisFreeSpinLock(
|
---|
4007 | IN PNDIS_SPIN_LOCK SpinLock);
|
---|
4008 | */
|
---|
4009 | #define NdisFreeSpinLock(_SpinLock)
|
---|
4010 |
|
---|
4011 | /*
|
---|
4012 | NDISAPI
|
---|
4013 | VOID
|
---|
4014 | NTAPI
|
---|
4015 | NdisAcquireSpinLock(
|
---|
4016 | IN PNDIS_SPIN_LOCK SpinLock);
|
---|
4017 | */
|
---|
4018 | #define NdisAcquireSpinLock(_SpinLock) KeAcquireSpinLock(&(_SpinLock)->SpinLock, &(_SpinLock)->OldIrql)
|
---|
4019 |
|
---|
4020 | /*
|
---|
4021 | NDISAPI
|
---|
4022 | VOID
|
---|
4023 | NTAPI
|
---|
4024 | NdisReleaseSpinLock(
|
---|
4025 | IN PNDIS_SPIN_LOCK SpinLock);
|
---|
4026 | */
|
---|
4027 | #define NdisReleaseSpinLock(_SpinLock) KeReleaseSpinLock(&(_SpinLock)->SpinLock,(_SpinLock)->OldIrql)
|
---|
4028 |
|
---|
4029 | /*
|
---|
4030 | NDISAPI
|
---|
4031 | VOID
|
---|
4032 | NTAPI
|
---|
4033 | NdisDprAcquireSpinLock(
|
---|
4034 | IN PNDIS_SPIN_LOCK SpinLock);
|
---|
4035 | */
|
---|
4036 | #define NdisDprAcquireSpinLock(_SpinLock) KeAcquireSpinLockAtDpcLevel(&(_SpinLock)->SpinLock)
|
---|
4037 |
|
---|
4038 | /*
|
---|
4039 | NDISAPI
|
---|
4040 | VOID
|
---|
4041 | NTAPI
|
---|
4042 | NdisDprReleaseSpinLock(
|
---|
4043 | IN PNDIS_SPIN_LOCK SpinLock);
|
---|
4044 | */
|
---|
4045 | #define NdisDprReleaseSpinLock(_SpinLock) KeReleaseSpinLockFromDpcLevel(&(_SpinLock)->SpinLock)
|
---|
4046 |
|
---|
4047 | /* I/O routines */
|
---|
4048 |
|
---|
4049 | /*
|
---|
4050 | * VOID
|
---|
4051 | * NdisRawReadPortBufferUchar(
|
---|
4052 | * IN ULONG Port,
|
---|
4053 | * OUT PUCHAR Buffer,
|
---|
4054 | * IN ULONG Length);
|
---|
4055 | */
|
---|
4056 | #define NdisRawReadPortBufferUchar(Port, Buffer, Length) \
|
---|
4057 | READ_PORT_BUFFER_UCHAR((PUCHAR)(Port), (PUCHAR)(Buffer), (Length))
|
---|
4058 |
|
---|
4059 | /*
|
---|
4060 | * VOID
|
---|
4061 | * NdisRawReadPortBufferUlong(
|
---|
4062 | * IN ULONG Port,
|
---|
4063 | * OUT PULONG Buffer,
|
---|
4064 | * IN ULONG Length);
|
---|
4065 | */
|
---|
4066 | #define NdisRawReadPortBufferUlong(Port, Buffer, Length) \
|
---|
4067 | READ_PORT_BUFFER_ULONG((PULONG)(Port), (PULONG)(Buffer), (Length))
|
---|
4068 |
|
---|
4069 | /*
|
---|
4070 | * VOID
|
---|
4071 | * NdisRawReadPortBufferUshort(
|
---|
4072 | * IN ULONG Port,
|
---|
4073 | * OUT PUSHORT Buffer,
|
---|
4074 | * IN ULONG Length);
|
---|
4075 | */
|
---|
4076 | #define NdisRawReadPortBufferUshort(Port, Buffer, Length) \
|
---|
4077 | READ_PORT_BUFFER_USHORT((PUSHORT)(Port), (PUSHORT)(Buffer), (Length))
|
---|
4078 |
|
---|
4079 | /*
|
---|
4080 | * VOID
|
---|
4081 | * NdisRawReadPortUchar(
|
---|
4082 | * IN ULONG Port,
|
---|
4083 | * OUT PUCHAR Data);
|
---|
4084 | */
|
---|
4085 | #define NdisRawReadPortUchar(Port, Data) \
|
---|
4086 | *(Data) = READ_PORT_UCHAR((PUCHAR)(Port))
|
---|
4087 |
|
---|
4088 | /*
|
---|
4089 | * VOID
|
---|
4090 | * NdisRawReadPortUlong(
|
---|
4091 | * IN ULONG Port,
|
---|
4092 | * OUT PULONG Data);
|
---|
4093 | */
|
---|
4094 | #define NdisRawReadPortUlong(Port, Data) \
|
---|
4095 | *(Data) = READ_PORT_ULONG((PULONG)(Port))
|
---|
4096 |
|
---|
4097 | /*
|
---|
4098 | * VOID
|
---|
4099 | * NdisRawReadPortUshort(
|
---|
4100 | * IN ULONG Port,
|
---|
4101 | * OUT PUSHORT Data);
|
---|
4102 | */
|
---|
4103 | #define NdisRawReadPortUshort(Port, Data) \
|
---|
4104 | *(Data) = READ_PORT_USHORT((PUSHORT)(Port))
|
---|
4105 |
|
---|
4106 | /*
|
---|
4107 | * VOID
|
---|
4108 | * NdisRawWritePortBufferUchar(
|
---|
4109 | * IN ULONG Port,
|
---|
4110 | * IN PUCHAR Buffer,
|
---|
4111 | * IN ULONG Length);
|
---|
4112 | */
|
---|
4113 | #define NdisRawWritePortBufferUchar(Port, Buffer, Length) \
|
---|
4114 | WRITE_PORT_BUFFER_UCHAR((PUCHAR)(Port), (PUCHAR)(Buffer), (Length))
|
---|
4115 |
|
---|
4116 | /*
|
---|
4117 | * VOID
|
---|
4118 | * NdisRawWritePortBufferUlong(
|
---|
4119 | * IN ULONG Port,
|
---|
4120 | * IN PULONG Buffer,
|
---|
4121 | * IN ULONG Length);
|
---|
4122 | */
|
---|
4123 | #define NdisRawWritePortBufferUlong(Port, Buffer, Length) \
|
---|
4124 | WRITE_PORT_BUFFER_ULONG((PULONG)(Port), (PULONG)(Buffer), (Length))
|
---|
4125 |
|
---|
4126 | /*
|
---|
4127 | * VOID
|
---|
4128 | * NdisRawWritePortBufferUshort(
|
---|
4129 | * IN ULONG Port,
|
---|
4130 | * IN PUSHORT Buffer,
|
---|
4131 | * IN ULONG Length);
|
---|
4132 | */
|
---|
4133 | #define NdisRawWritePortBufferUshort(Port, Buffer, Length) \
|
---|
4134 | WRITE_PORT_BUFFER_USHORT((PUSHORT)(Port), (PUSHORT)(Buffer), (Length))
|
---|
4135 |
|
---|
4136 | /*
|
---|
4137 | * VOID
|
---|
4138 | * NdisRawWritePortUchar(
|
---|
4139 | * IN ULONG Port,
|
---|
4140 | * IN UCHAR Data);
|
---|
4141 | */
|
---|
4142 | #define NdisRawWritePortUchar(Port, Data) \
|
---|
4143 | WRITE_PORT_UCHAR((PUCHAR)(Port), (UCHAR)(Data))
|
---|
4144 |
|
---|
4145 | /*
|
---|
4146 | * VOID
|
---|
4147 | * NdisRawWritePortUlong(
|
---|
4148 | * IN ULONG Port,
|
---|
4149 | * IN ULONG Data);
|
---|
4150 | */
|
---|
4151 | #define NdisRawWritePortUlong(Port, Data) \
|
---|
4152 | WRITE_PORT_ULONG((PULONG)(Port), (ULONG)(Data))
|
---|
4153 |
|
---|
4154 | /*
|
---|
4155 | * VOID
|
---|
4156 | * NdisRawWritePortUshort(
|
---|
4157 | * IN ULONG Port,
|
---|
4158 | * IN USHORT Data);
|
---|
4159 | */
|
---|
4160 | #define NdisRawWritePortUshort(Port, Data) \
|
---|
4161 | WRITE_PORT_USHORT((PUSHORT)(Port), (USHORT)(Data))
|
---|
4162 |
|
---|
4163 |
|
---|
4164 | /*
|
---|
4165 | * VOID
|
---|
4166 | * NdisReadRegisterUchar(
|
---|
4167 | * IN PUCHAR Register,
|
---|
4168 | * OUT PUCHAR Data);
|
---|
4169 | */
|
---|
4170 | #define NdisReadRegisterUchar(Register, Data) \
|
---|
4171 | *(Data) = *(Register)
|
---|
4172 |
|
---|
4173 | /*
|
---|
4174 | * VOID
|
---|
4175 | * NdisReadRegisterUlong(
|
---|
4176 | * IN PULONG Register,
|
---|
4177 | * OUT PULONG Data);
|
---|
4178 | */
|
---|
4179 | #define NdisReadRegisterUlong(Register, Data) \
|
---|
4180 | *(Data) = *(Register)
|
---|
4181 |
|
---|
4182 | /*
|
---|
4183 | * VOID
|
---|
4184 | * NdisReadRegisterUshort(
|
---|
4185 | * IN PUSHORT Register,
|
---|
4186 | * OUT PUSHORT Data);
|
---|
4187 | */
|
---|
4188 | #define NdisReadRegisterUshort(Register, Data) \
|
---|
4189 | *(Data) = *(Register)
|
---|
4190 |
|
---|
4191 | /*
|
---|
4192 | * VOID
|
---|
4193 | * NdisReadRegisterUchar(
|
---|
4194 | * IN PUCHAR Register,
|
---|
4195 | * IN UCHAR Data);
|
---|
4196 | */
|
---|
4197 | #define NdisWriteRegisterUchar(Register, Data) \
|
---|
4198 | WRITE_REGISTER_UCHAR((Register), (Data))
|
---|
4199 |
|
---|
4200 | /*
|
---|
4201 | * VOID
|
---|
4202 | * NdisReadRegisterUlong(
|
---|
4203 | * IN PULONG Register,
|
---|
4204 | * IN ULONG Data);
|
---|
4205 | */
|
---|
4206 | #define NdisWriteRegisterUlong(Register, Data) \
|
---|
4207 | WRITE_REGISTER_ULONG((Register), (Data))
|
---|
4208 |
|
---|
4209 | /*
|
---|
4210 | * VOID
|
---|
4211 | * NdisReadRegisterUshort(
|
---|
4212 | * IN PUSHORT Register,
|
---|
4213 | * IN USHORT Data);
|
---|
4214 | */
|
---|
4215 | #define NdisWriteRegisterUshort(Register, Data) \
|
---|
4216 | WRITE_REGISTER_USHORT((Register), (Data))
|
---|
4217 |
|
---|
4218 |
|
---|
4219 | /* Linked lists */
|
---|
4220 |
|
---|
4221 | /*
|
---|
4222 | * VOID
|
---|
4223 | * NdisInitializeListHead(
|
---|
4224 | * IN PLIST_ENTRY ListHead);
|
---|
4225 | */
|
---|
4226 | #define NdisInitializeListHead InitializeListHead
|
---|
4227 |
|
---|
4228 | /*
|
---|
4229 | * PLIST_ENTRY
|
---|
4230 | * NdisInterlockedInsertHeadList(
|
---|
4231 | * IN PLIST_ENTRY ListHead,
|
---|
4232 | * IN PLIST_ENTRY ListEntry,
|
---|
4233 | * IN PNDIS_SPIN_LOCK SpinLock);
|
---|
4234 | */
|
---|
4235 | #define NdisInterlockedInsertHeadList(_ListHead, _ListEntry, _SpinLock) \
|
---|
4236 | ExInterlockedInsertHeadList(_ListHead, _ListEntry, &(_SpinLock)->SpinLock)
|
---|
4237 |
|
---|
4238 | /*
|
---|
4239 | * PLIST_ENTRY
|
---|
4240 | * NdisInterlockedInsertTailList(
|
---|
4241 | * IN PLIST_ENTRY ListHead,
|
---|
4242 | * IN PLIST_ENTRY ListEntry,
|
---|
4243 | * IN PNDIS_SPIN_LOCK SpinLock);
|
---|
4244 | */
|
---|
4245 | #define NdisInterlockedInsertTailList(_ListHead, _ListEntry, _SpinLock) \
|
---|
4246 | ExInterlockedInsertTailList(_ListHead, _ListEntry, &(_SpinLock)->SpinLock)
|
---|
4247 |
|
---|
4248 | /*
|
---|
4249 | * PLIST_ENTRY
|
---|
4250 | * NdisInterlockedRemoveHeadList(
|
---|
4251 | * IN PLIST_ENTRY ListHead,
|
---|
4252 | * IN PNDIS_SPIN_LOCK SpinLock);
|
---|
4253 | */
|
---|
4254 | #define NdisInterlockedRemoveHeadList(_ListHead, _SpinLock) \
|
---|
4255 | ExInterlockedRemoveHeadList(_ListHead, &(_SpinLock)->SpinLock)
|
---|
4256 |
|
---|
4257 | /*
|
---|
4258 | * VOID
|
---|
4259 | * NdisInitializeSListHead(
|
---|
4260 | * IN PSLIST_HEADER SListHead);
|
---|
4261 | */
|
---|
4262 | #define NdisInitializeSListHead(SListHead) ExInitializeSListHead(SListHead)
|
---|
4263 |
|
---|
4264 | /*
|
---|
4265 | * USHORT NdisQueryDepthSList(
|
---|
4266 | * IN PSLIST_HEADER SListHead);
|
---|
4267 | */
|
---|
4268 | #define NdisQueryDepthSList(SListHead) ExQueryDepthSList(SListHead)
|
---|
4269 |
|
---|
4270 | #define NdisInterlockedPushEntryList(ListHead, ListEntry, Lock) \
|
---|
4271 | ExInterlockedPushEntryList(ListHead, ListEntry, &(Lock)->SpinLock)
|
---|
4272 |
|
---|
4273 | #define NdisInterlockedPopEntryList(ListHead, Lock) \
|
---|
4274 | ExInterlockedPopEntryList(ListHead, &(Lock)->SpinLock)
|
---|
4275 |
|
---|
4276 | /* Non-paged lookaside lists */
|
---|
4277 |
|
---|
4278 | #define NdisInitializeNPagedLookasideList(_L, _AR, _FR, _Fl, _S, _T, _D) \
|
---|
4279 | ExInitializeNPagedLookasideList(_L, _AR, _FR, _Fl, _S, _T, _D)
|
---|
4280 | #define NdisDeleteNPagedLookasideList(_L) ExDeleteNPagedLookasideList(_L)
|
---|
4281 | #define NdisAllocateFromNPagedLookasideList(_L) ExAllocateFromNPagedLookasideList(_L)
|
---|
4282 | #define NdisFreeToNPagedLookasideList(_L, _E) ExFreeToNPagedLookasideList(_L, _E)
|
---|
4283 |
|
---|
4284 | /* Interlocked routines */
|
---|
4285 |
|
---|
4286 | /*
|
---|
4287 | * LONG
|
---|
4288 | * NdisInterlockedDecrement(
|
---|
4289 | * IN PLONG Addend);
|
---|
4290 | */
|
---|
4291 | #define NdisInterlockedDecrement(Addend) InterlockedDecrement(Addend)
|
---|
4292 |
|
---|
4293 | /*
|
---|
4294 | * LONG
|
---|
4295 | * NdisInterlockedIncrement(
|
---|
4296 | * IN PLONG Addend);
|
---|
4297 | */
|
---|
4298 | #define NdisInterlockedIncrement(Addend) InterlockedIncrement(Addend)
|
---|
4299 |
|
---|
4300 | /*
|
---|
4301 | * VOID
|
---|
4302 | * NdisInterlockedAddUlong(
|
---|
4303 | * IN PULONG Addend,
|
---|
4304 | * IN ULONG Increment,
|
---|
4305 | * IN PNDIS_SPIN_LOCK SpinLock);
|
---|
4306 | */
|
---|
4307 | #define NdisInterlockedAddUlong(_Addend, _Increment, _SpinLock) \
|
---|
4308 | ExInterlockedAddUlong(_Addend, _Increment, &(_SpinLock)->SpinLock)
|
---|
4309 |
|
---|
4310 | /* Miscellaneous routines */
|
---|
4311 |
|
---|
4312 | NDISAPI
|
---|
4313 | VOID
|
---|
4314 | NTAPI
|
---|
4315 | NdisCloseConfiguration(
|
---|
4316 | IN NDIS_HANDLE ConfigurationHandle);
|
---|
4317 |
|
---|
4318 | NDISAPI
|
---|
4319 | VOID
|
---|
4320 | NTAPI
|
---|
4321 | NdisReadConfiguration(
|
---|
4322 | OUT PNDIS_STATUS Status,
|
---|
4323 | OUT PNDIS_CONFIGURATION_PARAMETER *ParameterValue,
|
---|
4324 | IN NDIS_HANDLE ConfigurationHandle,
|
---|
4325 | IN PNDIS_STRING Keyword,
|
---|
4326 | IN NDIS_PARAMETER_TYPE ParameterType);
|
---|
4327 |
|
---|
4328 | NDISAPI
|
---|
4329 | VOID
|
---|
4330 | NTAPI
|
---|
4331 | NdisWriteConfiguration(
|
---|
4332 | OUT PNDIS_STATUS Status,
|
---|
4333 | IN NDIS_HANDLE WrapperConfigurationContext,
|
---|
4334 | IN PNDIS_STRING Keyword,
|
---|
4335 | IN PNDIS_CONFIGURATION_PARAMETER ParameterValue);
|
---|
4336 |
|
---|
4337 | NDISAPI
|
---|
4338 | VOID
|
---|
4339 | __cdecl
|
---|
4340 | NdisWriteErrorLogEntry(
|
---|
4341 | IN NDIS_HANDLE NdisAdapterHandle,
|
---|
4342 | IN NDIS_ERROR_CODE ErrorCode,
|
---|
4343 | IN ULONG NumberOfErrorValues,
|
---|
4344 | IN ...);
|
---|
4345 |
|
---|
4346 | NDISAPI
|
---|
4347 | VOID
|
---|
4348 | NTAPI
|
---|
4349 | NdisInitializeString(
|
---|
4350 | OUT PNDIS_STRING Destination,
|
---|
4351 | IN PUCHAR Source);
|
---|
4352 |
|
---|
4353 | /*
|
---|
4354 | * VOID
|
---|
4355 | * NdisStallExecution(
|
---|
4356 | * IN UINT MicrosecondsToStall)
|
---|
4357 | */
|
---|
4358 | #define NdisStallExecution KeStallExecutionProcessor
|
---|
4359 |
|
---|
4360 | /*
|
---|
4361 | NDISAPI
|
---|
4362 | VOID
|
---|
4363 | NTAPI
|
---|
4364 | NdisGetCurrentSystemTime(
|
---|
4365 | IN PLARGE_INTEGER pSystemTime);
|
---|
4366 | */
|
---|
4367 | #define NdisGetCurrentSystemTime KeQuerySystemTime
|
---|
4368 |
|
---|
4369 | #if NDIS_SUPPORT_60_COMPATIBLE_API
|
---|
4370 | NDISAPI
|
---|
4371 | CCHAR
|
---|
4372 | NTAPI
|
---|
4373 | NdisSystemProcessorCount(VOID);
|
---|
4374 | #endif
|
---|
4375 |
|
---|
4376 | NDISAPI
|
---|
4377 | VOID
|
---|
4378 | NTAPI
|
---|
4379 | NdisGetCurrentProcessorCpuUsage(
|
---|
4380 | OUT PULONG pCpuUsage);
|
---|
4381 |
|
---|
4382 | /* NDIS helper macros */
|
---|
4383 |
|
---|
4384 | /*
|
---|
4385 | * VOID
|
---|
4386 | * NDIS_INIT_FUNCTION(FunctionName)
|
---|
4387 | */
|
---|
4388 | #define NDIS_INIT_FUNCTION(FunctionName) \
|
---|
4389 | alloc_text(init, FunctionName)
|
---|
4390 |
|
---|
4391 | /*
|
---|
4392 | * VOID
|
---|
4393 | * NDIS_PAGABLE_FUNCTION(FunctionName)
|
---|
4394 | */
|
---|
4395 | #define NDIS_PAGEABLE_FUNCTION(FunctionName) \
|
---|
4396 | alloc_text(page, FunctionName)
|
---|
4397 |
|
---|
4398 | #define NDIS_PAGABLE_FUNCTION NDIS_PAGEABLE_FUNCTION
|
---|
4399 |
|
---|
4400 |
|
---|
4401 | /* NDIS 4.0 extensions */
|
---|
4402 |
|
---|
4403 | NDISAPI
|
---|
4404 | VOID
|
---|
4405 | NTAPI
|
---|
4406 | NdisMFreeSharedMemory(
|
---|
4407 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
4408 | IN ULONG Length,
|
---|
4409 | IN BOOLEAN Cached,
|
---|
4410 | IN PVOID VirtualAddress,
|
---|
4411 | IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
|
---|
4412 |
|
---|
4413 | NDISAPI
|
---|
4414 | VOID
|
---|
4415 | NTAPI
|
---|
4416 | NdisMWanIndicateReceive(
|
---|
4417 | OUT PNDIS_STATUS Status,
|
---|
4418 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
4419 | IN NDIS_HANDLE NdisLinkContext,
|
---|
4420 | IN PUCHAR PacketBuffer,
|
---|
4421 | IN UINT PacketSize);
|
---|
4422 |
|
---|
4423 | NDISAPI
|
---|
4424 | VOID
|
---|
4425 | NTAPI
|
---|
4426 | NdisMWanIndicateReceiveComplete(
|
---|
4427 | IN NDIS_HANDLE MiniportAdapterHandle
|
---|
4428 | IN NDIS_HANDLE NdisLinkContext);
|
---|
4429 |
|
---|
4430 | NDISAPI
|
---|
4431 | VOID
|
---|
4432 | NTAPI
|
---|
4433 | NdisMWanSendComplete(
|
---|
4434 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
4435 | IN PNDIS_WAN_PACKET Packet,
|
---|
4436 | IN NDIS_STATUS Status);
|
---|
4437 |
|
---|
4438 | NDISAPI
|
---|
4439 | NDIS_STATUS
|
---|
4440 | NTAPI
|
---|
4441 | NdisPciAssignResources(
|
---|
4442 | IN NDIS_HANDLE NdisMacHandle,
|
---|
4443 | IN NDIS_HANDLE NdisWrapperHandle,
|
---|
4444 | IN NDIS_HANDLE WrapperConfigurationContext,
|
---|
4445 | IN ULONG SlotNumber,
|
---|
4446 | OUT PNDIS_RESOURCE_LIST *AssignedResources);
|
---|
4447 |
|
---|
4448 |
|
---|
4449 | /* NDIS 5.0 extensions */
|
---|
4450 |
|
---|
4451 | NDISAPI
|
---|
4452 | NDIS_STATUS
|
---|
4453 | NTAPI
|
---|
4454 | NdisAllocateMemoryWithTag(
|
---|
4455 | OUT PVOID *VirtualAddress,
|
---|
4456 | IN UINT Length,
|
---|
4457 | IN ULONG Tag);
|
---|
4458 |
|
---|
4459 | NDISAPI
|
---|
4460 | VOID
|
---|
4461 | NTAPI
|
---|
4462 | NdisGetCurrentProcessorCounts(
|
---|
4463 | OUT PULONG pIdleCount,
|
---|
4464 | OUT PULONG pKernelAndUser,
|
---|
4465 | OUT PULONG pIndex);
|
---|
4466 |
|
---|
4467 | #if NDIS_LEGACY_DRIVER
|
---|
4468 | NDISAPI
|
---|
4469 | VOID
|
---|
4470 | NTAPI
|
---|
4471 | NdisGetSystemUpTime(
|
---|
4472 | OUT PULONG pSystemUpTime);
|
---|
4473 | #endif
|
---|
4474 |
|
---|
4475 | #if NDIS_SUPPORT_60_COMPATIBLE_API
|
---|
4476 |
|
---|
4477 | NDISAPI
|
---|
4478 | VOID
|
---|
4479 | NTAPI
|
---|
4480 | NdisAcquireReadWriteLock(
|
---|
4481 | IN OUT PNDIS_RW_LOCK Lock,
|
---|
4482 | IN BOOLEAN fWrite,
|
---|
4483 | OUT PLOCK_STATE LockState);
|
---|
4484 |
|
---|
4485 | NDISAPI
|
---|
4486 | VOID
|
---|
4487 | NTAPI
|
---|
4488 | NdisInitializeReadWriteLock(
|
---|
4489 | OUT PNDIS_RW_LOCK Lock);
|
---|
4490 |
|
---|
4491 | NDISAPI
|
---|
4492 | VOID
|
---|
4493 | NTAPI
|
---|
4494 | NdisReleaseReadWriteLock(
|
---|
4495 | IN OUT PNDIS_RW_LOCK Lock,
|
---|
4496 | IN PLOCK_STATE LockState);
|
---|
4497 |
|
---|
4498 | #if NDIS_SUPPORT_NDIS6
|
---|
4499 |
|
---|
4500 | NDISAPI
|
---|
4501 | VOID
|
---|
4502 | NTAPI
|
---|
4503 | NdisDprAcquireReadWriteLock(
|
---|
4504 | IN PNDIS_RW_LOCK Lock,
|
---|
4505 | IN BOOLEAN fWrite,
|
---|
4506 | IN PLOCK_STATE LockState);
|
---|
4507 |
|
---|
4508 | NDISAPI
|
---|
4509 | VOID
|
---|
4510 | NTAPI
|
---|
4511 | NdisDprReleaseReadWriteLock(
|
---|
4512 | IN PNDIS_RW_LOCK Lock,
|
---|
4513 | IN PLOCK_STATE LockState);
|
---|
4514 |
|
---|
4515 | #endif /* NDIS_SUPPORT_NDIS6 */
|
---|
4516 |
|
---|
4517 | #endif /* NDIS_SUPPORT_60_COMPATIBLE_API */
|
---|
4518 |
|
---|
4519 | NDISAPI
|
---|
4520 | NDIS_STATUS
|
---|
4521 | NTAPI
|
---|
4522 | NdisMDeregisterDevice(
|
---|
4523 | IN NDIS_HANDLE NdisDeviceHandle);
|
---|
4524 |
|
---|
4525 | NDISAPI
|
---|
4526 | VOID
|
---|
4527 | NTAPI
|
---|
4528 | NdisMGetDeviceProperty(
|
---|
4529 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
4530 | IN OUT PDEVICE_OBJECT *PhysicalDeviceObject OPTIONAL,
|
---|
4531 | IN OUT PDEVICE_OBJECT *FunctionalDeviceObject OPTIONAL,
|
---|
4532 | IN OUT PDEVICE_OBJECT *NextDeviceObject OPTIONAL,
|
---|
4533 | IN OUT PCM_RESOURCE_LIST *AllocatedResources OPTIONAL,
|
---|
4534 | IN OUT PCM_RESOURCE_LIST *AllocatedResourcesTranslated OPTIONAL);
|
---|
4535 |
|
---|
4536 | NDISAPI
|
---|
4537 | NDIS_STATUS
|
---|
4538 | NTAPI
|
---|
4539 | NdisMInitializeScatterGatherDma(
|
---|
4540 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
4541 | IN BOOLEAN Dma64BitAddresses,
|
---|
4542 | IN ULONG MaximumPhysicalMapping);
|
---|
4543 |
|
---|
4544 | NDISAPI
|
---|
4545 | NDIS_STATUS
|
---|
4546 | NTAPI
|
---|
4547 | NdisMPromoteMiniport(
|
---|
4548 | IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
4549 |
|
---|
4550 | NDISAPI
|
---|
4551 | NDIS_STATUS
|
---|
4552 | NTAPI
|
---|
4553 | NdisMQueryAdapterInstanceName(
|
---|
4554 | OUT PNDIS_STRING AdapterInstanceName,
|
---|
4555 | IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
4556 |
|
---|
4557 | NDISAPI
|
---|
4558 | NDIS_STATUS
|
---|
4559 | NTAPI
|
---|
4560 | NdisMRegisterDevice(
|
---|
4561 | IN NDIS_HANDLE NdisWrapperHandle,
|
---|
4562 | IN PNDIS_STRING DeviceName,
|
---|
4563 | IN PNDIS_STRING SymbolicName,
|
---|
4564 | IN PDRIVER_DISPATCH MajorFunctions[],
|
---|
4565 | OUT PDEVICE_OBJECT *pDeviceObject,
|
---|
4566 | OUT NDIS_HANDLE *NdisDeviceHandle);
|
---|
4567 |
|
---|
4568 | NDISAPI
|
---|
4569 | VOID
|
---|
4570 | NTAPI
|
---|
4571 | NdisMRegisterUnloadHandler(
|
---|
4572 | IN NDIS_HANDLE NdisWrapperHandle,
|
---|
4573 | IN PDRIVER_UNLOAD UnloadHandler);
|
---|
4574 |
|
---|
4575 | NDISAPI
|
---|
4576 | NDIS_STATUS
|
---|
4577 | NTAPI
|
---|
4578 | NdisMRemoveMiniport(
|
---|
4579 | IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
4580 |
|
---|
4581 | NDISAPI
|
---|
4582 | NDIS_STATUS
|
---|
4583 | NTAPI
|
---|
4584 | NdisMSetMiniportSecondary(
|
---|
4585 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
4586 | IN NDIS_HANDLE PrimaryMiniportAdapterHandle);
|
---|
4587 |
|
---|
4588 | NDISAPI
|
---|
4589 | VOID
|
---|
4590 | NTAPI
|
---|
4591 | NdisOpenConfigurationKeyByIndex(
|
---|
4592 | OUT PNDIS_STATUS Status,
|
---|
4593 | IN NDIS_HANDLE ConfigurationHandle,
|
---|
4594 | IN ULONG Index,
|
---|
4595 | OUT PNDIS_STRING KeyName,
|
---|
4596 | OUT PNDIS_HANDLE KeyHandle);
|
---|
4597 |
|
---|
4598 | NDISAPI
|
---|
4599 | VOID
|
---|
4600 | NTAPI
|
---|
4601 | NdisOpenConfigurationKeyByName(
|
---|
4602 | OUT PNDIS_STATUS Status,
|
---|
4603 | IN NDIS_HANDLE ConfigurationHandle,
|
---|
4604 | IN PNDIS_STRING SubKeyName,
|
---|
4605 | OUT PNDIS_HANDLE SubKeyHandle);
|
---|
4606 |
|
---|
4607 | NDISAPI
|
---|
4608 | NDIS_STATUS
|
---|
4609 | NTAPI
|
---|
4610 | NdisQueryAdapterInstanceName(
|
---|
4611 | OUT PNDIS_STRING AdapterInstanceName,
|
---|
4612 | IN NDIS_HANDLE NdisBindingHandle);
|
---|
4613 |
|
---|
4614 | NDISAPI
|
---|
4615 | NDIS_STATUS
|
---|
4616 | NTAPI
|
---|
4617 | NdisQueryBindInstanceName(
|
---|
4618 | OUT PNDIS_STRING pAdapterInstanceName,
|
---|
4619 | IN NDIS_HANDLE BindingContext);
|
---|
4620 |
|
---|
4621 | NDISAPI
|
---|
4622 | NDIS_STATUS
|
---|
4623 | NTAPI
|
---|
4624 | NdisWriteEventLogEntry(
|
---|
4625 | IN PVOID LogHandle,
|
---|
4626 | IN NDIS_STATUS EventCode,
|
---|
4627 | IN ULONG UniqueEventValue,
|
---|
4628 | IN USHORT NumStrings,
|
---|
4629 | IN PVOID StringsList OPTIONAL,
|
---|
4630 | IN ULONG DataSize,
|
---|
4631 | IN PVOID Data OPTIONAL);
|
---|
4632 |
|
---|
4633 | /* Connectionless services */
|
---|
4634 |
|
---|
4635 | NDISAPI
|
---|
4636 | NDIS_STATUS
|
---|
4637 | NTAPI
|
---|
4638 | NdisClAddParty(
|
---|
4639 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4640 | IN NDIS_HANDLE ProtocolPartyContext,
|
---|
4641 | IN OUT PCO_CALL_PARAMETERS CallParameters,
|
---|
4642 | OUT PNDIS_HANDLE NdisPartyHandle);
|
---|
4643 |
|
---|
4644 | NDISAPI
|
---|
4645 | NDIS_STATUS
|
---|
4646 | NTAPI
|
---|
4647 | NdisClCloseAddressFamily(
|
---|
4648 | IN NDIS_HANDLE NdisAfHandle);
|
---|
4649 |
|
---|
4650 | NDISAPI
|
---|
4651 | NDIS_STATUS
|
---|
4652 | NTAPI
|
---|
4653 | NdisClCloseCall(
|
---|
4654 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4655 | IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
|
---|
4656 | IN PVOID Buffer OPTIONAL,
|
---|
4657 | IN UINT Size);
|
---|
4658 |
|
---|
4659 | NDISAPI
|
---|
4660 | NDIS_STATUS
|
---|
4661 | NTAPI
|
---|
4662 | NdisClDeregisterSap(
|
---|
4663 | IN NDIS_HANDLE NdisSapHandle);
|
---|
4664 |
|
---|
4665 | NDISAPI
|
---|
4666 | NDIS_STATUS
|
---|
4667 | NTAPI
|
---|
4668 | NdisClDropParty(
|
---|
4669 | IN NDIS_HANDLE NdisPartyHandle,
|
---|
4670 | IN PVOID Buffer OPTIONAL,
|
---|
4671 | IN UINT Size);
|
---|
4672 |
|
---|
4673 | NDISAPI
|
---|
4674 | VOID
|
---|
4675 | NTAPI
|
---|
4676 | NdisClIncomingCallComplete(
|
---|
4677 | IN NDIS_STATUS Status,
|
---|
4678 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4679 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
4680 |
|
---|
4681 | NDISAPI
|
---|
4682 | NDIS_STATUS
|
---|
4683 | NTAPI
|
---|
4684 | NdisClMakeCall(
|
---|
4685 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4686 | IN OUT PCO_CALL_PARAMETERS CallParameters,
|
---|
4687 | IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
|
---|
4688 | OUT PNDIS_HANDLE NdisPartyHandle OPTIONAL);
|
---|
4689 |
|
---|
4690 | NDISAPI
|
---|
4691 | NDIS_STATUS
|
---|
4692 | NTAPI
|
---|
4693 | NdisClModifyCallQoS(
|
---|
4694 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4695 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
4696 |
|
---|
4697 |
|
---|
4698 | NDISAPI
|
---|
4699 | NDIS_STATUS
|
---|
4700 | NTAPI
|
---|
4701 | NdisClOpenAddressFamily(
|
---|
4702 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
4703 | IN PCO_ADDRESS_FAMILY AddressFamily,
|
---|
4704 | IN NDIS_HANDLE ProtocolAfContext,
|
---|
4705 | IN PNDIS_CLIENT_CHARACTERISTICS ClCharacteristics,
|
---|
4706 | IN UINT SizeOfClCharacteristics,
|
---|
4707 | OUT PNDIS_HANDLE NdisAfHandle);
|
---|
4708 |
|
---|
4709 | NDISAPI
|
---|
4710 | NDIS_STATUS
|
---|
4711 | NTAPI
|
---|
4712 | NdisClRegisterSap(
|
---|
4713 | IN NDIS_HANDLE NdisAfHandle,
|
---|
4714 | IN NDIS_HANDLE ProtocolSapContext,
|
---|
4715 | IN PCO_SAP Sap,
|
---|
4716 | OUT PNDIS_HANDLE NdisSapHandle);
|
---|
4717 |
|
---|
4718 |
|
---|
4719 | /* Call Manager services */
|
---|
4720 |
|
---|
4721 | NDISAPI
|
---|
4722 | NDIS_STATUS
|
---|
4723 | NTAPI
|
---|
4724 | NdisCmActivateVc(
|
---|
4725 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4726 | IN OUT PCO_CALL_PARAMETERS CallParameters);
|
---|
4727 |
|
---|
4728 | NDISAPI
|
---|
4729 | VOID
|
---|
4730 | NTAPI
|
---|
4731 | NdisCmAddPartyComplete(
|
---|
4732 | IN NDIS_STATUS Status,
|
---|
4733 | IN NDIS_HANDLE NdisPartyHandle,
|
---|
4734 | IN NDIS_HANDLE CallMgrPartyContext OPTIONAL,
|
---|
4735 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
4736 |
|
---|
4737 | NDISAPI
|
---|
4738 | VOID
|
---|
4739 | NTAPI
|
---|
4740 | NdisCmCloseAddressFamilyComplete(
|
---|
4741 | IN NDIS_STATUS Status,
|
---|
4742 | IN NDIS_HANDLE NdisAfHandle);
|
---|
4743 |
|
---|
4744 | NDISAPI
|
---|
4745 | VOID
|
---|
4746 | NTAPI
|
---|
4747 | NdisCmCloseCallComplete(
|
---|
4748 | IN NDIS_STATUS Status,
|
---|
4749 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4750 | IN NDIS_HANDLE NdisPartyHandle OPTIONAL);
|
---|
4751 |
|
---|
4752 | NDISAPI
|
---|
4753 | NDIS_STATUS
|
---|
4754 | NTAPI
|
---|
4755 | NdisCmDeactivateVc(
|
---|
4756 | IN NDIS_HANDLE NdisVcHandle);
|
---|
4757 |
|
---|
4758 | NDISAPI
|
---|
4759 | VOID
|
---|
4760 | NTAPI
|
---|
4761 | NdisCmDeregisterSapComplete(
|
---|
4762 | IN NDIS_STATUS Status,
|
---|
4763 | IN NDIS_HANDLE NdisSapHandle);
|
---|
4764 |
|
---|
4765 | NDISAPI
|
---|
4766 | VOID
|
---|
4767 | NTAPI
|
---|
4768 | NdisCmDispatchCallConnected(
|
---|
4769 | IN NDIS_HANDLE NdisVcHandle);
|
---|
4770 |
|
---|
4771 | NDISAPI
|
---|
4772 | NDIS_STATUS
|
---|
4773 | NTAPI
|
---|
4774 | NdisCmDispatchIncomingCall(
|
---|
4775 | IN NDIS_HANDLE NdisSapHandle,
|
---|
4776 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4777 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
4778 |
|
---|
4779 | NDISAPI
|
---|
4780 | VOID
|
---|
4781 | NTAPI
|
---|
4782 | NdisCmDispatchIncomingCallQoSChange(
|
---|
4783 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4784 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
4785 |
|
---|
4786 | NDISAPI
|
---|
4787 | VOID
|
---|
4788 | NTAPI
|
---|
4789 | NdisCmDispatchIncomingCloseCall(
|
---|
4790 | IN NDIS_STATUS CloseStatus,
|
---|
4791 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4792 | IN PVOID Buffer OPTIONAL,
|
---|
4793 | IN UINT Size);
|
---|
4794 |
|
---|
4795 | NDISAPI
|
---|
4796 | VOID
|
---|
4797 | NTAPI
|
---|
4798 | NdisCmDispatchIncomingDropParty(
|
---|
4799 | IN NDIS_STATUS DropStatus,
|
---|
4800 | IN NDIS_HANDLE NdisPartyHandle,
|
---|
4801 | IN PVOID Buffer OPTIONAL,
|
---|
4802 | IN UINT Size);
|
---|
4803 |
|
---|
4804 | NDISAPI
|
---|
4805 | VOID
|
---|
4806 | NTAPI
|
---|
4807 | NdisCmDropPartyComplete(
|
---|
4808 | IN NDIS_STATUS Status,
|
---|
4809 | IN NDIS_HANDLE NdisPartyHandle);
|
---|
4810 |
|
---|
4811 | NDISAPI
|
---|
4812 | VOID
|
---|
4813 | NTAPI
|
---|
4814 | NdisCmMakeCallComplete(
|
---|
4815 | IN NDIS_STATUS Status,
|
---|
4816 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4817 | IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
|
---|
4818 | IN NDIS_HANDLE CallMgrPartyContext OPTIONAL,
|
---|
4819 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
4820 |
|
---|
4821 | NDISAPI
|
---|
4822 | VOID
|
---|
4823 | NTAPI
|
---|
4824 | NdisCmModifyCallQoSComplete(
|
---|
4825 | IN NDIS_STATUS Status,
|
---|
4826 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4827 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
4828 |
|
---|
4829 | NDISAPI
|
---|
4830 | VOID
|
---|
4831 | NTAPI
|
---|
4832 | NdisCmOpenAddressFamilyComplete(
|
---|
4833 | IN NDIS_STATUS Status,
|
---|
4834 | IN NDIS_HANDLE NdisAfHandle,
|
---|
4835 | IN NDIS_HANDLE CallMgrAfContext);
|
---|
4836 |
|
---|
4837 | NDISAPI
|
---|
4838 | NDIS_STATUS
|
---|
4839 | NTAPI
|
---|
4840 | NdisCmRegisterAddressFamily(
|
---|
4841 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
4842 | IN PCO_ADDRESS_FAMILY AddressFamily,
|
---|
4843 | IN PNDIS_CALL_MANAGER_CHARACTERISTICS CmCharacteristics,
|
---|
4844 | IN UINT SizeOfCmCharacteristics);
|
---|
4845 |
|
---|
4846 | NDISAPI
|
---|
4847 | VOID
|
---|
4848 | NTAPI
|
---|
4849 | NdisCmRegisterSapComplete(
|
---|
4850 | IN NDIS_STATUS Status,
|
---|
4851 | IN NDIS_HANDLE NdisSapHandle,
|
---|
4852 | IN NDIS_HANDLE CallMgrSapContext);
|
---|
4853 |
|
---|
4854 |
|
---|
4855 | NDISAPI
|
---|
4856 | NDIS_STATUS
|
---|
4857 | NTAPI
|
---|
4858 | NdisMCmActivateVc(
|
---|
4859 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4860 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
4861 |
|
---|
4862 | NDISAPI
|
---|
4863 | NDIS_STATUS
|
---|
4864 | NTAPI
|
---|
4865 | NdisMCmCreateVc(
|
---|
4866 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
4867 | IN NDIS_HANDLE NdisAfHandle,
|
---|
4868 | IN NDIS_HANDLE MiniportVcContext,
|
---|
4869 | OUT PNDIS_HANDLE NdisVcHandle);
|
---|
4870 |
|
---|
4871 | NDISAPI
|
---|
4872 | NDIS_STATUS
|
---|
4873 | NTAPI
|
---|
4874 | NdisMCmDeactivateVc(
|
---|
4875 | IN NDIS_HANDLE NdisVcHandle);
|
---|
4876 |
|
---|
4877 | NDISAPI
|
---|
4878 | NDIS_STATUS
|
---|
4879 | NTAPI
|
---|
4880 | NdisMCmDeleteVc(
|
---|
4881 | IN NDIS_HANDLE NdisVcHandle);
|
---|
4882 |
|
---|
4883 | NDISAPI
|
---|
4884 | NDIS_STATUS
|
---|
4885 | NTAPI
|
---|
4886 | NdisMCmRegisterAddressFamily(
|
---|
4887 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
4888 | IN PCO_ADDRESS_FAMILY AddressFamily,
|
---|
4889 | IN PNDIS_CALL_MANAGER_CHARACTERISTICS CmCharacteristics,
|
---|
4890 | IN UINT SizeOfCmCharacteristics);
|
---|
4891 |
|
---|
4892 | NDISAPI
|
---|
4893 | NDIS_STATUS
|
---|
4894 | NTAPI
|
---|
4895 | NdisMCmRequest(
|
---|
4896 | IN NDIS_HANDLE NdisAfHandle,
|
---|
4897 | IN NDIS_HANDLE NdisVcHandle OPTIONAL,
|
---|
4898 | IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
|
---|
4899 | IN OUT PNDIS_REQUEST NdisRequest);
|
---|
4900 |
|
---|
4901 |
|
---|
4902 | /* Connection-oriented services */
|
---|
4903 |
|
---|
4904 | NDISAPI
|
---|
4905 | NDIS_STATUS
|
---|
4906 | NTAPI
|
---|
4907 | NdisCoCreateVc(
|
---|
4908 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
4909 | IN NDIS_HANDLE NdisAfHandle OPTIONAL,
|
---|
4910 | IN NDIS_HANDLE ProtocolVcContext,
|
---|
4911 | IN OUT PNDIS_HANDLE NdisVcHandle);
|
---|
4912 |
|
---|
4913 | NDISAPI
|
---|
4914 | NDIS_STATUS
|
---|
4915 | NTAPI
|
---|
4916 | NdisCoDeleteVc(
|
---|
4917 | IN NDIS_HANDLE NdisVcHandle);
|
---|
4918 |
|
---|
4919 | NDISAPI
|
---|
4920 | NDIS_STATUS
|
---|
4921 | NTAPI
|
---|
4922 | NdisCoRequest(
|
---|
4923 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
4924 | IN NDIS_HANDLE NdisAfHandle OPTIONAL,
|
---|
4925 | IN NDIS_HANDLE NdisVcHandle OPTIONAL,
|
---|
4926 | IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
|
---|
4927 | IN OUT PNDIS_REQUEST NdisRequest);
|
---|
4928 |
|
---|
4929 | NDISAPI
|
---|
4930 | VOID
|
---|
4931 | NTAPI
|
---|
4932 | NdisCoRequestComplete(
|
---|
4933 | IN NDIS_STATUS Status,
|
---|
4934 | IN NDIS_HANDLE NdisAfHandle,
|
---|
4935 | IN NDIS_HANDLE NdisVcHandle OPTIONAL,
|
---|
4936 | IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
|
---|
4937 | IN PNDIS_REQUEST NdisRequest);
|
---|
4938 |
|
---|
4939 | NDISAPI
|
---|
4940 | VOID
|
---|
4941 | NTAPI
|
---|
4942 | NdisCoSendPackets(
|
---|
4943 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4944 | IN PPNDIS_PACKET PacketArray,
|
---|
4945 | IN UINT NumberOfPackets);
|
---|
4946 |
|
---|
4947 | NDISAPI
|
---|
4948 | VOID
|
---|
4949 | NTAPI
|
---|
4950 | NdisMCoActivateVcComplete(
|
---|
4951 | IN NDIS_STATUS Status,
|
---|
4952 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4953 | IN PCO_CALL_PARAMETERS CallParameters);
|
---|
4954 |
|
---|
4955 | NDISAPI
|
---|
4956 | VOID
|
---|
4957 | NTAPI
|
---|
4958 | NdisMCoDeactivateVcComplete(
|
---|
4959 | IN NDIS_STATUS Status,
|
---|
4960 | IN NDIS_HANDLE NdisVcHandle);
|
---|
4961 |
|
---|
4962 | NDISAPI
|
---|
4963 | VOID
|
---|
4964 | NTAPI
|
---|
4965 | NdisMCoIndicateReceivePacket(
|
---|
4966 | IN NDIS_HANDLE NdisVcHandle,
|
---|
4967 | IN PPNDIS_PACKET PacketArray,
|
---|
4968 | IN UINT NumberOfPackets);
|
---|
4969 |
|
---|
4970 | NDISAPI
|
---|
4971 | VOID
|
---|
4972 | NTAPI
|
---|
4973 | NdisMCoIndicateStatus(
|
---|
4974 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
4975 | IN NDIS_HANDLE NdisVcHandle OPTIONAL,
|
---|
4976 | IN NDIS_STATUS GeneralStatus,
|
---|
4977 | IN PVOID StatusBuffer OPTIONAL,
|
---|
4978 | IN ULONG StatusBufferSize);
|
---|
4979 |
|
---|
4980 | NDISAPI
|
---|
4981 | VOID
|
---|
4982 | NTAPI
|
---|
4983 | NdisMCoReceiveComplete(
|
---|
4984 | IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
4985 |
|
---|
4986 | NDISAPI
|
---|
4987 | VOID
|
---|
4988 | NTAPI
|
---|
4989 | NdisMCoRequestComplete(
|
---|
4990 | IN NDIS_STATUS Status,
|
---|
4991 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
4992 | IN PNDIS_REQUEST Request);
|
---|
4993 |
|
---|
4994 | NDISAPI
|
---|
4995 | VOID
|
---|
4996 | NTAPI
|
---|
4997 | NdisMCoSendComplete(
|
---|
4998 | IN NDIS_STATUS Status,
|
---|
4999 | IN NDIS_HANDLE NdisVcHandle,
|
---|
5000 | IN PNDIS_PACKET Packet);
|
---|
5001 |
|
---|
5002 |
|
---|
5003 | /* NDIS 5.0 extensions for intermediate drivers */
|
---|
5004 |
|
---|
5005 | NDISAPI
|
---|
5006 | VOID
|
---|
5007 | NTAPI
|
---|
5008 | NdisIMAssociateMiniport(
|
---|
5009 | IN NDIS_HANDLE DriverHandle,
|
---|
5010 | IN NDIS_HANDLE ProtocolHandle);
|
---|
5011 |
|
---|
5012 | NDISAPI
|
---|
5013 | NDIS_STATUS
|
---|
5014 | NTAPI
|
---|
5015 | NdisIMCancelInitializeDeviceInstance(
|
---|
5016 | IN NDIS_HANDLE DriverHandle,
|
---|
5017 | IN PNDIS_STRING DeviceInstance);
|
---|
5018 |
|
---|
5019 | NDISAPI
|
---|
5020 | VOID
|
---|
5021 | NTAPI
|
---|
5022 | NdisIMCopySendCompletePerPacketInfo(
|
---|
5023 | IN PNDIS_PACKET DstPacket,
|
---|
5024 | IN PNDIS_PACKET SrcPacket);
|
---|
5025 |
|
---|
5026 | NDISAPI
|
---|
5027 | VOID
|
---|
5028 | NTAPI
|
---|
5029 | NdisIMCopySendPerPacketInfo(
|
---|
5030 | IN PNDIS_PACKET DstPacket,
|
---|
5031 | IN PNDIS_PACKET SrcPacket);
|
---|
5032 |
|
---|
5033 | NDISAPI
|
---|
5034 | VOID
|
---|
5035 | NTAPI
|
---|
5036 | NdisIMDeregisterLayeredMiniport(
|
---|
5037 | IN NDIS_HANDLE DriverHandle);
|
---|
5038 |
|
---|
5039 | NDISAPI
|
---|
5040 | NDIS_HANDLE
|
---|
5041 | NTAPI
|
---|
5042 | NdisIMGetBindingContext(
|
---|
5043 | IN NDIS_HANDLE NdisBindingHandle);
|
---|
5044 |
|
---|
5045 | NDISAPI
|
---|
5046 | NDIS_HANDLE
|
---|
5047 | NTAPI
|
---|
5048 | NdisIMGetDeviceContext(
|
---|
5049 | IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
5050 |
|
---|
5051 | NDISAPI
|
---|
5052 | NDIS_STATUS
|
---|
5053 | NTAPI
|
---|
5054 | NdisIMInitializeDeviceInstanceEx(
|
---|
5055 | IN NDIS_HANDLE DriverHandle,
|
---|
5056 | IN PNDIS_STRING DriverInstance,
|
---|
5057 | IN NDIS_HANDLE DeviceContext OPTIONAL);
|
---|
5058 |
|
---|
5059 | /*
|
---|
5060 | NDISAPI
|
---|
5061 | PSINGLE_LIST_ENTRY
|
---|
5062 | NTAPI
|
---|
5063 | NdisInterlockedPopEntrySList(
|
---|
5064 | IN PSLIST_HEADER ListHead,
|
---|
5065 | IN PKSPIN_LOCK Lock);
|
---|
5066 | */
|
---|
5067 | #define NdisInterlockedPopEntrySList(SListHead, Lock) \
|
---|
5068 | ExInterlockedPopEntrySList(SListHead, &(Lock)->SpinLock)
|
---|
5069 |
|
---|
5070 | /*
|
---|
5071 | NDISAPI
|
---|
5072 | PSINGLE_LIST_ENTRY
|
---|
5073 | NTAPI
|
---|
5074 | NdisInterlockedPushEntrySList(
|
---|
5075 | IN PSLIST_HEADER ListHead,
|
---|
5076 | IN PSINGLE_LIST_ENTRY ListEntry,
|
---|
5077 | IN PKSPIN_LOCK Lock);
|
---|
5078 | */
|
---|
5079 | #define NdisInterlockedPushEntrySList(SListHead, SListEntry, Lock) \
|
---|
5080 | ExInterlockedPushEntrySList(SListHead, SListEntry, &(Lock)->SpinLock)
|
---|
5081 |
|
---|
5082 | #define NdisInterlockedFlushSList(SListHead) ExInterlockedFlushSList(SListHead)
|
---|
5083 |
|
---|
5084 | /*
|
---|
5085 | NDISAPI
|
---|
5086 | VOID
|
---|
5087 | NTAPI
|
---|
5088 | NdisQueryBufferSafe(
|
---|
5089 | IN PNDIS_BUFFER Buffer,
|
---|
5090 | OUT PVOID *VirtualAddress OPTIONAL,
|
---|
5091 | OUT PUINT Length,
|
---|
5092 | IN UINT Priority);
|
---|
5093 | */
|
---|
5094 | #define NdisQueryBufferSafe(_Buffer, _VirtualAddress, _Length, _Priority) { \
|
---|
5095 | if (ARGUMENT_PRESENT(_VirtualAddress)) { \
|
---|
5096 | *(PVOID *)(_VirtualAddress) = MmGetSystemAddressForMdlSafe(_Buffer, _Priority); \
|
---|
5097 | } \
|
---|
5098 | *(_Length) = MmGetMdlByteCount(_Buffer); \
|
---|
5099 | }
|
---|
5100 |
|
---|
5101 | /* Routines for NDIS miniport drivers */
|
---|
5102 |
|
---|
5103 | #if NDIS_SUPPORT_NDIS6
|
---|
5104 |
|
---|
5105 | NDISAPI
|
---|
5106 | PNDIS_GENERIC_OBJECT
|
---|
5107 | NTAPI
|
---|
5108 | NdisAllocateGenericObject(
|
---|
5109 | PDRIVER_OBJECT DriverObject OPTIONAL,
|
---|
5110 | ULONG Tag,
|
---|
5111 | USHORT Size);
|
---|
5112 |
|
---|
5113 | NDISAPI
|
---|
5114 | VOID
|
---|
5115 | NTAPI
|
---|
5116 | NdisFreeGenericObject(
|
---|
5117 | IN PNDIS_GENERIC_OBJECT NdisObject);
|
---|
5118 |
|
---|
5119 | #endif /* NDIS_SUPPORT_NDIS6 */
|
---|
5120 |
|
---|
5121 | NDISAPI
|
---|
5122 | VOID
|
---|
5123 | NTAPI
|
---|
5124 | NdisInitializeWrapper(
|
---|
5125 | OUT PNDIS_HANDLE NdisWrapperHandle,
|
---|
5126 | IN PVOID SystemSpecific1,
|
---|
5127 | IN PVOID SystemSpecific2,
|
---|
5128 | IN PVOID SystemSpecific3);
|
---|
5129 |
|
---|
5130 | NDISAPI
|
---|
5131 | NDIS_STATUS
|
---|
5132 | NTAPI
|
---|
5133 | NdisMAllocateMapRegisters(
|
---|
5134 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5135 | IN UINT DmaChannel,
|
---|
5136 | IN NDIS_DMA_SIZE DmaSize,
|
---|
5137 | IN ULONG PhysicalMapRegistersNeeded,
|
---|
5138 | IN ULONG MaximumPhysicalMapping);
|
---|
5139 |
|
---|
5140 | /*
|
---|
5141 | * VOID
|
---|
5142 | * NdisMArcIndicateReceive(
|
---|
5143 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5144 | * IN PUCHAR HeaderBuffer,
|
---|
5145 | * IN PUCHAR DataBuffer,
|
---|
5146 | * IN UINT Length);
|
---|
5147 | */
|
---|
5148 | #define NdisMArcIndicateReceive(MiniportAdapterHandle, \
|
---|
5149 | HeaderBuffer, \
|
---|
5150 | DataBuffer, \
|
---|
5151 | Length) \
|
---|
5152 | { \
|
---|
5153 | ArcFilterDprIndicateReceive( \
|
---|
5154 | (((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->ArcDB), \
|
---|
5155 | (HeaderBuffer), \
|
---|
5156 | (DataBuffer), \
|
---|
5157 | (Length)); \
|
---|
5158 | }
|
---|
5159 |
|
---|
5160 | /*
|
---|
5161 | * VOID
|
---|
5162 | * NdisMArcIndicateReceiveComplete(
|
---|
5163 | * IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
5164 | */
|
---|
5165 | #define NdisMArcIndicateReceiveComplete(MiniportAdapterHandle) \
|
---|
5166 | { \
|
---|
5167 | if (((PNDIS_MINIPORT_BLOCK)MiniportAdapterHandle)->EthDB) \
|
---|
5168 | { \
|
---|
5169 | NdisMEthIndicateReceiveComplete(_H); \
|
---|
5170 | } \
|
---|
5171 | \
|
---|
5172 | ArcFilterDprIndicateReceiveComplete( \
|
---|
5173 | ((PNDIS_MINIPORT_BLOCK)MiniportAdapterHandle)->ArcDB); \
|
---|
5174 | }
|
---|
5175 |
|
---|
5176 | NDISAPI
|
---|
5177 | VOID
|
---|
5178 | NTAPI
|
---|
5179 | NdisMCloseLog(
|
---|
5180 | IN NDIS_HANDLE LogHandle);
|
---|
5181 |
|
---|
5182 | NDISAPI
|
---|
5183 | NDIS_STATUS
|
---|
5184 | NTAPI
|
---|
5185 | NdisMCreateLog(
|
---|
5186 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5187 | IN UINT Size,
|
---|
5188 | OUT PNDIS_HANDLE LogHandle);
|
---|
5189 |
|
---|
5190 | NDISAPI
|
---|
5191 | VOID
|
---|
5192 | NTAPI
|
---|
5193 | NdisMDeregisterAdapterShutdownHandler(
|
---|
5194 | IN NDIS_HANDLE MiniportHandle);
|
---|
5195 |
|
---|
5196 | #if NDIS_LEGACY_MINIPORT
|
---|
5197 |
|
---|
5198 | NDISAPI
|
---|
5199 | VOID
|
---|
5200 | NTAPI
|
---|
5201 | NdisMDeregisterInterrupt(
|
---|
5202 | IN PNDIS_MINIPORT_INTERRUPT Interrupt);
|
---|
5203 |
|
---|
5204 | NDISAPI
|
---|
5205 | VOID
|
---|
5206 | NTAPI
|
---|
5207 | NdisMRegisterAdapterShutdownHandler(
|
---|
5208 | IN NDIS_HANDLE MiniportHandle,
|
---|
5209 | IN PVOID ShutdownContext,
|
---|
5210 | IN ADAPTER_SHUTDOWN_HANDLER ShutdownHandler);
|
---|
5211 |
|
---|
5212 | NDISAPI
|
---|
5213 | NDIS_STATUS
|
---|
5214 | NTAPI
|
---|
5215 | NdisMRegisterInterrupt(
|
---|
5216 | OUT PNDIS_MINIPORT_INTERRUPT Interrupt,
|
---|
5217 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5218 | IN UINT InterruptVector,
|
---|
5219 | IN UINT InterruptLevel,
|
---|
5220 | IN BOOLEAN RequestIsr,
|
---|
5221 | IN BOOLEAN SharedInterrupt,
|
---|
5222 | IN NDIS_INTERRUPT_MODE InterruptMode);
|
---|
5223 |
|
---|
5224 | NDISAPI
|
---|
5225 | NDIS_STATUS
|
---|
5226 | NTAPI
|
---|
5227 | NdisMRegisterMiniport(
|
---|
5228 | IN NDIS_HANDLE NdisWrapperHandle,
|
---|
5229 | IN PNDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics,
|
---|
5230 | IN UINT CharacteristicsLength);
|
---|
5231 |
|
---|
5232 | NDISAPI
|
---|
5233 | BOOLEAN
|
---|
5234 | NTAPI
|
---|
5235 | NdisMSynchronizeWithInterrupt(
|
---|
5236 | IN PNDIS_MINIPORT_INTERRUPT Interrupt,
|
---|
5237 | IN PVOID SynchronizeFunction,
|
---|
5238 | IN PVOID SynchronizeContext);
|
---|
5239 | #endif /* NDIS_LEGACY_MINIPORT */
|
---|
5240 |
|
---|
5241 | NDISAPI
|
---|
5242 | VOID
|
---|
5243 | NTAPI
|
---|
5244 | NdisMDeregisterIoPortRange(
|
---|
5245 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5246 | IN UINT InitialPort,
|
---|
5247 | IN UINT NumberOfPorts,
|
---|
5248 | IN PVOID PortOffset);
|
---|
5249 |
|
---|
5250 | /*
|
---|
5251 | * VOID
|
---|
5252 | * NdisMEthIndicateReceive(
|
---|
5253 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5254 | * IN NDIS_HANDLE MiniportReceiveContext,
|
---|
5255 | * IN PVOID HeaderBuffer,
|
---|
5256 | * IN UINT HeaderBufferSize,
|
---|
5257 | * IN PVOID LookaheadBuffer,
|
---|
5258 | * IN UINT LookaheadBufferSize,
|
---|
5259 | * IN UINT PacketSize);
|
---|
5260 | */
|
---|
5261 | #define NdisMEthIndicateReceive(MiniportAdapterHandle, \
|
---|
5262 | MiniportReceiveContext, \
|
---|
5263 | HeaderBuffer, \
|
---|
5264 | HeaderBufferSize, \
|
---|
5265 | LookaheadBuffer, \
|
---|
5266 | LookaheadBufferSize, \
|
---|
5267 | PacketSize) \
|
---|
5268 | { \
|
---|
5269 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->EthRxIndicateHandler)( \
|
---|
5270 | ((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->EthDB, \
|
---|
5271 | (MiniportReceiveContext), \
|
---|
5272 | (HeaderBuffer), \
|
---|
5273 | (HeaderBuffer), \
|
---|
5274 | (HeaderBufferSize), \
|
---|
5275 | (LookaheadBuffer), \
|
---|
5276 | (LookaheadBufferSize), \
|
---|
5277 | (PacketSize)); \
|
---|
5278 | }
|
---|
5279 |
|
---|
5280 | /*
|
---|
5281 | * VOID
|
---|
5282 | * NdisMEthIndicateReceiveComplete(
|
---|
5283 | * IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
5284 | */
|
---|
5285 | #define NdisMEthIndicateReceiveComplete(MiniportAdapterHandle) \
|
---|
5286 | { \
|
---|
5287 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->EthRxCompleteHandler)( \
|
---|
5288 | ((PNDIS_MINIPORT_BLOCK)MiniportAdapterHandle)->EthDB); \
|
---|
5289 | }
|
---|
5290 |
|
---|
5291 | /*
|
---|
5292 | * VOID
|
---|
5293 | * NdisMFddiIndicateReceive(
|
---|
5294 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5295 | * IN NDIS_HANDLE MiniportReceiveContext,
|
---|
5296 | * IN PVOID HeaderBuffer,
|
---|
5297 | * IN UINT HeaderBufferSize,
|
---|
5298 | * IN PVOID LookaheadBuffer,
|
---|
5299 | * IN UINT LookaheadBufferSize,
|
---|
5300 | * IN UINT PacketSize);
|
---|
5301 | */
|
---|
5302 | #define NdisMFddiIndicateReceive(MiniportAdapterHandle, \
|
---|
5303 | MiniportReceiveContext, \
|
---|
5304 | HeaderBuffer, \
|
---|
5305 | HeaderBufferSize, \
|
---|
5306 | LookaheadBuffer, \
|
---|
5307 | LookaheadBufferSize, \
|
---|
5308 | PacketSize) \
|
---|
5309 | { \
|
---|
5310 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->FddiRxIndicateHandler)( \
|
---|
5311 | (((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->FddiDB), \
|
---|
5312 | (MiniportReceiveContext), \
|
---|
5313 | (PUCHAR)(HeaderBuffer) + 1, \
|
---|
5314 | (((*(PUCHAR*)(HeaderBuffer)) & 0x40) ? \
|
---|
5315 | FDDI_LENGTH_OF_LONG_ADDRESS : \
|
---|
5316 | FDDI_LENGTH_OF_SHORT_ADDRESS), \
|
---|
5317 | (HeaderBuffer), \
|
---|
5318 | (HeaderBufferSize), \
|
---|
5319 | (LookaheadBuffer), \
|
---|
5320 | (LookaheadBufferSize), \
|
---|
5321 | (PacketSize)); \
|
---|
5322 | }
|
---|
5323 |
|
---|
5324 |
|
---|
5325 |
|
---|
5326 | /*
|
---|
5327 | * VOID
|
---|
5328 | * NdisMFddiIndicateReceiveComplete(
|
---|
5329 | * IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
5330 | */
|
---|
5331 | #define NdisMFddiIndicateReceiveComplete(MiniportAdapterHandle) \
|
---|
5332 | { \
|
---|
5333 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->FddiRxCompleteHandler)( \
|
---|
5334 | ((PNDIS_MINIPORT_BLOCK)MiniportAdapterHandle)->FddiDB); \
|
---|
5335 | }
|
---|
5336 |
|
---|
5337 | NDISAPI
|
---|
5338 | VOID
|
---|
5339 | NTAPI
|
---|
5340 | NdisMFlushLog(
|
---|
5341 | IN NDIS_HANDLE LogHandle);
|
---|
5342 |
|
---|
5343 | NDISAPI
|
---|
5344 | VOID
|
---|
5345 | NTAPI
|
---|
5346 | NdisMFreeMapRegisters(
|
---|
5347 | IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
5348 |
|
---|
5349 | /*
|
---|
5350 | * VOID
|
---|
5351 | * EXPORT
|
---|
5352 | * NdisMIndicateReceivePacket(
|
---|
5353 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5354 | * IN PPNDIS_PACKET ReceivePackets,
|
---|
5355 | * IN UINT NumberOfPackets);
|
---|
5356 | */
|
---|
5357 | #define NdisMIndicateReceivePacket(MiniportAdapterHandle, \
|
---|
5358 | ReceivePackets, NumberOfPackets) \
|
---|
5359 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->PacketIndicateHandler)( \
|
---|
5360 | MiniportAdapterHandle, ReceivePackets, NumberOfPackets)
|
---|
5361 |
|
---|
5362 | /*
|
---|
5363 | * VOID
|
---|
5364 | * NdisMIndicateStatus(
|
---|
5365 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5366 | * IN NDIS_STATUS GeneralStatus,
|
---|
5367 | * IN PVOID StatusBuffer,
|
---|
5368 | * IN UINT StatusBufferSize);
|
---|
5369 | */
|
---|
5370 |
|
---|
5371 | #define NdisMIndicateStatus(MiniportAdapterHandle, \
|
---|
5372 | GeneralStatus, StatusBuffer, StatusBufferSize) \
|
---|
5373 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->StatusHandler)( \
|
---|
5374 | MiniportAdapterHandle, GeneralStatus, StatusBuffer, StatusBufferSize)
|
---|
5375 |
|
---|
5376 | /*
|
---|
5377 | * VOID
|
---|
5378 | * NdisMIndicateStatusComplete(
|
---|
5379 | * IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
5380 | */
|
---|
5381 | #define NdisMIndicateStatusComplete(MiniportAdapterHandle) \
|
---|
5382 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->StatusCompleteHandler)( \
|
---|
5383 | MiniportAdapterHandle)
|
---|
5384 |
|
---|
5385 | /*
|
---|
5386 | * VOID
|
---|
5387 | * NdisMInitializeWrapper(
|
---|
5388 | * OUT PNDIS_HANDLE NdisWrapperHandle,
|
---|
5389 | * IN PVOID SystemSpecific1,
|
---|
5390 | * IN PVOID SystemSpecific2,
|
---|
5391 | * IN PVOID SystemSpecific3);
|
---|
5392 | */
|
---|
5393 | #define NdisMInitializeWrapper(NdisWrapperHandle, \
|
---|
5394 | SystemSpecific1, \
|
---|
5395 | SystemSpecific2, \
|
---|
5396 | SystemSpecific3) \
|
---|
5397 | NdisInitializeWrapper((NdisWrapperHandle), \
|
---|
5398 | (SystemSpecific1), \
|
---|
5399 | (SystemSpecific2), \
|
---|
5400 | (SystemSpecific3))
|
---|
5401 |
|
---|
5402 | NDISAPI
|
---|
5403 | NDIS_STATUS
|
---|
5404 | NTAPI
|
---|
5405 | NdisMMapIoSpace(
|
---|
5406 | OUT PVOID *VirtualAddress,
|
---|
5407 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5408 | IN NDIS_PHYSICAL_ADDRESS PhysicalAddress,
|
---|
5409 | IN UINT Length);
|
---|
5410 |
|
---|
5411 | /*
|
---|
5412 | * VOID
|
---|
5413 | * NdisMQueryInformationComplete(
|
---|
5414 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5415 | * IN NDIS_STATUS Status);
|
---|
5416 | */
|
---|
5417 | #define NdisMQueryInformationComplete(MiniportAdapterHandle, Status) \
|
---|
5418 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->QueryCompleteHandler)(MiniportAdapterHandle, Status)
|
---|
5419 |
|
---|
5420 | NDISAPI
|
---|
5421 | NDIS_STATUS
|
---|
5422 | NTAPI
|
---|
5423 | NdisMRegisterIoPortRange(
|
---|
5424 | OUT PVOID *PortOffset,
|
---|
5425 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5426 | IN UINT InitialPort,
|
---|
5427 | IN UINT NumberOfPorts);
|
---|
5428 |
|
---|
5429 | NDISAPI
|
---|
5430 | VOID
|
---|
5431 | NTAPI
|
---|
5432 | NdisMSetTimer(
|
---|
5433 | IN PNDIS_MINIPORT_TIMER Timer,
|
---|
5434 | IN UINT MillisecondsToDelay);
|
---|
5435 |
|
---|
5436 | NDISAPI
|
---|
5437 | VOID
|
---|
5438 | NTAPI
|
---|
5439 | NdisMInitializeTimer(
|
---|
5440 | IN OUT PNDIS_MINIPORT_TIMER Timer,
|
---|
5441 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5442 | IN PNDIS_TIMER_FUNCTION TimerFunction,
|
---|
5443 | IN PVOID FunctionContext);
|
---|
5444 |
|
---|
5445 | NDISAPI
|
---|
5446 | VOID
|
---|
5447 | NTAPI
|
---|
5448 | NdisMSetPeriodicTimer(
|
---|
5449 | IN PNDIS_MINIPORT_TIMER Timer,
|
---|
5450 | IN UINT MillisecondPeriod);
|
---|
5451 |
|
---|
5452 | NDISAPI
|
---|
5453 | VOID
|
---|
5454 | NTAPI
|
---|
5455 | NdisMCancelTimer(
|
---|
5456 | IN PNDIS_MINIPORT_TIMER Timer,
|
---|
5457 | OUT PBOOLEAN TimerCancelled);
|
---|
5458 |
|
---|
5459 | #if !defined(NDIS_WRAPPER)
|
---|
5460 |
|
---|
5461 | /*
|
---|
5462 | * VOID
|
---|
5463 | * NdisMResetComplete(
|
---|
5464 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5465 | * IN NDIS_STATUS Status,
|
---|
5466 | * IN BOOLEAN AddressingReset);
|
---|
5467 | */
|
---|
5468 | #define NdisMResetComplete(MiniportAdapterHandle, \
|
---|
5469 | Status, \
|
---|
5470 | AddressingReset) \
|
---|
5471 | { \
|
---|
5472 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->ResetCompleteHandler)( \
|
---|
5473 | MiniportAdapterHandle, Status, AddressingReset); \
|
---|
5474 | }
|
---|
5475 |
|
---|
5476 | /*
|
---|
5477 | * VOID
|
---|
5478 | * NdisMSendComplete(
|
---|
5479 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5480 | * IN PNDIS_PACKET Packet,
|
---|
5481 | * IN NDIS_STATUS Status);
|
---|
5482 | */
|
---|
5483 | #define NdisMSendComplete(MiniportAdapterHandle, \
|
---|
5484 | Packet, \
|
---|
5485 | Status) \
|
---|
5486 | { \
|
---|
5487 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->SendCompleteHandler)( \
|
---|
5488 | MiniportAdapterHandle, Packet, Status); \
|
---|
5489 | }
|
---|
5490 |
|
---|
5491 | /*
|
---|
5492 | * VOID
|
---|
5493 | * NdisMSendResourcesAvailable(
|
---|
5494 | * IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
5495 | */
|
---|
5496 | #define NdisMSendResourcesAvailable(MiniportAdapterHandle) \
|
---|
5497 | { \
|
---|
5498 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->SendResourcesHandler)( \
|
---|
5499 | MiniportAdapterHandle); \
|
---|
5500 | }
|
---|
5501 |
|
---|
5502 | /*
|
---|
5503 | * VOID
|
---|
5504 | * NdisMTransferDataComplete(
|
---|
5505 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5506 | * IN PNDIS_PACKET Packet,
|
---|
5507 | * IN NDIS_STATUS Status,
|
---|
5508 | * IN UINT BytesTransferred);
|
---|
5509 | */
|
---|
5510 | #define NdisMTransferDataComplete(MiniportAdapterHandle, \
|
---|
5511 | Packet, \
|
---|
5512 | Status, \
|
---|
5513 | BytesTransferred) \
|
---|
5514 | { \
|
---|
5515 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->TDCompleteHandler)( \
|
---|
5516 | MiniportAdapterHandle, Packet, Status, BytesTransferred) \
|
---|
5517 | }
|
---|
5518 |
|
---|
5519 | #endif /* !_NDIS_ */
|
---|
5520 |
|
---|
5521 |
|
---|
5522 | /*
|
---|
5523 | * VOID
|
---|
5524 | * NdisMSetAttributes(
|
---|
5525 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5526 | * IN NDIS_HANDLE MiniportAdapterContext,
|
---|
5527 | * IN BOOLEAN BusMaster,
|
---|
5528 | * IN NDIS_INTERFACE_TYPE AdapterType);
|
---|
5529 | */
|
---|
5530 | #define NdisMSetAttributes(MiniportAdapterHandle, \
|
---|
5531 | MiniportAdapterContext, \
|
---|
5532 | BusMaster, \
|
---|
5533 | AdapterType) \
|
---|
5534 | NdisMSetAttributesEx(MiniportAdapterHandle, \
|
---|
5535 | MiniportAdapterContext, \
|
---|
5536 | 0, \
|
---|
5537 | (BusMaster) ? NDIS_ATTRIBUTE_BUS_MASTER : 0, \
|
---|
5538 | AdapterType)
|
---|
5539 |
|
---|
5540 | NDISAPI
|
---|
5541 | VOID
|
---|
5542 | NTAPI
|
---|
5543 | NdisMSetAttributesEx(
|
---|
5544 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5545 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
5546 | IN UINT CheckForHangTimeInSeconds OPTIONAL,
|
---|
5547 | IN ULONG AttributeFlags,
|
---|
5548 | IN NDIS_INTERFACE_TYPE AdapterType);
|
---|
5549 |
|
---|
5550 | /*
|
---|
5551 | * VOID
|
---|
5552 | * NdisMSetInformationComplete(
|
---|
5553 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5554 | * IN NDIS_STATUS Status);
|
---|
5555 | */
|
---|
5556 | #define NdisMSetInformationComplete(MiniportAdapterHandle, \
|
---|
5557 | Status) \
|
---|
5558 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->SetCompleteHandler)( \
|
---|
5559 | MiniportAdapterHandle, Status)
|
---|
5560 |
|
---|
5561 | NDISAPI
|
---|
5562 | VOID
|
---|
5563 | NTAPI
|
---|
5564 | NdisMSleep(
|
---|
5565 | IN ULONG MicrosecondsToSleep);
|
---|
5566 |
|
---|
5567 | /*
|
---|
5568 | * VOID
|
---|
5569 | * NdisMTrIndicateReceive(
|
---|
5570 | * IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5571 | * IN NDIS_HANDLE MiniportReceiveContext,
|
---|
5572 | * IN PVOID HeaderBuffer,
|
---|
5573 | * IN UINT HeaderBufferSize,
|
---|
5574 | * IN PVOID LookaheadBuffer,
|
---|
5575 | * IN UINT LookaheadBufferSize,
|
---|
5576 | * IN UINT PacketSize);
|
---|
5577 | */
|
---|
5578 | #define NdisMTrIndicateReceive(MiniportAdapterHandle, \
|
---|
5579 | MiniportReceiveContext, \
|
---|
5580 | HeaderBuffer, \
|
---|
5581 | HeaderBufferSize, \
|
---|
5582 | LookaheadBuffer, \
|
---|
5583 | LookaheadBufferSize, \
|
---|
5584 | PacketSize) \
|
---|
5585 | { \
|
---|
5586 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->TrRxIndicateHandler)( \
|
---|
5587 | (((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->TrDB), \
|
---|
5588 | (MiniportReceiveContext), \
|
---|
5589 | (HeaderBuffer), \
|
---|
5590 | (HeaderBuffer), \
|
---|
5591 | (HeaderBufferSize), \
|
---|
5592 | (LookaheadBuffer), \
|
---|
5593 | (LookaheadBufferSize), \
|
---|
5594 | (PacketSize)); \
|
---|
5595 | }
|
---|
5596 |
|
---|
5597 | /*
|
---|
5598 | * VOID
|
---|
5599 | * NdisMTrIndicateReceiveComplete(
|
---|
5600 | * IN NDIS_HANDLE MiniportAdapterHandle);
|
---|
5601 | */
|
---|
5602 | #define NdisMTrIndicateReceiveComplete(MiniportAdapterHandle) \
|
---|
5603 | { \
|
---|
5604 | (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->TrRxCompleteHandler)( \
|
---|
5605 | ((PNDIS_MINIPORT_BLOCK)MiniportAdapterHandle)->TrDB); \
|
---|
5606 | }
|
---|
5607 |
|
---|
5608 | NDISAPI
|
---|
5609 | NDIS_STATUS
|
---|
5610 | NTAPI
|
---|
5611 | NdisMWriteLogData(
|
---|
5612 | IN NDIS_HANDLE LogHandle,
|
---|
5613 | IN PVOID LogBuffer,
|
---|
5614 | IN UINT LogBufferSize);
|
---|
5615 |
|
---|
5616 | NDISAPI
|
---|
5617 | VOID
|
---|
5618 | NTAPI
|
---|
5619 | NdisMQueryAdapterResources(
|
---|
5620 | OUT PNDIS_STATUS Status,
|
---|
5621 | IN NDIS_HANDLE WrapperConfigurationContext,
|
---|
5622 | OUT PNDIS_RESOURCE_LIST ResourceList,
|
---|
5623 | IN OUT PUINT BufferSize);
|
---|
5624 |
|
---|
5625 | NDISAPI
|
---|
5626 | VOID
|
---|
5627 | NTAPI
|
---|
5628 | NdisTerminateWrapper(
|
---|
5629 | IN NDIS_HANDLE NdisWrapperHandle,
|
---|
5630 | IN PVOID SystemSpecific);
|
---|
5631 |
|
---|
5632 | NDISAPI
|
---|
5633 | VOID
|
---|
5634 | NTAPI
|
---|
5635 | NdisMUnmapIoSpace(
|
---|
5636 | IN NDIS_HANDLE MiniportAdapterHandle,
|
---|
5637 | IN PVOID VirtualAddress,
|
---|
5638 | IN UINT Length);
|
---|
5639 |
|
---|
5640 | /* Event functions */
|
---|
5641 |
|
---|
5642 | NDISAPI
|
---|
5643 | VOID
|
---|
5644 | NTAPI
|
---|
5645 | NdisInitializeEvent(
|
---|
5646 | OUT PNDIS_EVENT Event);
|
---|
5647 |
|
---|
5648 | NDISAPI
|
---|
5649 | VOID
|
---|
5650 | NTAPI
|
---|
5651 | NdisSetEvent(
|
---|
5652 | IN PNDIS_EVENT Event);
|
---|
5653 |
|
---|
5654 | NDISAPI
|
---|
5655 | VOID
|
---|
5656 | NTAPI
|
---|
5657 | NdisResetEvent(
|
---|
5658 | IN PNDIS_EVENT Event);
|
---|
5659 |
|
---|
5660 | NDISAPI
|
---|
5661 | BOOLEAN
|
---|
5662 | NTAPI
|
---|
5663 | NdisWaitEvent(
|
---|
5664 | IN PNDIS_EVENT Event,
|
---|
5665 | IN UINT MsToWait);
|
---|
5666 |
|
---|
5667 | /* NDIS intermediate miniport structures */
|
---|
5668 |
|
---|
5669 | typedef VOID (NTAPI *W_MINIPORT_CALLBACK)(
|
---|
5670 | IN NDIS_HANDLE MiniportAdapterContext,
|
---|
5671 | IN PVOID CallbackContext);
|
---|
5672 |
|
---|
5673 | /* Routines for intermediate miniport drivers */
|
---|
5674 |
|
---|
5675 | NDISAPI
|
---|
5676 | NDIS_STATUS
|
---|
5677 | NTAPI
|
---|
5678 | NdisIMDeInitializeDeviceInstance(
|
---|
5679 | IN NDIS_HANDLE NdisMiniportHandle);
|
---|
5680 |
|
---|
5681 | /*
|
---|
5682 | * NDIS_STATUS
|
---|
5683 | * NdisIMInitializeDeviceInstance(
|
---|
5684 | * IN NDIS_HANDLE DriverHandle,
|
---|
5685 | * IN PNDIS_STRING DeviceInstance);
|
---|
5686 | */
|
---|
5687 | #define NdisIMInitializeDeviceInstance(DriverHandle, DeviceInstance) \
|
---|
5688 | NdisIMInitializeDeviceInstanceEx(DriverHandle, DeviceInstance, NULL)
|
---|
5689 |
|
---|
5690 | /* Functions obsoleted by NDIS 5.0 */
|
---|
5691 |
|
---|
5692 | NDISAPI
|
---|
5693 | VOID
|
---|
5694 | NTAPI
|
---|
5695 | NdisFreeDmaChannel(
|
---|
5696 | IN PNDIS_HANDLE NdisDmaHandle);
|
---|
5697 |
|
---|
5698 | NDISAPI
|
---|
5699 | VOID
|
---|
5700 | NTAPI
|
---|
5701 | NdisSetupDmaTransfer(
|
---|
5702 | OUT PNDIS_STATUS Status,
|
---|
5703 | IN PNDIS_HANDLE NdisDmaHandle,
|
---|
5704 | IN PNDIS_BUFFER Buffer,
|
---|
5705 | IN ULONG Offset,
|
---|
5706 | IN ULONG Length,
|
---|
5707 | IN BOOLEAN WriteToDevice);
|
---|
5708 |
|
---|
5709 | /*
|
---|
5710 | NDISAPI
|
---|
5711 | NTSTATUS
|
---|
5712 | NTAPI
|
---|
5713 | NdisUpcaseUnicodeString(
|
---|
5714 | OUT PUNICODE_STRING DestinationString,
|
---|
5715 | IN PUNICODE_STRING SourceString);
|
---|
5716 | */
|
---|
5717 | #define NdisUpcaseUnicodeString(_d, _s) RtlUpcaseUnicodeString(_d, _s, FALSE)
|
---|
5718 |
|
---|
5719 |
|
---|
5720 | /* Routines for NDIS protocol drivers */
|
---|
5721 |
|
---|
5722 | #if NDIS_LEGACY_PROTOCOL
|
---|
5723 |
|
---|
5724 | NDISAPI
|
---|
5725 | NDIS_STATUS
|
---|
5726 | NTAPI
|
---|
5727 | NdisIMRegisterLayeredMiniport(
|
---|
5728 | IN NDIS_HANDLE NdisWrapperHandle,
|
---|
5729 | IN PNDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics,
|
---|
5730 | IN UINT CharacteristicsLength,
|
---|
5731 | OUT PNDIS_HANDLE DriverHandle);
|
---|
5732 |
|
---|
5733 | NDISAPI
|
---|
5734 | VOID
|
---|
5735 | NTAPI
|
---|
5736 | NdisTransferData(
|
---|
5737 | OUT PNDIS_STATUS Status,
|
---|
5738 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
5739 | IN NDIS_HANDLE MacReceiveContext,
|
---|
5740 | IN UINT ByteOffset,
|
---|
5741 | IN UINT BytesToTransfer,
|
---|
5742 | IN OUT PNDIS_PACKET Packet,
|
---|
5743 | OUT PUINT BytesTransferred);
|
---|
5744 |
|
---|
5745 | NDISAPI
|
---|
5746 | VOID
|
---|
5747 | NTAPI
|
---|
5748 | NdisSend(
|
---|
5749 | OUT PNDIS_STATUS Status,
|
---|
5750 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
5751 | IN PNDIS_PACKET Packet);
|
---|
5752 |
|
---|
5753 | NDISAPI
|
---|
5754 | VOID
|
---|
5755 | NTAPI
|
---|
5756 | NdisSendPackets(
|
---|
5757 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
5758 | IN PPNDIS_PACKET PacketArray,
|
---|
5759 | IN UINT NumberOfPackets);
|
---|
5760 |
|
---|
5761 | NDISAPI
|
---|
5762 | VOID
|
---|
5763 | NTAPI
|
---|
5764 | NdisRequest(
|
---|
5765 | OUT PNDIS_STATUS Status,
|
---|
5766 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
5767 | IN PNDIS_REQUEST NdisRequest);
|
---|
5768 |
|
---|
5769 | NDISAPI
|
---|
5770 | VOID
|
---|
5771 | NTAPI
|
---|
5772 | NdisReset(
|
---|
5773 | OUT PNDIS_STATUS Status,
|
---|
5774 | IN NDIS_HANDLE NdisBindingHandle);
|
---|
5775 |
|
---|
5776 | NDISAPI
|
---|
5777 | VOID
|
---|
5778 | NTAPI
|
---|
5779 | NdisDeregisterProtocol(
|
---|
5780 | OUT PNDIS_STATUS Status,
|
---|
5781 | IN NDIS_HANDLE NdisProtocolHandle);
|
---|
5782 |
|
---|
5783 | NDISAPI
|
---|
5784 | VOID
|
---|
5785 | NTAPI
|
---|
5786 | NdisOpenAdapter(
|
---|
5787 | OUT PNDIS_STATUS Status,
|
---|
5788 | OUT PNDIS_STATUS OpenErrorStatus,
|
---|
5789 | OUT PNDIS_HANDLE NdisBindingHandle,
|
---|
5790 | OUT PUINT SelectedMediumIndex,
|
---|
5791 | IN PNDIS_MEDIUM MediumArray,
|
---|
5792 | IN UINT MediumArraySize,
|
---|
5793 | IN NDIS_HANDLE NdisProtocolHandle,
|
---|
5794 | IN NDIS_HANDLE ProtocolBindingContext,
|
---|
5795 | IN PNDIS_STRING AdapterName,
|
---|
5796 | IN UINT OpenOptions,
|
---|
5797 | IN PSTRING AddressingInformation OPTIONAL);
|
---|
5798 |
|
---|
5799 | NDISAPI
|
---|
5800 | VOID
|
---|
5801 | NTAPI
|
---|
5802 | NdisCloseAdapter(
|
---|
5803 | OUT PNDIS_STATUS Status,
|
---|
5804 | IN NDIS_HANDLE NdisBindingHandle);
|
---|
5805 |
|
---|
5806 | NDISAPI
|
---|
5807 | VOID
|
---|
5808 | NTAPI
|
---|
5809 | NdisCompleteBindAdapter(
|
---|
5810 | IN NDIS_HANDLE BindAdapterContext,
|
---|
5811 | IN NDIS_STATUS Status,
|
---|
5812 | IN NDIS_STATUS OpenStatus);
|
---|
5813 |
|
---|
5814 | NDISAPI
|
---|
5815 | VOID
|
---|
5816 | NTAPI
|
---|
5817 | NdisCompleteUnbindAdapter(
|
---|
5818 | IN NDIS_HANDLE UnbindAdapterContext,
|
---|
5819 | IN NDIS_STATUS Status);
|
---|
5820 |
|
---|
5821 | NDISAPI
|
---|
5822 | VOID
|
---|
5823 | NTAPI
|
---|
5824 | NdisSetProtocolFilter(
|
---|
5825 | OUT PNDIS_STATUS Status,
|
---|
5826 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
5827 | IN RECEIVE_HANDLER ReceiveHandler,
|
---|
5828 | IN RECEIVE_PACKET_HANDLER ReceivePacketHandler,
|
---|
5829 | IN NDIS_MEDIUM Medium,
|
---|
5830 | IN UINT Offset,
|
---|
5831 | IN UINT Size,
|
---|
5832 | IN PUCHAR Pattern);
|
---|
5833 |
|
---|
5834 | NDISAPI
|
---|
5835 | VOID
|
---|
5836 | NTAPI
|
---|
5837 | NdisGetDriverHandle(
|
---|
5838 | IN PNDIS_HANDLE NdisBindingHandle,
|
---|
5839 | OUT PNDIS_HANDLE NdisDriverHandle);
|
---|
5840 |
|
---|
5841 | NDISAPI
|
---|
5842 | VOID
|
---|
5843 | NTAPI
|
---|
5844 | NdisOpenProtocolConfiguration(
|
---|
5845 | OUT PNDIS_STATUS Status,
|
---|
5846 | OUT PNDIS_HANDLE ConfigurationHandle,
|
---|
5847 | IN PNDIS_STRING ProtocolSection);
|
---|
5848 |
|
---|
5849 | NDISAPI
|
---|
5850 | VOID
|
---|
5851 | NTAPI
|
---|
5852 | NdisCompletePnPEvent(
|
---|
5853 | IN NDIS_STATUS Status,
|
---|
5854 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
5855 | IN PNET_PNP_EVENT NetPnPEvent);
|
---|
5856 |
|
---|
5857 | /*
|
---|
5858 | * VOID
|
---|
5859 | * NdisSetSendFlags(
|
---|
5860 | * IN PNDIS_PACKET Packet,
|
---|
5861 | * IN UINT Flags);
|
---|
5862 | */
|
---|
5863 | #define NdisSetSendFlags(_Packet,_Flags)(_Packet)->Private.Flags = (_Flags)
|
---|
5864 |
|
---|
5865 | #define NdisQuerySendFlags(_Packet,_Flags) *(_Flags) = (_Packet)->Private.Flags
|
---|
5866 |
|
---|
5867 | NDISAPI
|
---|
5868 | VOID
|
---|
5869 | NTAPI
|
---|
5870 | NdisReturnPackets(
|
---|
5871 | IN PNDIS_PACKET *PacketsToReturn,
|
---|
5872 | IN UINT NumberOfPackets);
|
---|
5873 |
|
---|
5874 | NDISAPI
|
---|
5875 | PNDIS_PACKET
|
---|
5876 | NTAPI
|
---|
5877 | NdisGetReceivedPacket(
|
---|
5878 | IN PNDIS_HANDLE NdisBindingHandle,
|
---|
5879 | IN PNDIS_HANDLE MacContext);
|
---|
5880 |
|
---|
5881 | NDISAPI
|
---|
5882 | VOID
|
---|
5883 | NTAPI
|
---|
5884 | NdisCancelSendPackets(
|
---|
5885 | IN NDIS_HANDLE NdisBindingHandle,
|
---|
5886 | IN PVOID CancelId);
|
---|
5887 |
|
---|
5888 | NDISAPI
|
---|
5889 | NDIS_STATUS
|
---|
5890 | NTAPI
|
---|
5891 | NdisQueryPendingIOCount(
|
---|
5892 | IN PVOID NdisBindingHandle,
|
---|
5893 | OUT PULONG IoCount);
|
---|
5894 |
|
---|
5895 | NDISAPI
|
---|
5896 | VOID
|
---|
5897 | NTAPI
|
---|
5898 | NdisRegisterProtocol(
|
---|
5899 | OUT PNDIS_STATUS Status,
|
---|
5900 | OUT PNDIS_HANDLE NdisProtocolHandle,
|
---|
5901 | IN PNDIS_PROTOCOL_CHARACTERISTICS ProtocolCharacteristics,
|
---|
5902 | IN UINT CharacteristicsLength);
|
---|
5903 |
|
---|
5904 | #endif /* NDIS_LEGACY_PROTOCOL */
|
---|
5905 |
|
---|
5906 | NDISAPI
|
---|
5907 | UCHAR
|
---|
5908 | NTAPI
|
---|
5909 | NdisGeneratePartialCancelId(VOID);
|
---|
5910 |
|
---|
5911 | NDISAPI
|
---|
5912 | VOID
|
---|
5913 | NTAPI
|
---|
5914 | NdisReEnumerateProtocolBindings(
|
---|
5915 | IN NDIS_HANDLE NdisProtocolHandle);
|
---|
5916 |
|
---|
5917 | NDISAPI
|
---|
5918 | VOID
|
---|
5919 | NTAPI
|
---|
5920 | NdisRegisterTdiCallBack(
|
---|
5921 | IN TDI_REGISTER_CALLBACK RegisterCallback,
|
---|
5922 | IN TDI_PNP_HANDLER PnPHandler);
|
---|
5923 |
|
---|
5924 | NDISAPI
|
---|
5925 | VOID
|
---|
5926 | NTAPI
|
---|
5927 | NdisDeregisterTdiCallBack(VOID);
|
---|
5928 |
|
---|
5929 | /* Obsoleted in Windows XP */
|
---|
5930 |
|
---|
5931 | /* Prototypes for NDIS_MAC_CHARACTERISTICS */
|
---|
5932 |
|
---|
5933 | typedef NDIS_STATUS (*OPEN_ADAPTER_HANDLER)(
|
---|
5934 | OUT PNDIS_STATUS OpenErrorStatus,
|
---|
5935 | OUT NDIS_HANDLE *MacBindingHandle,
|
---|
5936 | OUT PUINT SelectedMediumIndex,
|
---|
5937 | IN PNDIS_MEDIUM MediumArray,
|
---|
5938 | IN UINT MediumArraySize,
|
---|
5939 | IN NDIS_HANDLE NdisBindingContext,
|
---|
5940 | IN NDIS_HANDLE MacAdapterContext,
|
---|
5941 | IN UINT OpenOptions,
|
---|
5942 | IN PSTRING AddressingInformation OPTIONAL);
|
---|
5943 |
|
---|
5944 | typedef NDIS_STATUS (NTAPI *CLOSE_ADAPTER_HANDLER)(
|
---|
5945 | IN NDIS_HANDLE MacBindingHandle);
|
---|
5946 |
|
---|
5947 | typedef NDIS_STATUS (NTAPI *WAN_TRANSFER_DATA_HANDLER)(
|
---|
5948 | VOID);
|
---|
5949 |
|
---|
5950 | typedef NDIS_STATUS (NTAPI *QUERY_GLOBAL_STATISTICS_HANDLER)(
|
---|
5951 | IN NDIS_HANDLE MacAdapterContext,
|
---|
5952 | IN PNDIS_REQUEST NdisRequest);
|
---|
5953 |
|
---|
5954 | typedef VOID (NTAPI *UNLOAD_MAC_HANDLER)(
|
---|
5955 | IN NDIS_HANDLE MacMacContext);
|
---|
5956 |
|
---|
5957 | typedef NDIS_STATUS (NTAPI *ADD_ADAPTER_HANDLER)(
|
---|
5958 | IN NDIS_HANDLE MacMacContext,
|
---|
5959 | IN NDIS_HANDLE WrapperConfigurationContext,
|
---|
5960 | IN PNDIS_STRING AdapterName);
|
---|
5961 |
|
---|
5962 | typedef VOID (*REMOVE_ADAPTER_HANDLER)(
|
---|
5963 | IN NDIS_HANDLE MacAdapterContext);
|
---|
5964 |
|
---|
5965 | typedef struct _NDIS_MAC_CHARACTERISTICS {
|
---|
5966 | UCHAR MajorNdisVersion;
|
---|
5967 | UCHAR MinorNdisVersion;
|
---|
5968 | USHORT Filler;
|
---|
5969 | UINT Reserved;
|
---|
5970 | OPEN_ADAPTER_HANDLER OpenAdapterHandler;
|
---|
5971 | CLOSE_ADAPTER_HANDLER CloseAdapterHandler;
|
---|
5972 | SEND_HANDLER SendHandler;
|
---|
5973 | TRANSFER_DATA_HANDLER TransferDataHandler;
|
---|
5974 | RESET_HANDLER ResetHandler;
|
---|
5975 | REQUEST_HANDLER RequestHandler;
|
---|
5976 | QUERY_GLOBAL_STATISTICS_HANDLER QueryGlobalStatisticsHandler;
|
---|
5977 | UNLOAD_MAC_HANDLER UnloadMacHandler;
|
---|
5978 | ADD_ADAPTER_HANDLER AddAdapterHandler;
|
---|
5979 | REMOVE_ADAPTER_HANDLER RemoveAdapterHandler;
|
---|
5980 | NDIS_STRING Name;
|
---|
5981 | } NDIS_MAC_CHARACTERISTICS, *PNDIS_MAC_CHARACTERISTICS;
|
---|
5982 |
|
---|
5983 | typedef NDIS_MAC_CHARACTERISTICS NDIS_WAN_MAC_CHARACTERISTICS;
|
---|
5984 | typedef NDIS_WAN_MAC_CHARACTERISTICS *PNDIS_WAN_MAC_CHARACTERISTICS;
|
---|
5985 |
|
---|
5986 | #ifdef __cplusplus
|
---|
5987 | }
|
---|
5988 | #endif
|
---|
5989 |
|
---|
5990 | #endif /* _NDIS_ */
|
---|
5991 |
|
---|
5992 | /* EOF */
|
---|