ReactOS 0.4.16-dev-334-g4d9f67c
ndisuio.h
Go to the documentation of this file.
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
8#ifndef __NDISUIO_H
9#define __NDISUIO_H
10
11#include <ndis.h>
12#include <nuiouser.h>
13
18
20{
21 /* Asynchronous completion */
24
25 /* NDIS binding information */
27
28 /* Reference count information */
31
32 /* NDIS pools */
35
36 /* Receive packet list */
39
40 /* Mac options */
42
43 /* Device name */
45
46 /* Global list entry */
48
49 /* Spin lock */
52
53typedef struct _NDISUIO_OPEN_ENTRY
54{
55 /* File object */
57
58 /* Tracks how this adapter was opened (write-only or read-write) */
60
61 /* List entry */
64
66{
67 /* Length of data at the end of the struct */
69
70 /* Entry on the packet list */
72
73 /* Packet data */
76
77/* NDIS version info */
78#define NDIS_MAJOR_VERSION 5
79#define NDIS_MINOR_VERSION 0
80
81/* createclose.c */
85 PIRP Irp);
86
90 PIRP Irp);
91
92/* ioctl.c */
96 PIRP Irp);
97
98/* misc.c */
104 BOOLEAN Front);
105
110
111VOID
114
117
118VOID
120
121VOID
123 PNDISUIO_OPEN_ENTRY OpenEntry);
124
125/* protocol.c */
126VOID
127NTAPI
131
132VOID
133NTAPI
136
138NTAPI
141
142VOID
143NTAPI
147
148VOID
149NTAPI
154
155VOID
156NTAPI
159
160VOID
161NTAPI
165
167NTAPI
169 NDIS_HANDLE MacReceiveContext,
170 PVOID HeaderBuffer,
171 UINT HeaderBufferSize,
172 PVOID LookAheadBuffer,
173 UINT LookaheadBufferSize,
175
176VOID
177NTAPI
179
180VOID
181NTAPI
186
187VOID
188NTAPI
190
191VOID
192NTAPI
194 NDIS_HANDLE BindContext,
196 PVOID SystemSpecific1,
198
199VOID
200NTAPI
203 NDIS_HANDLE UnbindContext);
204
205/* readwrite.c */
207NTAPI
209 PIRP Irp);
210
212NTAPI
214 PIRP Irp);
215
216#endif /* __NDISUIO_H */
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
Definition: bufpool.h:45
_In_ PIRP Irp
Definition: csq.h:116
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
Status
Definition: gdiplustypes.h:25
#define FreePool(P)
Definition: mntmgr.h:154
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1549
_In_ PVOID _In_ PVOID SystemSpecific2
Definition: ndis.h:638
unsigned int UINT
Definition: ndis.h:50
_In_opt_ NDIS_HANDLE _In_ NDIS_STATUS _In_ PVOID _In_ UINT StatusBufferSize
Definition: ndis.h:1558
_In_ NDIS_HANDLE _In_ PNET_PNP_EVENT NetPnPEvent
Definition: ndis.h:6082
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT _In_ NDIS_HANDLE _In_ NDIS_HANDLE ProtocolBindingContext
Definition: ndis.h:6015
_In_opt_ NDIS_HANDLE _In_ NDIS_STATUS _In_ PVOID StatusBuffer
Definition: ndis.h:1557
* PNDIS_STATUS
Definition: ndis.h:45
_In_opt_ NDIS_HANDLE _In_opt_ NDIS_HANDLE _Inout_ PNDIS_REQUEST NdisRequest
Definition: ndis.h:1573
_In_ NDIS_STATUS _In_ NDIS_STATUS OpenStatus
Definition: ndis.h:6035
_In_opt_ NDIS_HANDLE _In_ NDIS_STATUS GeneralStatus
Definition: ndis.h:1556
VOID NTAPI NduResetComplete(NDIS_HANDLE ProtocolBindingContext, NDIS_STATUS Status)
Definition: protocol.c:137
NDIS_STATUS NTAPI NduReceive(NDIS_HANDLE ProtocolBindingContext, NDIS_HANDLE MacReceiveContext, PVOID HeaderBuffer, UINT HeaderBufferSize, PVOID LookAheadBuffer, UINT LookaheadBufferSize, UINT PacketSize)
Definition: protocol.c:166
struct _NDISUIO_OPEN_ENTRY NDISUIO_OPEN_ENTRY
struct _NDISUIO_ADAPTER_CONTEXT * PNDISUIO_ADAPTER_CONTEXT
VOID NTAPI NduStatus(NDIS_HANDLE ProtocolBindingContext, NDIS_STATUS GeneralStatus, PVOID StatusBuffer, UINT StatusBufferSize)
Definition: protocol.c:282
VOID DereferenceAdapterContextWithOpenEntry(PNDISUIO_ADAPTER_CONTEXT AdapterContext, PNDISUIO_OPEN_ENTRY OpenEntry)
Definition: misc.c:149
NTSTATUS NTAPI NduDispatchDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: ioctl.c:469
VOID NTAPI NduOpenAdapterComplete(NDIS_HANDLE ProtocolBindingContext, NDIS_STATUS Status, NDIS_STATUS OpenStatus)
Definition: protocol.c:16
struct _NDISUIO_ADAPTER_CONTEXT NDISUIO_ADAPTER_CONTEXT
NTSTATUS NTAPI NduDispatchWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: readwrite.c:158
VOID NTAPI NduCloseAdapterComplete(NDIS_HANDLE ProtocolBindingContext, NDIS_STATUS Status)
Definition: protocol.c:31
NDIS_STATUS AllocateAndChainBuffer(PNDISUIO_ADAPTER_CONTEXT AdapterContext, PNDIS_PACKET Packet, PVOID Buffer, ULONG BufferSize, BOOLEAN Front)
Definition: misc.c:15
struct _NDISUIO_PACKET_ENTRY * PNDISUIO_PACKET_ENTRY
VOID NTAPI NduTransferDataComplete(NDIS_HANDLE ProtocolBindingContext, PNDIS_PACKET Packet, NDIS_STATUS Status, UINT BytesTransferred)
Definition: protocol.c:121
PNDISUIO_ADAPTER_CONTEXT FindAdapterContextByName(PNDIS_STRING DeviceName)
Definition: misc.c:115
NTSTATUS NTAPI NduDispatchClose(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: createclose.c:40
struct _NDISUIO_PACKET_ENTRY NDISUIO_PACKET_ENTRY
PNDIS_PACKET CreatePacketFromPoolBuffer(PNDISUIO_ADAPTER_CONTEXT AdapterContext, PVOID Buffer, ULONG BufferSize)
Definition: misc.c:52
NDIS_HANDLE GlobalProtocolHandle
Definition: main.c:15
VOID NTAPI NduReceiveComplete(NDIS_HANDLE ProtocolBindingContext)
Definition: protocol.c:275
VOID NTAPI NduUnbindAdapter(PNDIS_STATUS Status, NDIS_HANDLE ProtocolBindingContext, NDIS_HANDLE UnbindContext)
Definition: protocol.c:550
NTSTATUS NTAPI NduDispatchCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: createclose.c:16
NDIS_STATUS NTAPI NduNetPnPEvent(NDIS_HANDLE ProtocolBindingContext, PNET_PNP_EVENT NetPnPEvent)
Definition: protocol.c:45
NTSTATUS NTAPI NduDispatchRead(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: readwrite.c:42
VOID ReferenceAdapterContext(PNDISUIO_ADAPTER_CONTEXT AdapterContext)
Definition: misc.c:142
LIST_ENTRY GlobalAdapterList
Definition: main.c:17
VOID CleanupAndFreePacket(PNDIS_PACKET Packet, BOOLEAN FreePool)
Definition: misc.c:83
struct _NDISUIO_OPEN_ENTRY * PNDISUIO_OPEN_ENTRY
VOID NTAPI NduBindAdapter(PNDIS_STATUS Status, NDIS_HANDLE BindContext, PNDIS_STRING DeviceName, PVOID SystemSpecific1, PVOID SystemSpecific2)
Definition: protocol.c:538
KSPIN_LOCK GlobalAdapterListLock
Definition: main.c:16
PDEVICE_OBJECT GlobalDeviceObject
Definition: main.c:14
VOID NTAPI NduRequestComplete(NDIS_HANDLE ProtocolBindingContext, PNDIS_REQUEST NdisRequest, NDIS_STATUS Status)
Definition: protocol.c:151
VOID NTAPI NduSendComplete(NDIS_HANDLE ProtocolBindingContext, PNDIS_PACKET Packet, NDIS_STATUS Status)
Definition: protocol.c:106
VOID NTAPI NduStatusComplete(NDIS_HANDLE ProtocolBindingContext)
Definition: protocol.c:292
int NDIS_STATUS
Definition: ntddndis.h:475
Definition: typedefs.h:120
LIST_ENTRY OpenEntryList
Definition: ndisuio.h:30
NDIS_STATUS AsyncStatus
Definition: ndisuio.h:22
LIST_ENTRY PacketList
Definition: ndisuio.h:37
NDIS_HANDLE PacketPoolHandle
Definition: ndisuio.h:33
KSPIN_LOCK Spinlock
Definition: ndisuio.h:50
LIST_ENTRY ListEntry
Definition: ndisuio.h:47
NDIS_HANDLE BufferPoolHandle
Definition: ndisuio.h:34
UNICODE_STRING DeviceName
Definition: ndisuio.h:44
NDIS_HANDLE BindingHandle
Definition: ndisuio.h:26
Definition: ndisuio.h:54
BOOLEAN WriteOnly
Definition: ndisuio.h:59
LIST_ENTRY ListEntry
Definition: ndisuio.h:62
PFILE_OBJECT FileObject
Definition: ndisuio.h:56
Definition: ndisuio.h:66
UCHAR PacketData[1]
Definition: ndisuio.h:74
LIST_ENTRY ListEntry
Definition: ndisuio.h:71
ULONG PacketLength
Definition: ndisuio.h:68
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG
Definition: typedefs.h:59
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR _Out_opt_ PULONG BytesTransferred
Definition: wdfusb.h:1342
_In_ USHORT PacketSize
Definition: iofuncs.h:1058
* PFILE_OBJECT
Definition: iotypes.h:1998
unsigned char UCHAR
Definition: xmlstorage.h:181