1de5a9983ee547d756507631ca3e9037e4aad9c9
[reactos.git] / reactos / drivers / net / ndis / include / ndissys.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS NDIS library
4 * FILE: ndissys.h
5 * PURPOSE: NDIS library definitions
6 * NOTES: Spin lock acquire order:
7 * - Miniport list lock
8 * - Adapter list lock
9 */
10 #ifndef __NDISSYS_H
11 #define __NDISSYS_H
12
13 typedef unsigned long NDIS_STATS;
14
15 /* This magical flag combo seems to work. Filip should verify this */
16 #undef NDIS_WRAPPER
17 #define NDIS_LEGACY_DRIVER 1
18 #define NDIS_LEGACY_MINIPORT 1
19 #define NDIS_LEGACY_PROTOCOL 1
20 #define NDIS51_MINIPORT 1
21 #define NDIS_MINIPORT_DRIVER 1
22 #include <ndis.h>
23 #undef EXPORT
24 #include <xfilter.h>
25 #include <afilter.h>
26 #include <atm.h>
27
28 #if _MSC_VER
29 /* FIXME: These were removed and are no longer used! */
30 #define NdisWorkItemSendLoopback NdisWorkItemReserved
31 #else /* _MSC_VER */
32 /* FIXME: We miss the ATM headers. */
33 typedef struct _ATM_ADDRESS *PATM_ADDRESS;
34 #endif /* _MSC_VER */
35
36 struct _ADAPTER_BINDING;
37
38 typedef struct _NDISI_PACKET_POOL {
39 NDIS_SPIN_LOCK SpinLock;
40 struct _NDIS_PACKET *FreeList;
41 UINT PacketLength;
42 UCHAR Buffer[1];
43 } NDISI_PACKET_POOL, * PNDISI_PACKET_POOL;
44
45 #include "miniport.h"
46 #include "protocol.h"
47
48 #include <debug.h>
49
50 /* Exported functions */
51 #ifndef EXPORT
52 #define EXPORT NTAPI
53 #endif
54
55 #define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
56 #define NDIS_TAG 0x4e4d4953
57
58 #define MIN(value1, value2) \
59 ((value1 < value2)? value1 : value2)
60
61 #define MAX(value1, value2) \
62 ((value1 > value2)? value1 : value2)
63
64 #endif /* __NDISSYS_H */
65
66 /* EOF */