1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS NDIS library 4 * FILE: ndis/protocol.h 5 * PURPOSE: Definitions for routines used by NDIS protocol drivers 6 */ 7 8 #pragma once 9 10 typedef struct _PROTOCOL_BINDING { 11 LIST_ENTRY ListEntry; /* Entry on global list */ 12 KSPIN_LOCK Lock; /* Protecting spin lock */ 13 NDIS_PROTOCOL_CHARACTERISTICS Chars; /* Characteristics */ 14 WORK_QUEUE_ITEM WorkItem; /* Work item */ 15 LIST_ENTRY AdapterListHead; /* List of adapter bindings */ 16 } PROTOCOL_BINDING, *PPROTOCOL_BINDING; 17 18 #define GET_PROTOCOL_BINDING(Handle)((PPROTOCOL_BINDING)Handle) 19 20 21 typedef struct _ADAPTER_BINDING { 22 NDIS_OPEN_BLOCK NdisOpenBlock; /* NDIS defined fields */ 23 24 LIST_ENTRY ListEntry; /* Entry on global list */ 25 LIST_ENTRY ProtocolListEntry; /* Entry on protocol binding adapter list */ 26 LIST_ENTRY AdapterListEntry; /* Entry on logical adapter list */ 27 KSPIN_LOCK Lock; /* Protecting spin lock */ 28 PPROTOCOL_BINDING ProtocolBinding; /* Protocol that opened adapter */ 29 PLOGICAL_ADAPTER Adapter; /* Adapter opened by protocol */ 30 } ADAPTER_BINDING, *PADAPTER_BINDING; 31 32 typedef struct _NDIS_REQUEST_MAC_BLOCK { 33 PVOID Unknown1; 34 PNDIS_OPEN_BLOCK Binding; 35 PVOID Unknown3; 36 PVOID Unknown4; 37 } NDIS_REQUEST_MAC_BLOCK, *PNDIS_REQUEST_MAC_BLOCK; 38 39 #define GET_ADAPTER_BINDING(Handle)((PADAPTER_BINDING)Handle) 40 41 42 extern LIST_ENTRY ProtocolListHead; 43 extern KSPIN_LOCK ProtocolListLock; 44 45 46 NDIS_STATUS 47 ProIndicatePacket( 48 PLOGICAL_ADAPTER Adapter, 49 PNDIS_PACKET Packet); 50 51 VOID NTAPI 52 ProSendPackets( 53 IN NDIS_HANDLE NdisBindingHandle, 54 IN PPNDIS_PACKET PacketArray, 55 IN UINT NumberOfPackets); 56 57 NTSTATUS 58 NTAPI 59 NdisIPnPQueryStopDevice( 60 IN PDEVICE_OBJECT DeviceObject, 61 PIRP Irp); 62 63 NTSTATUS 64 NTAPI 65 NdisIPnPCancelStopDevice( 66 IN PDEVICE_OBJECT DeviceObject, 67 PIRP Irp); 68 69 NDIS_STATUS 70 proSendPacketToMiniport(PLOGICAL_ADAPTER Adapter, PNDIS_PACKET Packet); 71 72 VOID 73 NTAPI 74 ndisBindMiniportsToProtocol(OUT PNDIS_STATUS Status, IN PPROTOCOL_BINDING Protocol); 75 76 /* EOF */ 77