VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltCmn-win.h@ 62683

Last change on this file since 62683 was 62683, checked in by vboxsync, 8 years ago

Use the iprt/nt/ntddk.h wrapper for ntddk.h, eliminating duplicate ugly warning workarounds.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 19.2 KB
Line 
1/* $Id: VBoxNetFltCmn-win.h 62683 2016-07-29 13:16:22Z vboxsync $ */
2/** @file
3 * VBoxNetFltCmn-win.h - Bridged Networking Driver, Windows Specific Code.
4 * Common header with configuration defines and global defs
5 */
6
7/*
8 * Copyright (C) 2011-2016 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#ifndef ___VBoxNetFltCmn_win_h___
20#define ___VBoxNetFltCmn_win_h___
21
22#define LOG_GROUP LOG_GROUP_NET_FLT_DRV
23
24/* debugging flags */
25#ifdef DEBUG
26//# define DEBUG_NETFLT_PACKETS
27# ifndef DEBUG_misha
28# define RT_NO_STRICT
29# endif
30/* # define DEBUG_NETFLT_LOOPBACK */
31/* receive logic has several branches */
32/* the DEBUG_NETFLT_RECV* macros used to debug the ProtocolReceive callback
33 * which is typically not used in case the underlying miniport indicates the packets with NdisMIndicateReceivePacket
34 * the best way to debug the ProtocolReceive (which in turn has several branches) is to enable the DEBUG_NETFLT_RECV
35 * one by one in the below order, i.e.
36 * first DEBUG_NETFLT_RECV
37 * then DEBUG_NETFLT_RECV + DEBUG_NETFLT_RECV_NOPACKET */
38//# define DEBUG_NETFLT_RECV
39//# define DEBUG_NETFLT_RECV_NOPACKET
40//# define DEBUG_NETFLT_RECV_TRANSFERDATA
41/* use ExAllocatePoolWithTag instead of NdisAllocateMemoryWithTag */
42// #define DEBUG_NETFLT_USE_EXALLOC
43#endif
44
45#include <VBox/intnet.h>
46#include <VBox/log.h>
47#include <VBox/err.h>
48#include <VBox/version.h>
49#include <iprt/initterm.h>
50#include <iprt/assert.h>
51#include <iprt/spinlock.h>
52#include <iprt/semaphore.h>
53#include <iprt/process.h>
54#include <iprt/alloc.h>
55#include <iprt/alloca.h>
56#include <iprt/time.h>
57#include <iprt/net.h>
58#include <iprt/list.h>
59
60#include <iprt/nt/ntddk.h>
61#include <iprt/nt/ndis.h>
62
63#define VBOXNETFLT_OS_SPECFIC 1
64
65/** version
66 * NOTE: we are NOT using NDIS 5.1 features now */
67#ifdef NDIS51_MINIPORT
68# define VBOXNETFLT_VERSION_MP_NDIS_MAJOR 5
69# define VBOXNETFLT_VERSION_MP_NDIS_MINOR 1
70#else
71# define VBOXNETFLT_VERSION_MP_NDIS_MAJOR 5
72# define VBOXNETFLT_VERSION_MP_NDIS_MINOR 0
73#endif
74
75#ifndef VBOXNETADP
76#ifdef NDIS51
77# define VBOXNETFLT_VERSION_PT_NDIS_MAJOR 5
78# define VBOXNETFLT_VERSION_PT_NDIS_MINOR 1 /* todo: use 0 here as well ? */
79#else
80# define VBOXNETFLT_VERSION_PT_NDIS_MAJOR 5
81# define VBOXNETFLT_VERSION_PT_NDIS_MINOR 0
82#endif
83
84# define VBOXNETFLT_NAME_PROTOCOL L"VBoxNetFlt"
85/** device to be used to prevent the driver unload & ioctl interface (if necessary in the future) */
86# define VBOXNETFLT_NAME_LINK L"\\DosDevices\\Global\\VBoxNetFlt"
87# define VBOXNETFLT_NAME_DEVICE L"\\Device\\VBoxNetFlt"
88#else
89# define VBOXNETFLT_NAME_LINK L"\\DosDevices\\Global\\VBoxNetAdp"
90# define VBOXNETFLT_NAME_DEVICE L"\\Device\\VBoxNetAdp"
91#endif
92
93typedef struct VBOXNETFLTINS *PVBOXNETFLTINS;
94
95/** configuration */
96
97/** Ndis Packet pool settings
98 * these are applied to both receive and send packet pools */
99/* number of packets for normal used */
100#define VBOXNETFLT_PACKET_POOL_SIZE_NORMAL 0x000000FF
101/* number of additional overflow packets */
102#define VBOXNETFLT_PACKET_POOL_SIZE_OVERFLOW 0x0000FF00
103
104/** packet queue size used when the driver is working in the "active" mode */
105#define VBOXNETFLT_PACKET_INFO_POOL_SIZE 0x0000FFFF
106
107#ifndef VBOXNETADP
108/** memory tag used for memory allocations
109 * (VBNF stands for VBox NetFlt) */
110# define VBOXNETFLT_MEM_TAG 'FNBV'
111#else
112/** memory tag used for memory allocations
113 * (VBNA stands for VBox NetAdp) */
114# define VBOXNETFLT_MEM_TAG 'ANBV'
115#endif
116
117/** receive and transmit Ndis buffer pool size */
118#define VBOXNETFLT_BUFFER_POOL_SIZE_TX 128
119#define VBOXNETFLT_BUFFER_POOL_SIZE_RX 128
120
121#define VBOXNETFLT_PACKET_ETHEADER_SIZE 14
122#define VBOXNETFLT_PACKET_HEADER_MATCH_SIZE 24
123#define VBOXNETFLT_PACKET_QUEUE_SG_SEGS_ALLOC 32
124
125
126#if defined(DEBUG_NETFLT_PACKETS) || !defined(VBOX_LOOPBACK_USEFLAGS)
127# define VBOXNETFLT_PACKETMATCH_LENGTH (VBOXNETFLT_PACKET_ETHEADER_SIZE + 2)
128#endif
129
130#ifdef VBOXNETADP
131#define VBOXNETADP_HEADER_SIZE 14
132#define VBOXNETADP_MAX_DATA_SIZE 1500
133#define VBOXNETADP_MAX_PACKET_SIZE (VBOXNETADP_HEADER_SIZE + VBOXNETADP_MAX_DATA_SIZE)
134#define VBOXNETADP_MIN_PACKET_SIZE 60
135/* link speed 100Mbps (measured in 100 bps) */
136#define VBOXNETADP_LINK_SPEED 1000000
137#define VBOXNETADP_MAX_LOOKAHEAD_SIZE VBOXNETADP_MAX_DATA_SIZE
138#define VBOXNETADP_VENDOR_ID 0x080027
139#define VBOXNETADP_VENDOR_DRIVER_VERSION 0x00010000
140#define VBOXNETADP_VENDOR_DESC "Sun"
141#define VBOXNETADP_MAX_MCAST_LIST 32
142#define VBOXNETADP_ETH_ADDRESS_LENGTH 6
143
144//#define VBOXNETADP_REPORT_DISCONNECTED
145#endif
146/* type defs */
147
148/** Flag specifying that the type of enqueued packet
149 * if set the info contains the PINTNETSG packet
150 * if clear the packet info contains the PNDIS_PACKET packet
151 * Typically the packet queue we are maintaining contains PNDIS_PACKETs only,
152 * however in case the underlying miniport indicates a packet with the NDIS_STATUS_RESOURCES status
153 * we MUST return the packet back to the miniport immediately
154 * this is why we are creating the INTNETSG, copying the ndis packet info there and enqueueing it */
155#define VBOXNETFLT_PACKET_SG 0x00000001
156
157/** the flag specifying that the packet source
158 * if set the packet comes from the host (upperlying protocol)
159 * if clear the packet comes from the wire (underlying miniport) */
160#define VBOXNETFLT_PACKET_SRC_HOST 0x00000002
161
162#ifndef VBOXNETFLT_NO_PACKET_QUEUE
163/** flag specifying the packet was originated by our driver
164 * i.e. we could use it on our needs and should not return it
165 * we are enqueueing "our" packets on ProtocolReceive call-back when
166 * Ndis does not give us a receive packet (the driver below us has called NdisM..IndicateReceive)
167 * this is supported for Ndis Packet only */
168#define VBOXNETFLT_PACKET_MINE 0x00000004
169
170/** flag passed to vboxNetFltWinQuEnqueuePacket specifying that the packet should be copied
171 * this is supported for Ndis Packet only */
172#define VBOXNETFLT_PACKET_COPY 0x00000008
173#endif
174
175/** packet queue element containing the packet info */
176typedef struct VBOXNETFLT_PACKET_INFO
177{
178 /** list entry used for enqueueing the info */
179 LIST_ENTRY ListEntry;
180 /** pointer to the pool containing this packet info */
181 struct VBOXNETFLT_PACKET_INFO_POOL *pPool;
182 /** flags describing the referenced packet. Contains PACKET_xxx flags (i.e. PACKET_SG, PACKET_SRC_HOST) */
183 uint32_t fFlags;
184 /** pointer to the packet this info represents */
185 PVOID pPacket;
186} VBOXNETFLT_PACKET_INFO, *PVBOXNETFLT_PACKET_INFO;
187
188/* paranoid check to make sure the elements in the packet info array are properly aligned */
189AssertCompile((sizeof(VBOXNETFLT_PACKET_INFO) & (sizeof(PVOID) - 1)) == 0);
190
191/** represents the packet queue */
192typedef LIST_ENTRY PVBOXNETFLT_ACKET_QUEUE, *PVBOXNETFLT_PACKET_QUEUE;
193
194/*
195 * we are using non-interlocked versions of LIST_ENTRY-related operations macros and synchronize
196 * access to the queue and its elements by acquiring/releasing a spinlock using Ndis[Acquire,Release]Spinlock
197 *
198 * we are NOT using interlocked versions of insert/remove head/tail list functions because we need to iterate though
199 * the queue elements as well as remove elements from the midle of the queue
200 *
201 * * @todo: it seems that we can switch to using interlocked versions of list-entry functions
202 * since we have removed all functionality (mentioned above, i.e. queue elements iteration, etc.) that might prevent us from doing this
203 */
204typedef struct VBOXNETFLT_INTERLOCKED_PACKET_QUEUE
205{
206 /** queue */
207 PVBOXNETFLT_ACKET_QUEUE Queue;
208 /** queue lock */
209 NDIS_SPIN_LOCK Lock;
210} VBOXNETFLT_INTERLOCKED_PACKET_QUEUE, *PVBOXNETFLT_INTERLOCKED_PACKET_QUEUE;
211
212typedef struct VBOXNETFLT_SINGLE_LIST
213{
214 /** queue */
215 SINGLE_LIST_ENTRY Head;
216 /** pointer to the list tail. used to enqueue elements to the tail of the list */
217 PSINGLE_LIST_ENTRY pTail;
218} VBOXNETFLT_SINGLE_LIST, *PVBOXNETFLT_SINGLE_LIST;
219
220typedef struct VBOXNETFLT_INTERLOCKED_SINGLE_LIST
221{
222 /** queue */
223 VBOXNETFLT_SINGLE_LIST List;
224 /** queue lock */
225 NDIS_SPIN_LOCK Lock;
226} VBOXNETFLT_INTERLOCKED_SINGLE_LIST, *PVBOXNETFLT_INTERLOCKED_SINGLE_LIST;
227
228/** packet info pool contains free packet info elements to be used for the packet queue
229 * we are using the pool mechanism to allocate packet queue elements
230 * the pool mechanism is pretty simple now, we are allocating a bunch of memory
231 * for maintaining VBOXNETFLT_PACKET_INFO_POOL_SIZE queue elements and just returning null when the pool is exhausted
232 * This mechanism seems to be enough for now since we are using VBOXNETFLT_PACKET_INFO_POOL_SIZE = 0xffff which is
233 * the maximum size of packets the ndis packet pool supports */
234typedef struct VBOXNETFLT_PACKET_INFO_POOL
235{
236 /** free packet info queue */
237 VBOXNETFLT_INTERLOCKED_PACKET_QUEUE Queue;
238 /** memory bugger used by the pool */
239 PVOID pBuffer;
240} VBOXNETFLT_PACKET_INFO_POOL, *PVBOXNETFLT_PACKET_INFO_POOL;
241
242typedef enum VBOXNETDEVOPSTATE
243{
244 kVBoxNetDevOpState_InvalidValue = 0,
245 kVBoxNetDevOpState_Initializing,
246 kVBoxNetDevOpState_Initialized,
247 kVBoxNetDevOpState_Deinitializing,
248 kVBoxNetDevOpState_Deinitialized,
249
250} VBOXNETDEVOPSTATE;
251
252typedef enum VBOXNETFLT_WINIFSTATE
253{
254 /** The usual invalid state. */
255 kVBoxWinIfState_Invalid = 0,
256 /** Initialization. */
257 kVBoxWinIfState_Connecting,
258 /** Connected fuly functional state */
259 kVBoxWinIfState_Connected,
260 /** Disconnecting */
261 kVBoxWinIfState_Disconnecting,
262 /** Disconnected */
263 kVBoxWinIfState_Disconnected,
264} VBOXNETFLT_WINIFSTATE;
265
266/** structure used to maintain the state and reference count of the miniport and protocol */
267typedef struct VBOXNETFLT_WINIF_DEVICE
268{
269 /** initialize state */
270 VBOXNETDEVOPSTATE OpState;
271 /** ndis power state */
272 NDIS_DEVICE_POWER_STATE PowerState;
273 /** reference count */
274 uint32_t cReferences;
275} VBOXNETFLT_WINIF_DEVICE, *PVBOXNETFLT_WINIF_DEVICE;
276
277#define VBOXNDISREQUEST_INPROGRESS 1
278#define VBOXNDISREQUEST_QUEUED 2
279
280typedef struct VBOXNETFLTWIN_STATE
281{
282 union
283 {
284 struct
285 {
286 UINT fRequestInfo : 2;
287 UINT fInterfaceClosing : 1;
288 UINT fStandBy : 1;
289 UINT fProcessingPacketFilter : 1;
290 UINT fPPFNetFlt : 1;
291 UINT fUpperProtSetFilterInitialized : 1;
292 UINT Reserved : 25;
293 };
294 UINT Value;
295 };
296} VBOXNETFLTWIN_STATE, *PVBOXNETFLTWIN_STATE;
297
298DECLINLINE(VBOXNETFLTWIN_STATE) vboxNetFltWinAtomicUoReadWinState(VBOXNETFLTWIN_STATE State)
299{
300 UINT fValue = ASMAtomicUoReadU32((volatile uint32_t *)&State.Value);
301 return *((PVBOXNETFLTWIN_STATE)((void*)&fValue));
302}
303
304/* miniport layer globals */
305typedef struct VBOXNETFLTGLOBALS_MP
306{
307 /** our miniport handle */
308 NDIS_HANDLE hMiniport;
309 /** ddis wrapper handle */
310 NDIS_HANDLE hNdisWrapper;
311} VBOXNETFLTGLOBALS_MP, *PVBOXNETFLTGLOBALS_MP;
312
313#ifndef VBOXNETADP
314/* protocol layer globals */
315typedef struct VBOXNETFLTGLOBALS_PT
316{
317 /** our protocol handle */
318 NDIS_HANDLE hProtocol;
319} VBOXNETFLTGLOBALS_PT, *PVBOXNETFLTGLOBALS_PT;
320#endif /* #ifndef VBOXNETADP */
321
322typedef struct VBOXNETFLTGLOBALS_WIN
323{
324 /** synch event used for device creation synchronization */
325 KEVENT SynchEvent;
326 /** Device reference count */
327 int cDeviceRefs;
328 /** ndis device */
329 NDIS_HANDLE hDevice;
330 /** device object */
331 PDEVICE_OBJECT pDevObj;
332 /* loopback flags */
333 /* ndis packet flags to disable packet loopback */
334 UINT fPacketDontLoopBack;
335 /* ndis packet flags specifying whether the packet is looped back */
336 UINT fPacketIsLoopedBack;
337 /* Minport info */
338 VBOXNETFLTGLOBALS_MP Mp;
339#ifndef VBOXNETADP
340 /* Protocol info */
341 VBOXNETFLTGLOBALS_PT Pt;
342 /** lock protecting the filter list */
343 NDIS_SPIN_LOCK lockFilters;
344 /** the head of filter list */
345 RTLISTANCHOR listFilters;
346 /** IP address change notifier handle */
347 HANDLE hNotifier;
348#endif
349} VBOXNETFLTGLOBALS_WIN, *PVBOXNETFLTGLOBALS_WIN;
350
351extern VBOXNETFLTGLOBALS_WIN g_VBoxNetFltGlobalsWin;
352
353/** represents filter driver device context*/
354typedef struct VBOXNETFLTWIN
355{
356 /** handle used by miniport edge for ndis calls */
357 NDIS_HANDLE hMiniport;
358 /** miniport edge state */
359 VBOXNETFLT_WINIF_DEVICE MpState;
360 /** ndis packet pool used for receives */
361 NDIS_HANDLE hRecvPacketPool;
362 /** ndis buffer pool used for receives */
363 NDIS_HANDLE hRecvBufferPool;
364 /** driver bind adapter state. */
365 VBOXNETFLT_WINIFSTATE enmState;
366#ifndef VBOXNETADP
367 /* misc state flags */
368 VBOXNETFLTWIN_STATE StateFlags;
369 /** handle used by protocol edge for ndis calls */
370 NDIS_HANDLE hBinding;
371 /** protocol edge state */
372 VBOXNETFLT_WINIF_DEVICE PtState;
373 /** ndis packet pool used for receives */
374 NDIS_HANDLE hSendPacketPool;
375 /** ndis buffer pool used for receives */
376 NDIS_HANDLE hSendBufferPool;
377 /** used for maintaining the pending send packets for handling packet loopback */
378 VBOXNETFLT_INTERLOCKED_SINGLE_LIST SendPacketQueue;
379 /** used for serializing calls to the NdisRequest in the vboxNetFltWinSynchNdisRequest */
380 RTSEMFASTMUTEX hSynchRequestMutex;
381 /** event used to synchronize with the Ndis Request completion in the vboxNetFltWinSynchNdisRequest */
382 KEVENT hSynchCompletionEvent;
383 /** status of the Ndis Request initiated by the vboxNetFltWinSynchNdisRequest */
384 NDIS_STATUS volatile SynchCompletionStatus;
385 /** pointer to the Ndis Request being executed by the vboxNetFltWinSynchNdisRequest */
386 PNDIS_REQUEST volatile pSynchRequest;
387 /** open/close adapter status.
388 * Since ndis adapter open and close requests may complete asynchronously,
389 * we are using event mechanism to wait for open/close completion
390 * the status field is being set by the completion call-back */
391 NDIS_STATUS OpenCloseStatus;
392 /** open/close adaptor completion event */
393 NDIS_EVENT OpenCloseEvent;
394 /** medium we are attached to */
395 NDIS_MEDIUM enmMedium;
396 /**
397 * Passdown request info
398 */
399 /** ndis request we pass down to the miniport below */
400 NDIS_REQUEST PassDownRequest;
401 /** Ndis pass down request bytes read or written original pointer */
402 PULONG pcPDRBytesRW;
403 /** Ndis pass down request bytes needed original pointer */
404 PULONG pcPDRBytesNeeded;
405 /** true if we should indicate the receive complete used by the ProtocolReceive mechanism.
406 * We need to indicate it only with the ProtocolReceive + NdisMEthIndicateReceive path.
407 * Note: we're using KeGetCurrentProcessorNumber, which is not entirely correct in case
408 * we're running on 64bit win7+, which can handle > 64 CPUs, however since KeGetCurrentProcessorNumber
409 * always returns the number < than the number of CPUs in the first group, we're guaranteed to have CPU index < 64
410 * @todo: use KeGetCurrentProcessorNumberEx for Win7+ 64 and dynamically extended array */
411 bool abIndicateRxComplete[64];
412 /** Pending transfer data packet queue (i.e. packets that were indicated as pending on NdisTransferData call */
413 VBOXNETFLT_INTERLOCKED_SINGLE_LIST TransferDataList;
414 /* mac options initialized on OID_GEN_MAC_OPTIONS */
415 ULONG fMacOptions;
416 /** our miniport devuice name */
417 NDIS_STRING MpDeviceName;
418 /** synchronize with unbind with Miniport initialization */
419 NDIS_EVENT MpInitCompleteEvent;
420 /** media connect status that we indicated */
421 NDIS_STATUS MpIndicatedMediaStatus;
422 /** media connect status pending to indicate */
423 NDIS_STATUS MpUnindicatedMediaStatus;
424 /** packet filter flags set by the upper protocols */
425 ULONG fUpperProtocolSetFilter;
426 /** packet filter flags set by the upper protocols */
427 ULONG fSetFilterBuffer;
428 /** packet filter flags set by us */
429 ULONG fOurSetFilter;
430 /** our own list of filters, needed by notifier */
431 RTLISTNODE node;
432#else
433 volatile ULONG cTxSuccess;
434 volatile ULONG cRxSuccess;
435 volatile ULONG cTxError;
436 volatile ULONG cRxError;
437#endif
438} VBOXNETFLTWIN, *PVBOXNETFLTWIN;
439
440typedef struct VBOXNETFLT_PACKET_QUEUE_WORKER
441{
442 /** this event is used to initiate a packet queue worker thread kill */
443 KEVENT KillEvent;
444 /** this event is used to notify a worker thread that the packets are added to the queue */
445 KEVENT NotifyEvent;
446 /** pointer to the packet queue worker thread object */
447 PKTHREAD pThread;
448 /** pointer to the SG used by the packet queue for IntNet receive notifications */
449 PINTNETSG pSG;
450 /** Packet queue */
451 VBOXNETFLT_INTERLOCKED_PACKET_QUEUE PacketQueue;
452 /** Packet info pool, i.e. the pool for the packet queue elements */
453 VBOXNETFLT_PACKET_INFO_POOL PacketInfoPool;
454} VBOXNETFLT_PACKET_QUEUE_WORKER, *PVBOXNETFLT_PACKET_QUEUE_WORKER;
455
456/* protocol reserved data held in ndis packet */
457typedef struct VBOXNETFLT_PKTRSVD_PT
458{
459 /** original packet received from the upperlying protocol
460 * can be null if the packet was originated by intnet */
461 PNDIS_PACKET pOrigPacket;
462 /** pointer to the buffer to be freed on send completion
463 * can be null if no buffer is to be freed */
464 PVOID pBufToFree;
465#if !defined(VBOX_LOOPBACK_USEFLAGS) || defined(DEBUG_NETFLT_PACKETS)
466 SINGLE_LIST_ENTRY ListEntry;
467 /* true if the packet is from IntNet */
468 bool bFromIntNet;
469#endif
470} VBOXNETFLT_PKTRSVD_PT, *PVBOXNETFLT_PKTRSVD_PT;
471
472/** miniport reserved data held in ndis packet */
473typedef struct VBOXNETFLT_PKTRSVD_MP
474{
475 /** original packet received from the underling miniport
476 * can be null if the packet was originated by intnet */
477 PNDIS_PACKET pOrigPacket;
478 /** pointer to the buffer to be freed on receive completion
479 * can be null if no buffer is to be freed */
480 PVOID pBufToFree;
481} VBOXNETFLT_PKTRSVD_MP, *PVBOXNETFLT_PKTRSVD_MP;
482
483/** represents the data stored in the protocol reserved field of ndis packet on NdisTransferData processing */
484typedef struct VBOXNETFLT_PKTRSVD_TRANSFERDATA_PT
485{
486 /** next packet in a list */
487 SINGLE_LIST_ENTRY ListEntry;
488 /* packet buffer start */
489 PNDIS_BUFFER pOrigBuffer;
490} VBOXNETFLT_PKTRSVD_TRANSFERDATA_PT, *PVBOXNETFLT_PKTRSVD_TRANSFERDATA_PT;
491
492/* VBOXNETFLT_PKTRSVD_TRANSFERDATA_PT should fit into PROTOCOL_RESERVED_SIZE_IN_PACKET because we use protocol reserved part
493 * of our miniport edge on transfer data processing for honding our own info */
494AssertCompile(sizeof (VBOXNETFLT_PKTRSVD_TRANSFERDATA_PT) <= PROTOCOL_RESERVED_SIZE_IN_PACKET);
495/* this should fit in MiniportReserved */
496AssertCompile(sizeof (VBOXNETFLT_PKTRSVD_MP) <= RT_SIZEOFMEMB(NDIS_PACKET, MiniportReserved));
497/* we use RTAsmAtomic*U32 for those, make sure we're correct */
498AssertCompile(sizeof (NDIS_DEVICE_POWER_STATE) == sizeof (uint32_t));
499AssertCompile(sizeof (UINT) == sizeof (uint32_t));
500
501
502#define NDIS_FLAGS_SKIP_LOOPBACK_W2K 0x400
503
504#include "../../VBoxNetFltInternal.h"
505#include "VBoxNetFltRt-win.h"
506#ifndef VBOXNETADP
507# include "VBoxNetFltP-win.h"
508#endif
509#include "VBoxNetFltM-win.h"
510
511#endif /* #ifndef ___VBoxNetFltCmn_win_h___ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette