5303aadf2a4a7663c5c94b4f98905866e8f5c127
[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 #include <ndis.h>
15 #include <xfilter.h>
16 #include <afilter.h>
17
18 #if _MSC_VER
19 /* FIXME: These were removed and are no longer used! */
20 #define NdisWorkItemSendLoopback NdisWorkItemReserved
21 #else /* _MSC_VER */
22 /* FIXME: We miss the ATM headers. */
23 typedef struct _ATM_ADDRESS *PATM_ADDRESS;
24 #endif /* _MSC_VER */
25
26 /* FIXME: This should go away once NDK will be compatible with MS DDK headers. */
27 #if _MSC_VER
28 NTSTATUS NTAPI ZwDuplicateObject(IN HANDLE, IN HANDLE, IN HANDLE, OUT PHANDLE, IN ACCESS_MASK, IN ULONG, IN ULONG);
29 #else
30 #include <ndk/ntndk.h>
31 #endif
32
33 struct _ADAPTER_BINDING;
34
35 typedef struct _NDISI_PACKET_POOL {
36 NDIS_SPIN_LOCK SpinLock;
37 struct _NDIS_PACKET *FreeList;
38 UINT PacketLength;
39 UCHAR Buffer[1];
40 } NDISI_PACKET_POOL, * PNDISI_PACKET_POOL;
41
42 #include "miniport.h"
43 #include "protocol.h"
44
45 #include <debug.h>
46
47 /* Exported functions */
48 #ifndef EXPORT
49 #define EXPORT NTAPI
50 #endif
51
52 #define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
53 #define NDIS_TAG 0x4e4d4953
54
55 #define MIN(value1, value2) \
56 ((value1 < value2)? value1 : value2)
57
58 #define MAX(value1, value2) \
59 ((value1 > value2)? value1 : value2)
60
61 #endif /* __NDISSYS_H */
62
63 /* EOF */