ReactOS 0.4.15-dev-8102-g108db8f
afilter.h
Go to the documentation of this file.
1/*
2 * afilter.h
3 *
4 * Address filtering for NDIS MACs
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Filip Navara <xnavara@volny.cz>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23#ifndef _ARC_FILTER_DEFS_
24#define _ARC_FILTER_DEFS_
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#define ARC_RECEIVE_BUFFERS 64
31#define ARCNET_ADDRESS_LEN 1
32#define ARC_PROTOCOL_HEADER_SIZE (sizeof(ARC_PROTOCOL_HEADER))
33#define ARC_MAX_FRAME_SIZE 504
34#define ARC_MAX_ADDRESS_IDS 256
35#define ARC_MAX_FRAME_HEADER_SIZE 6
36#define ARC_MAX_PACKET_SIZE 576
37#define ARC_FILTER_MAX_OPENS (sizeof(ULONG) * 8)
38
39#define ARC_IS_BROADCAST(Address) (BOOLEAN)(!(Address))
40
41#define ARC_QUERY_FILTER_CLASSES(Filter) ((Filter)->CombinedPacketFilter)
42#define ARC_QUERY_PACKET_FILTER(Filter, NdisFilterHandle) \
43 (((PARC_BINDING_INFO)(NdisFilterHandle))->PacketFilters)
44
45typedef ULONG MASK, *PMASK;
46
47typedef struct _ARC_BUFFER_LIST
48{
54
56{
61
62typedef struct _ARC_PACKET_HEADER
63{
70
71typedef struct _ARC_PACKET
72{
81
82typedef struct _ARC_BINDING_INFO
83{
92
93typedef struct _ARC_FILTER
94{
105
107NTAPI
109 IN struct _NDIS_MINIPORT_BLOCK *Miniport,
110 IN UCHAR AdapterAddress,
112
113VOID
114NTAPI
117
119NTAPI
123 OUT PNDIS_HANDLE NdisFilterHandle);
124
126NTAPI
129 IN NDIS_HANDLE NdisFilterHandle,
131
133NTAPI
136 IN NDIS_HANDLE NdisFilterHandle,
138 IN UINT FilterClasses,
139 IN BOOLEAN Set);
140
141VOID
142NTAPI
145
146VOID
147NTAPI
150 IN PUCHAR pRawHeader,
152 IN UINT Length);
153
155NTAPI
158 IN NDIS_HANDLE MacReceiveContext,
160 IN UINT BytesToTransfer,
162 OUT PUINT BytesTransfered);
163
164VOID
165NTAPI
168
169VOID
170NTAPI
174
175VOID
176NTAPI
180
181#ifdef __cplusplus
182}
183#endif
184
185#endif /* _ARC_FILTER_DEFS_ */
unsigned char BOOLEAN
struct _ARC_FILTER ARC_FILTER
VOID NTAPI ArcFilterDprIndicateReceive(IN PARC_FILTER Filter, IN PUCHAR pRawHeader, IN PUCHAR pData, IN UINT Length)
Definition: 30stubs.c:20
struct _ARC_PROTOCOL_HEADER ARC_PROTOCOL_HEADER
struct _ARC_BINDING_INFO ARC_BINDING_INFO
BOOLEAN NTAPI ArcNoteFilterOpenAdapter(IN PARC_FILTER Filter, IN NDIS_HANDLE NdisBindingHandle, OUT PNDIS_HANDLE NdisFilterHandle)
VOID NTAPI ArcFreeNdisPacket(IN PARC_PACKET Packet)
struct _ARC_BINDING_INFO * PARC_BINDING_INFO
#define ARCNET_ADDRESS_LEN
Definition: afilter.h:31
NDIS_STATUS NTAPI ArcFilterAdjust(IN PARC_FILTER Filter, IN NDIS_HANDLE NdisFilterHandle, IN PNDIS_REQUEST NdisRequest, IN UINT FilterClasses, IN BOOLEAN Set)
NDIS_STATUS NTAPI ArcFilterTransferData(IN PARC_FILTER Filter, IN NDIS_HANDLE MacReceiveContext, IN UINT ByteOffset, IN UINT BytesToTransfer, OUT PNDIS_PACKET Packet, OUT PUINT BytesTransfered)
VOID NTAPI ArcFilterDprIndicateReceiveComplete(IN PARC_FILTER Filter)
Definition: 30stubs.c:35
ULONG * PMASK
Definition: afilter.h:45
struct _ARC_PROTOCOL_HEADER * PARC_PROTOCOL_HEADER
BOOLEAN NTAPI ArcCreateFilter(IN struct _NDIS_MINIPORT_BLOCK *Miniport, IN UCHAR AdapterAddress, OUT PARC_FILTER *Filter)
VOID NTAPI ArcDeleteFilter(IN PARC_FILTER Filter)
VOID NTAPI ArcFilterDoIndication(IN PARC_FILTER Filter, IN PARC_PACKET Packet)
VOID NTAPI ArcDestroyPacket(IN PARC_FILTER Filter, IN PARC_PACKET Packet)
struct _ARC_BUFFER_LIST ARC_BUFFER_LIST
struct _ARC_PACKET_HEADER ARC_PACKET_HEADER
NDIS_STATUS NTAPI ArcDeleteFilterOpenAdapter(IN PARC_FILTER Filter, IN NDIS_HANDLE NdisFilterHandle, IN PNDIS_REQUEST NdisRequest)
struct _ARC_PACKET_HEADER * PARC_PACKET_HEADER
struct _ARC_FILTER * PARC_FILTER
struct _ARC_PACKET ARC_PACKET
struct _ARC_BUFFER_LIST * PARC_BUFFER_LIST
ULONG MASK
Definition: afilter.h:45
struct _ARC_PACKET * PARC_PACKET
IN PDCB IN PCCB IN VBO IN OUT PULONG OUT PDIRENT OUT PBCB OUT PVBO ByteOffset
Definition: fatprocs.h:731
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1801
_Must_inspect_result_ _In_ NDIS_HANDLE NdisBindingHandle
Definition: ndis.h:4735
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1549
unsigned int * PUINT
Definition: ndis.h:50
unsigned int UINT
Definition: ndis.h:50
_In_opt_ NDIS_HANDLE _In_opt_ NDIS_HANDLE _Inout_ PNDIS_REQUEST NdisRequest
Definition: ndis.h:1573
int NDIS_STATUS
Definition: ntddndis.h:475
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
static BOOL Set
Definition: pageheap.c:10
unsigned short USHORT
Definition: pedump.c:61
ULONG References
Definition: afilter.h:87
PVOID Reserved
Definition: afilter.h:85
BOOLEAN ReceivedAPacket
Definition: afilter.h:89
PNDIS_OPEN_BLOCK NdisBindingHandle
Definition: afilter.h:84
struct _ARC_BINDING_INFO * NextOpen
Definition: afilter.h:88
UINT OldPacketFilters
Definition: afilter.h:90
UINT PacketFilters
Definition: afilter.h:86
struct _ARC_BUFFER_LIST * Next
Definition: afilter.h:52
PVOID Buffer
Definition: afilter.h:49
UINT BytesLeft
Definition: afilter.h:51
struct _NDIS_MINIPORT_BLOCK * Miniport
Definition: afilter.h:95
PARC_BINDING_INFO OpenList
Definition: afilter.h:97
NDIS_HANDLE ReceiveBufferPool
Definition: afilter.h:98
UCHAR AdapterAddress
Definition: afilter.h:102
UINT OldCombinedPacketFilter
Definition: afilter.h:103
PARC_PACKET FreePackets
Definition: afilter.h:100
UINT CombinedPacketFilter
Definition: afilter.h:96
PARC_PACKET OutstandingPackets
Definition: afilter.h:101
PARC_BUFFER_LIST FreeBufferList
Definition: afilter.h:99
UCHAR LastSplitFlag
Definition: afilter.h:67
USHORT FrameSequence
Definition: afilter.h:65
UCHAR FramesReceived
Definition: afilter.h:68
ARC_PROTOCOL_HEADER ProtHeader
Definition: afilter.h:64
PARC_BUFFER_LIST FirstBuffer
Definition: afilter.h:77
ULONG TotalLength
Definition: afilter.h:75
BOOLEAN LastFrame
Definition: afilter.h:76
NDIS_PACKET TmpNdisPacket
Definition: afilter.h:79
PARC_BUFFER_LIST LastBuffer
Definition: afilter.h:78
ARC_PACKET_HEADER Header
Definition: afilter.h:73
struct _ARC_PACKET * Next
Definition: afilter.h:74
UCHAR DestId[ARCNET_ADDRESS_LEN]
Definition: afilter.h:58
UCHAR SourceId[ARCNET_ADDRESS_LEN]
Definition: afilter.h:57
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
unsigned char UCHAR
Definition: xmlstorage.h:181