1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS NDIS library 4 * FILE: ndis/miniport.h 5 * PURPOSE: Definitions for Ethernet filter 6 */ 7 8 #pragma once 9 10 #define DECLARE_UNKNOWN_STRUCT(BaseName) \ 11 typedef struct _##BaseName BaseName, *P##BaseName; 12 13 #define DECLARE_UNKNOWN_PROTOTYPE(Name) \ 14 typedef VOID (*(Name))(VOID); 15 16 #define ETH_LENGTH_OF_ADDRESS 6 17 18 DECLARE_UNKNOWN_STRUCT(ETH_BINDING_INFO) 19 20 DECLARE_UNKNOWN_PROTOTYPE(ETH_ADDRESS_CHANGE) 21 DECLARE_UNKNOWN_PROTOTYPE(ETH_FILTER_CHANGE) 22 DECLARE_UNKNOWN_PROTOTYPE(ETH_DEFERRED_CLOSE) 23 24 typedef struct ETHI_FILTER { 25 PNDIS_SPIN_LOCK Lock; 26 CHAR (*MCastAddressBuf)[ETH_LENGTH_OF_ADDRESS]; 27 struct _NDIS_MINIPORT_BLOCK *Miniport; 28 UINT CombinedPacketFilter; 29 PETH_BINDING_INFO OpenList; 30 ETH_ADDRESS_CHANGE AddressChangeAction; 31 ETH_FILTER_CHANGE FilterChangeAction; 32 ETH_DEFERRED_CLOSE CloseAction; 33 UINT MaxMulticastAddresses; 34 UINT NumAddresses; 35 UCHAR AdapterAddress[ETH_LENGTH_OF_ADDRESS]; 36 UINT OldCombinedPacketFilter; 37 CHAR (*OldMCastAddressBuf)[ETH_LENGTH_OF_ADDRESS]; 38 UINT OldNumAddresses; 39 PETH_BINDING_INFO DirectedList; 40 PETH_BINDING_INFO BMList; 41 PETH_BINDING_INFO MCastSet; 42 #if defined(NDIS_WRAPPER) 43 UINT NumOpens; 44 PVOID BindListLock; 45 #endif 46 } ETHI_FILTER, *PETHI_FILTER; 47 48 49 BOOLEAN 50 NTAPI 51 EthCreateFilter( 52 IN UINT MaximumMulticastAddresses, 53 IN PUCHAR AdapterAddress, 54 OUT PETH_FILTER * Filter); 55 56 VOID 57 NTAPI 58 EthDeleteFilter( 59 IN PETH_FILTER Filter); 60 61 VOID 62 NTAPI 63 EthFilterDprIndicateReceive( 64 IN PETH_FILTER Filter, 65 IN NDIS_HANDLE MacReceiveContext, 66 IN PCHAR Address, 67 IN PVOID HeaderBuffer, 68 IN UINT HeaderBufferSize, 69 IN PVOID LookaheadBuffer, 70 IN UINT LookaheadBufferSize, 71 IN UINT PacketSize); 72 73 VOID 74 NTAPI 75 EthFilterDprIndicateReceiveComplete( 76 IN PETH_FILTER Filter); 77 78 /* EOF */ 79