43e9179086d986375efe2db44629271b1d978c0c
[reactos.git] / drivers / network / ndisuio / ndisuio.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS NDIS User I/O driver
4 * FILE: ndisuio.h
5 * PURPOSE: NDISUIO definitions
6 */
7 #ifndef __NDISUIO_H
8 #define __NDISUIO_H
9
10 #include <wdm.h>
11 #include <ndis.h>
12 //#include <nuiouser.h>
13 #include <ndistapi.h>
14 #include <ndisguid.h>
15
16 struct _NDISUIO_ADAPTER_CONTEXT
17 {
18 /* Asynchronous completion */
19 NDIS_STATUS AsyncStatus;
20 KEVENT AsyncEvent;
21
22 /* NDIS binding information */
23 NDIS_HANDLE BindingHandle;
24
25 /* Reference count information */
26 ULONG OpenCount;
27 LIST_ENTRY OpenEntryList;
28
29 /* Receive packet list */
30 LIST_ENTRY PacketList;
31 KEVENT PacketReadEvent;
32
33 /* Global list entry */
34 LIST_ENTRY ListEntry;
35
36 /* Spin lock */
37 KSPIN_LOCK Spinlock;
38 } NDISUIO_ADAPTER_CONTEXT, *PNDISUIO_ADAPTER_CONTEXT;
39
40 struct _NDISUIO_OPEN_ENTRY
41 {
42 /* File object */
43 PFILE_OBJECT FileObject;
44
45 /* Tracks how this adapter was opened (write-only or read-write) */
46 BOOLEAN WriteOnly;
47
48 /* List entry */
49 LIST_ENTRY ListEntry;
50 } NDISUIO_OPEN_ENTRY, *PNDISUIO_OPEN_ENTRY;
51
52 struct _NDISUIO_PACKET_ENTRY
53 {
54 /* Length of data at the end of the struct */
55 ULONG PacketLength;
56
57 /* Entry on the packet list */
58 LIST_ENTRY ListEntry;
59
60 /* Packet data */
61 UCHAR PacketData[1];
62 } NDISUIO_PACKET_ENTRY, *PNDISUIO_PACKET_ENTRY;
63
64 /* NDIS version info */
65 #define NDIS_MAJOR_VERISON 5
66 #define NDIS_MINOR_VERSION 0
67
68 #endif /* __NDISUIO_H */