ReactOS  0.4.14-dev-583-g2a1ba2c
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
27 extern "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 
45 typedef ULONG MASK, *PMASK;
46 
47 typedef struct _ARC_BUFFER_LIST
48 {
54 
55 typedef struct _ARC_PROTOCOL_HEADER
56 {
61 
62 typedef struct _ARC_PACKET_HEADER
63 {
70 
71 typedef struct _ARC_PACKET
72 {
74  struct _ARC_PACKET *Next;
81 
82 typedef struct _ARC_BINDING_INFO
83 {
92 
93 typedef struct _ARC_FILTER
94 {
105 
106 BOOLEAN
107 NTAPI
109  IN struct _NDIS_MINIPORT_BLOCK *Miniport,
110  IN UCHAR AdapterAddress,
112 
113 VOID
114 NTAPI
117 
118 BOOLEAN
119 NTAPI
123  OUT PNDIS_HANDLE NdisFilterHandle);
124 
126 NTAPI
129  IN NDIS_HANDLE NdisFilterHandle,
131 
133 NTAPI
136  IN NDIS_HANDLE NdisFilterHandle,
138  IN UINT FilterClasses,
139  IN BOOLEAN Set);
140 
141 VOID
142 NTAPI
145 
146 VOID
147 NTAPI
150  IN PUCHAR pRawHeader,
151  IN PUCHAR pData,
152  IN UINT Length);
153 
155 NTAPI
158  IN NDIS_HANDLE MacReceiveContext,
160  IN UINT BytesToTransfer,
162  OUT PUINT BytesTransfered);
163 
164 VOID
165 NTAPI
168 
169 VOID
170 NTAPI
174 
175 VOID
176 NTAPI
180 
181 #ifdef __cplusplus
182 }
183 #endif
184 
185 #endif /* _ARC_FILTER_DEFS_ */
NDIS_HANDLE ReceiveBufferPool
Definition: afilter.h:98
#define IN
Definition: typedefs.h:38
_In_opt_ NDIS_HANDLE _In_opt_ NDIS_HANDLE _Inout_ PNDIS_REQUEST NdisRequest
Definition: ndis.h:1571
UINT BytesLeft
Definition: afilter.h:51
NDIS_STATUS NTAPI ArcDeleteFilterOpenAdapter(IN PARC_FILTER Filter, IN NDIS_HANDLE NdisFilterHandle, IN PNDIS_REQUEST NdisRequest)
PARC_PACKET OutstandingPackets
Definition: afilter.h:101
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1548
UCHAR LastSplitFlag
Definition: afilter.h:67
PVOID Buffer
Definition: afilter.h:49
BOOLEAN ReceivedAPacket
Definition: afilter.h:89
PARC_BUFFER_LIST FreeBufferList
Definition: afilter.h:99
NDIS_PACKET TmpNdisPacket
Definition: afilter.h:79
VOID NTAPI ArcFilterDprIndicateReceiveComplete(IN PARC_FILTER Filter)
Definition: 30stubs.c:35
unsigned char * PUCHAR
Definition: retypes.h:3
struct _ARC_PROTOCOL_HEADER * PARC_PROTOCOL_HEADER
NDIS_STATUS NTAPI ArcFilterAdjust(IN PARC_FILTER Filter, IN NDIS_HANDLE NdisFilterHandle, IN PNDIS_REQUEST NdisRequest, IN UINT FilterClasses, IN BOOLEAN Set)
VOID NTAPI ArcDeleteFilter(IN PARC_FILTER Filter)
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)
UCHAR FramesReceived
Definition: afilter.h:68
struct _ARC_BINDING_INFO * NextOpen
Definition: afilter.h:88
struct _ARC_PACKET_HEADER * PARC_PACKET_HEADER
UINT PacketFilters
Definition: afilter.h:86
ARC_PROTOCOL_HEADER ProtHeader
Definition: afilter.h:64
struct _ARC_BUFFER_LIST * PARC_BUFFER_LIST
ULONG MASK
Definition: afilter.h:45
static BOOL Set
Definition: pageheap.c:10
int NDIS_STATUS
Definition: ntddndis.h:471
struct _ARC_BINDING_INFO ARC_BINDING_INFO
struct _ARC_PACKET_HEADER ARC_PACKET_HEADER
VOID NTAPI ArcFilterDoIndication(IN PARC_FILTER Filter, IN PARC_PACKET Packet)
ULONG TotalLength
Definition: afilter.h:75
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
ULONG * PMASK
Definition: afilter.h:45
PARC_PACKET FreePackets
Definition: afilter.h:100
struct _ARC_FILTER ARC_FILTER
unsigned char BOOLEAN
struct _NDIS_MINIPORT_BLOCK * Miniport
Definition: afilter.h:95
struct _ARC_FILTER * PARC_FILTER
USHORT FrameSequence
Definition: afilter.h:65
VOID NTAPI ArcDestroyPacket(IN PARC_FILTER Filter, IN PARC_PACKET Packet)
UINT OldPacketFilters
Definition: afilter.h:90
UINT OldCombinedPacketFilter
Definition: afilter.h:103
UCHAR DestId[ARCNET_ADDRESS_LEN]
Definition: afilter.h:58
ULONG References
Definition: afilter.h:87
ARC_PACKET_HEADER Header
Definition: afilter.h:73
struct _ARC_PACKET * Next
Definition: afilter.h:74
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
PARC_BINDING_INFO OpenList
Definition: afilter.h:97
unsigned char UCHAR
Definition: xmlstorage.h:181
struct _ARC_BUFFER_LIST ARC_BUFFER_LIST
BOOLEAN NTAPI ArcNoteFilterOpenAdapter(IN PARC_FILTER Filter, IN NDIS_HANDLE NdisBindingHandle, OUT PNDIS_HANDLE NdisFilterHandle)
UCHAR AdapterAddress
Definition: afilter.h:102
BOOLEAN LastFrame
Definition: afilter.h:76
struct _ARC_BINDING_INFO * PARC_BINDING_INFO
struct _ARC_PACKET * PARC_PACKET
PNDIS_OPEN_BLOCK NdisBindingHandle
Definition: afilter.h:84
struct _ARC_PACKET ARC_PACKET
UINT CombinedPacketFilter
Definition: afilter.h:96
unsigned short USHORT
Definition: pedump.c:61
struct _ARC_PROTOCOL_HEADER ARC_PROTOCOL_HEADER
unsigned int UINT
Definition: ndis.h:50
PARC_BUFFER_LIST LastBuffer
Definition: afilter.h:78
PVOID Reserved
Definition: afilter.h:85
VOID NTAPI ArcFilterDprIndicateReceive(IN PARC_FILTER Filter, IN PUCHAR pRawHeader, IN PUCHAR pData, IN UINT Length)
Definition: 30stubs.c:20
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
struct _ARC_BUFFER_LIST * Next
Definition: afilter.h:52
PARC_BUFFER_LIST FirstBuffer
Definition: afilter.h:77
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
_Must_inspect_result_ _In_ NDIS_HANDLE NdisBindingHandle
Definition: ndis.h:4735
UCHAR SourceId[ARCNET_ADDRESS_LEN]
Definition: afilter.h:57
BOOLEAN NTAPI ArcCreateFilter(IN struct _NDIS_MINIPORT_BLOCK *Miniport, IN UCHAR AdapterAddress, OUT PARC_FILTER *Filter)
unsigned int * PUINT
Definition: ndis.h:50
VOID NTAPI ArcFreeNdisPacket(IN PARC_PACKET Packet)
#define ARCNET_ADDRESS_LEN
Definition: afilter.h:31
IN PDCB IN PCCB IN VBO IN OUT PULONG OUT PDIRENT OUT PBCB OUT PVBO ByteOffset
Definition: fatprocs.h:716