11#define NDIS_VERSION_MAJOR 4
12#define NDIS_VERSION_MINOR 0
16#define MIN(value1, value2) \
17 ((value1 < value2)? value1 : value2)
19#define MAX(value1, value2) \
20 ((value1 > value2)? value1 : value2)
22#define NDIS_BUFFER_TAG FOURCC('n','b','u','f')
23#define NDIS_PACKET_TAG FOURCC('n','p','k','t')
30#define IEEE_802_ADDR_LENGTH 6
39#define MAX_MEDIA_ETH sizeof(ETH_HEADER)
42#define BCAST_ETH_MASK 0x01
45#define BCAST_ETH_CHECK 0x01
48#define BCAST_ETH_OFFSET 0x00
111#define LAN_STATE_OPENING 0
112#define LAN_STATE_RESETTING 1
113#define LAN_STATE_STARTED 2
114#define LAN_STATE_STOPPED 3
117#define LOOKAHEAD_SIZE 128
121#define ETYPE_IPv4 WH2N(0x0800)
122#define ETYPE_IPv6 WH2N(0x86DD)
123#define ETYPE_ARP WH2N(0x0806)
126#define LAN_PROTO_IPv4 0x0000
127#define LAN_PROTO_IPv6 0x0001
128#define LAN_PROTO_ARP 0x0002
struct ETH_HEADER * PETH_HEADER
void GetDataPtr(PNDIS_PACKET Packet, UINT Offset, PCHAR *DataOut, PUINT Size)
struct _LAN_ADDRESS_C LAN_ADDRESS_C
struct _LAN_PROTOCOL * PLAN_PROTOCOL
NDIS_STATUS AllocatePacketWithBufferX(PNDIS_PACKET *NdisPacket, PCHAR Data, UINT Len, PCHAR File, UINT Line)
struct _LAN_ADDRESS_C * PLAN_ADDRESS_C
PLAN_ADAPTER FindAdapterByIndex(PLAN_DEVICE_EXT DeviceExt, UINT Index)
struct _LAN_PACKET LAN_PACKET
struct LAN_ADAPTER LAN_ADAPTER
VOID LANUnregisterProtocol(VOID)
Unregisters this protocol driver with NDIS.
struct _LAN_DEVICE_EXT * PLAN_DEVICE_EXT
struct _LAN_DEVICE_EXT LAN_DEVICE_EXT
struct LAN_ADAPTER * PLAN_ADAPTER
NDIS_STATUS LANRegisterAdapter(PNDIS_STRING AdapterName, PNDIS_STRING RegistryPath)
Registers protocol with an NDIS adapter.
NDIS_STATUS LANUnregisterAdapter(PLAN_ADAPTER Adapter)
Unregisters protocol with NDIS adapter.
NTSTATUS LANRegisterProtocol(PNDIS_STRING Name)
Registers this protocol driver with NDIS.
struct ETH_HEADER ETH_HEADER
struct _LAN_PACKET * PLAN_PACKET
struct _LAN_PROTOCOL LAN_PROTOCOL
NDIS_STATUS NDISCall(PLAN_ADAPTER Adapter, NDIS_REQUEST_TYPE Type, NDIS_OID OID, PVOID Buffer, UINT Length)
Send a request to NDIS.
VOID FreeNdisPacketX(PNDIS_PACKET Packet, PCHAR File, UINT Line)
NDIS_STATUS InitNdisPools()
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
enum _NDIS_REQUEST_TYPE NDIS_REQUEST_TYPE
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT _In_ NDIS_HANDLE _In_ NDIS_HANDLE _In_ PNDIS_STRING AdapterName
enum _NDIS_MEDIUM NDIS_MEDIUM
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
UCHAR HWAddress[IEEE_802_ADDR_LENGTH]
UNICODE_STRING RegistryPath
LIST_ENTRY AdapterListHead
NDIS_HANDLE NdisProtocolHandle
LIST_ENTRY ProtocolListHead
LIST_ENTRY ReadIrpListHead
#define IEEE_802_ADDR_LENGTH
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath