ReactOS  0.4.13-dev-990-g6d23816
xfilter.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ETH_LENGTH_OF_ADDRESS   6
 
#define ETH_IS_BROADCAST(Address)   ((((PUCHAR)(Address))[0] == ((UCHAR)0xff)) && (((PUCHAR)(Address))[1] == ((UCHAR)0xff)))
 
#define ETH_IS_MULTICAST(Address)   (BOOLEAN)(((PUCHAR)(Address))[0] & ((UCHAR)0x01))
 
#define ETH_COMPARE_NETWORK_ADDRESSES(_A, _B, _Result)
 
#define ETH_COMPARE_NETWORK_ADDRESSES_EQ(_A, _B, _Result)
 
#define ETH_COPY_NETWORK_ADDRESS(_D, _S)
 
#define FDDI_LENGTH_OF_LONG_ADDRESS   6
 
#define FDDI_LENGTH_OF_SHORT_ADDRESS   2
 
#define FDDI_IS_BROADCAST(Address, AddressLength, Result)
 
#define FDDI_IS_MULTICAST(Address, AddressLength, Result)   *Result = (BOOLEAN)(*(UCHAR *)(Address) & (UCHAR)0x01)
 
#define FDDI_IS_SMT(FcByte, Result)
 
#define FDDI_COMPARE_NETWORK_ADDRESSES(_A, _B, _Length, _Result)
 
#define FDDI_COMPARE_NETWORK_ADDRESSES_EQ(_A, _B, _Length, _Result)
 
#define FDDI_COPY_NETWORK_ADDRESS(D, S, AddressLength)
 
#define TR_LENGTH_OF_FUNCTIONAL   4
 
#define TR_LENGTH_OF_ADDRESS   6
 
#define TR_IS_NOT_DIRECTED(_Address, _Result)
 
#define TR_IS_FUNCTIONAL(_Address, _Result)
 
#define TR_IS_GROUP(_Address, _Result)
 
#define TR_IS_SOURCE_ROUTING(_Address, _Result)
 
#define TR_IS_MAC_FRAME(_PacketHeader)   ((((PUCHAR)_PacketHeader)[1] & 0xFC) == 0)
 
#define TR_IS_BROADCAST(_Address, _Result)
 
#define TR_COMPARE_NETWORK_ADDRESSES(_A, _B, _Result)
 
#define TR_COPY_NETWORK_ADDRESS(_D, _S)
 
#define TR_COMPARE_NETWORK_ADDRESSES_EQ(_A, _B, _Result)
 

Typedefs

typedef ULONG TR_FUNCTIONAL_ADDRESS
 
typedef ULONG TR_GROUP_ADDRESS
 

Macro Definition Documentation

◆ ETH_COMPARE_NETWORK_ADDRESSES

#define ETH_COMPARE_NETWORK_ADDRESSES (   _A,
  _B,
  _Result 
)
Value:
{ \
if (*(ULONG UNALIGNED *)&(_A)[2] > *(ULONG UNALIGNED *)&(_B)[2]) \
{ \
*(_Result) = 1; \
} \
else if (*(ULONG UNALIGNED *)&(_A)[2] < *(ULONG UNALIGNED *)&(_B)[2]) \
{ \
*(_Result) = (UINT)-1; \
} \
else if (*(USHORT UNALIGNED *)(_A) > *(USHORT UNALIGNED *)(_B)) \
{ \
*(_Result) = 1; \
} \
else if (*(USHORT UNALIGNED *)(_A) < *(USHORT UNALIGNED *)(_B)) \
{ \
*(_Result) = (UINT)-1; \
} \
else \
{ \
*(_Result) = 0; \
} \
}
#define UNALIGNED
Definition: crtdefs.h:132
#define _B
Definition: strtoclr.c:21
unsigned short USHORT
Definition: pedump.c:61
unsigned int UINT
Definition: ndis.h:50
unsigned int ULONG
Definition: retypes.h:1

Definition at line 38 of file xfilter.h.

◆ ETH_COMPARE_NETWORK_ADDRESSES_EQ

#define ETH_COMPARE_NETWORK_ADDRESSES_EQ (   _A,
  _B,
  _Result 
)
Value:
{ \
if ((*(ULONG UNALIGNED *)&(_A)[2] == *(ULONG UNALIGNED *)&(_B)[2]) && \
(*(USHORT UNALIGNED *)(_A) == *(USHORT UNALIGNED *)(_B))) \
{ \
*(_Result) = 0; \
} \
else \
{ \
*(_Result) = 1; \
} \
}
#define UNALIGNED
Definition: crtdefs.h:132
#define _B
Definition: strtoclr.c:21
unsigned short USHORT
Definition: pedump.c:61
unsigned int ULONG
Definition: retypes.h:1

Definition at line 62 of file xfilter.h.

◆ ETH_COPY_NETWORK_ADDRESS

#define ETH_COPY_NETWORK_ADDRESS (   _D,
  _S 
)
Value:
{ \
*((ULONG UNALIGNED *)(_D)) = *((ULONG UNALIGNED *)(_S)); \
*((USHORT UNALIGNED *)((UCHAR *)(_D) + 4)) = *((USHORT UNALIGNED *)((UCHAR *)(_S) + 4)); \
}
#define UNALIGNED
Definition: crtdefs.h:132
unsigned char UCHAR
Definition: xmlstorage.h:181
unsigned short USHORT
Definition: pedump.c:61
unsigned int ULONG
Definition: retypes.h:1

Definition at line 75 of file xfilter.h.

◆ ETH_IS_BROADCAST

#define ETH_IS_BROADCAST (   Address)    ((((PUCHAR)(Address))[0] == ((UCHAR)0xff)) && (((PUCHAR)(Address))[1] == ((UCHAR)0xff)))

Definition at line 32 of file xfilter.h.

◆ ETH_IS_MULTICAST

#define ETH_IS_MULTICAST (   Address)    (BOOLEAN)(((PUCHAR)(Address))[0] & ((UCHAR)0x01))

Definition at line 35 of file xfilter.h.

◆ ETH_LENGTH_OF_ADDRESS

#define ETH_LENGTH_OF_ADDRESS   6

Definition at line 30 of file xfilter.h.

◆ FDDI_COMPARE_NETWORK_ADDRESSES

#define FDDI_COMPARE_NETWORK_ADDRESSES (   _A,
  _B,
  _Length,
  _Result 
)
Value:
{ \
if (*(USHORT UNALIGNED *)(_A) > *(USHORT UNALIGNED *)(_B)) \
{ \
*(_Result) = 1; \
} \
else if (*(USHORT UNALIGNED *)(_A) < *(USHORT UNALIGNED *)(_B)) \
{ \
*(_Result) = (UINT)-1; \
} \
else if (_Length == 2) \
{ \
*(_Result) = 0; \
} \
else if (*(ULONG UNALIGNED *)((PUCHAR)(_A) + 2) > *(ULONG UNALIGNED *)((PUCHAR)(_B) + 2)) \
{ \
*(_Result) = 1; \
} \
else if (*(ULONG UNALIGNED *)((PUCHAR)(_A) + 2) < *(ULONG UNALIGNED *)((PUCHAR)(_B) + 2)) \
{ \
*(_Result) = (UINT)-1; \
} \
else \
{ \
*(_Result) = 0; \
} \
}
unsigned char * PUCHAR
Definition: retypes.h:3
#define UNALIGNED
Definition: crtdefs.h:132
#define _B
Definition: strtoclr.c:21
unsigned short USHORT
Definition: pedump.c:61
unsigned int UINT
Definition: ndis.h:50
unsigned int ULONG
Definition: retypes.h:1

Definition at line 97 of file xfilter.h.

◆ FDDI_COMPARE_NETWORK_ADDRESSES_EQ

#define FDDI_COMPARE_NETWORK_ADDRESSES_EQ (   _A,
  _B,
  _Length,
  _Result 
)
Value:
{ \
if ((*(USHORT UNALIGNED *)(_A) == *(USHORT UNALIGNED *)(_B)) && \
(((_Length) == 2) || \
(*(ULONG UNALIGNED *)((PUCHAR)(_A) + 2) == *(ULONG UNALIGNED *)((PUCHAR)(_B) + 2)))) \
{ \
*(_Result) = 0; \
} \
else \
{ \
*(_Result) = 1; \
} \
}
unsigned char * PUCHAR
Definition: retypes.h:3
#define UNALIGNED
Definition: crtdefs.h:132
#define _B
Definition: strtoclr.c:21
unsigned short USHORT
Definition: pedump.c:61
unsigned int ULONG
Definition: retypes.h:1

Definition at line 125 of file xfilter.h.

◆ FDDI_COPY_NETWORK_ADDRESS

#define FDDI_COPY_NETWORK_ADDRESS (   D,
  S,
  AddressLength 
)
Value:
{ \
PCHAR _D = (D); \
PCHAR _S = (S); \
UINT _C = (AddressLength); \
for ( ; _C > 0 ; _D++, _S++, _C--) \
{ \
*_D = *_S; \
} \
}
#define S(x)
Definition: test.h:190
#define D(name, bit)

Definition at line 139 of file xfilter.h.

◆ FDDI_IS_BROADCAST

#define FDDI_IS_BROADCAST (   Address,
  AddressLength,
  Result 
)
Value:
*Result = ((*(PUCHAR)(Address) == (UCHAR)0xFF) && \
(*((PUCHAR)(Address) + 1) == (UCHAR)0xFF))
unsigned char * PUCHAR
Definition: retypes.h:3
static WCHAR Address[46]
Definition: ping.c:68
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
unsigned char UCHAR
Definition: xmlstorage.h:181

Definition at line 84 of file xfilter.h.

◆ FDDI_IS_MULTICAST

#define FDDI_IS_MULTICAST (   Address,
  AddressLength,
  Result 
)    *Result = (BOOLEAN)(*(UCHAR *)(Address) & (UCHAR)0x01)

Definition at line 88 of file xfilter.h.

◆ FDDI_IS_SMT

#define FDDI_IS_SMT (   FcByte,
  Result 
)
Value:
{ \
*Result = ((FcByte & ((UCHAR)0xf0)) == 0x40); \
}
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
unsigned char UCHAR
Definition: xmlstorage.h:181

Definition at line 91 of file xfilter.h.

◆ FDDI_LENGTH_OF_LONG_ADDRESS

#define FDDI_LENGTH_OF_LONG_ADDRESS   6

Definition at line 81 of file xfilter.h.

◆ FDDI_LENGTH_OF_SHORT_ADDRESS

#define FDDI_LENGTH_OF_SHORT_ADDRESS   2

Definition at line 82 of file xfilter.h.

◆ TR_COMPARE_NETWORK_ADDRESSES

#define TR_COMPARE_NETWORK_ADDRESSES (   _A,
  _B,
  _Result 
)
Value:
{ \
if (*(ULONG UNALIGNED *)&(_A)[2] > *(ULONG UNALIGNED *)&(_B)[2]) \
{ \
*(_Result) = 1; \
} \
else if (*(ULONG UNALIGNED *)&(_A)[2] < *(ULONG UNALIGNED *)&(_B)[2]) \
{ \
*(_Result) = (UINT)-1; \
} \
else if (*(USHORT UNALIGNED *)(_A) > *(USHORT UNALIGNED *)(_B)) \
{ \
*(_Result) = 1; \
} \
else if (*(USHORT UNALIGNED *)(_A) < *(USHORT UNALIGNED *)(_B)) \
{ \
*(_Result) = (UINT)-1; \
} \
else \
{ \
*(_Result) = 0; \
} \
}
#define UNALIGNED
Definition: crtdefs.h:132
#define _B
Definition: strtoclr.c:21
unsigned short USHORT
Definition: pedump.c:61
unsigned int UINT
Definition: ndis.h:50
unsigned int ULONG
Definition: retypes.h:1

Definition at line 185 of file xfilter.h.

◆ TR_COMPARE_NETWORK_ADDRESSES_EQ

#define TR_COMPARE_NETWORK_ADDRESSES_EQ (   _A,
  _B,
  _Result 
)
Value:
{ \
if ((*(ULONG UNALIGNED *)&(_A)[2] == *(ULONG UNALIGNED *)&(_B)[2]) && \
(*(USHORT UNALIGNED *)&(_A)[0] == *(USHORT UNALIGNED *)&(_B)[0])) \
{ \
*(_Result) = 0; \
} \
else \
{ \
*(_Result) = 1; \
} \
}
#define UNALIGNED
Definition: crtdefs.h:132
#define _B
Definition: strtoclr.c:21
unsigned short USHORT
Definition: pedump.c:61
unsigned int ULONG
Definition: retypes.h:1

Definition at line 215 of file xfilter.h.

◆ TR_COPY_NETWORK_ADDRESS

#define TR_COPY_NETWORK_ADDRESS (   _D,
  _S 
)
Value:
{ \
*((ULONG UNALIGNED *)(_D)) = *((ULONG UNALIGNED *)(_S)); \
*((USHORT UNALIGNED *)((UCHAR *)(_D)+4)) = *((USHORT UNALIGNED *)((UCHAR *)(_S) + 4)); \
}
#define UNALIGNED
Definition: crtdefs.h:132
unsigned char UCHAR
Definition: xmlstorage.h:181
unsigned short USHORT
Definition: pedump.c:61
unsigned int ULONG
Definition: retypes.h:1

Definition at line 209 of file xfilter.h.

◆ TR_IS_BROADCAST

#define TR_IS_BROADCAST (   _Address,
  _Result 
)
Value:
{ \
*(_Result) = (BOOLEAN)(((*(UNALIGNED USHORT *)&(_Address)[0] == 0xFFFF) || \
(*(UNALIGNED USHORT *)&(_Address)[0] == 0x00C0)) && \
(*(UNALIGNED ULONG *)&(_Address)[2] == 0xFFFFFFFF)); \
}
unsigned char BOOLEAN
#define UNALIGNED
Definition: crtdefs.h:132
unsigned short USHORT
Definition: pedump.c:61
unsigned int ULONG
Definition: retypes.h:1

Definition at line 178 of file xfilter.h.

◆ TR_IS_FUNCTIONAL

#define TR_IS_FUNCTIONAL (   _Address,
  _Result 
)
Value:
{ \
*(_Result) = (BOOLEAN)(((_Address)[0] & 0x80) && !((_Address)[2] & 0x80)); \
}
unsigned char BOOLEAN

Definition at line 161 of file xfilter.h.

◆ TR_IS_GROUP

#define TR_IS_GROUP (   _Address,
  _Result 
)
Value:
{ \
*(_Result) = (BOOLEAN)((_Address)[0] & (_Address)[2] & 0x80); \
}
unsigned char BOOLEAN

Definition at line 166 of file xfilter.h.

◆ TR_IS_MAC_FRAME

#define TR_IS_MAC_FRAME (   _PacketHeader)    ((((PUCHAR)_PacketHeader)[1] & 0xFC) == 0)

Definition at line 176 of file xfilter.h.

◆ TR_IS_NOT_DIRECTED

#define TR_IS_NOT_DIRECTED (   _Address,
  _Result 
)
Value:
{ \
*(_Result) = (BOOLEAN)((_Address)[0] & 0x80); \
}
unsigned char BOOLEAN

Definition at line 156 of file xfilter.h.

◆ TR_IS_SOURCE_ROUTING

#define TR_IS_SOURCE_ROUTING (   _Address,
  _Result 
)
Value:
{ \
*(_Result) = (BOOLEAN)((_Address)[0] & 0x80); \
}
unsigned char BOOLEAN

Definition at line 171 of file xfilter.h.

◆ TR_LENGTH_OF_ADDRESS

#define TR_LENGTH_OF_ADDRESS   6

Definition at line 151 of file xfilter.h.

◆ TR_LENGTH_OF_FUNCTIONAL

#define TR_LENGTH_OF_FUNCTIONAL   4

Definition at line 150 of file xfilter.h.

Typedef Documentation

◆ TR_FUNCTIONAL_ADDRESS

Definition at line 153 of file xfilter.h.

◆ TR_GROUP_ADDRESS

Definition at line 154 of file xfilter.h.