ReactOS 0.4.16-dev-297-gc569aee
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)
 
#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; \
} \
}
unsigned int UINT
Definition: ndis.h:50
#define UNALIGNED
Definition: pecoff.h:227
unsigned short USHORT
Definition: pedump.c:61
#define _B
Definition: strtoclr.c:21
uint32_t ULONG
Definition: typedefs.h:59

Definition at line 40 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; \
} \
}

Definition at line 64 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)); \
}
unsigned char UCHAR
Definition: xmlstorage.h:181

Definition at line 77 of file xfilter.h.

◆ ETH_IS_BROADCAST

#define ETH_IS_BROADCAST (   Address)
Value:
((((PUCHAR)(Address))[0] == ((UCHAR)0xff)) && (((PUCHAR)(Address))[1] == ((UCHAR)0xff)) && \
(((PUCHAR)(Address))[2] == ((UCHAR)0xff)) && (((PUCHAR)(Address))[3] == ((UCHAR)0xff)) && \
(((PUCHAR)(Address))[4] == ((UCHAR)0xff)) && (((PUCHAR)(Address))[5] == ((UCHAR)0xff)))
static WCHAR Address[46]
Definition: ping.c:68
unsigned char * PUCHAR
Definition: typedefs.h:53

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 37 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; \
} \
}

Definition at line 99 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; \
} \
}

Definition at line 127 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 D(d)
Definition: builtin.c:4557
#define S(x)
Definition: test.h:220
char * PCHAR
Definition: typedefs.h:51

Definition at line 141 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))
_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:409

Definition at line 86 of file xfilter.h.

◆ FDDI_IS_MULTICAST

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

Definition at line 90 of file xfilter.h.

◆ FDDI_IS_SMT

#define FDDI_IS_SMT (   FcByte,
  Result 
)
Value:
{ \
*Result = ((FcByte & ((UCHAR)0xf0)) == 0x40); \
}

Definition at line 93 of file xfilter.h.

◆ FDDI_LENGTH_OF_LONG_ADDRESS

#define FDDI_LENGTH_OF_LONG_ADDRESS   6

Definition at line 83 of file xfilter.h.

◆ FDDI_LENGTH_OF_SHORT_ADDRESS

#define FDDI_LENGTH_OF_SHORT_ADDRESS   2

Definition at line 84 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; \
} \
}

Definition at line 187 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; \
} \
}

Definition at line 217 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)); \
}

Definition at line 211 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

Definition at line 180 of file xfilter.h.

◆ TR_IS_FUNCTIONAL

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

Definition at line 163 of file xfilter.h.

◆ TR_IS_GROUP

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

Definition at line 168 of file xfilter.h.

◆ TR_IS_MAC_FRAME

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

Definition at line 178 of file xfilter.h.

◆ TR_IS_NOT_DIRECTED

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

Definition at line 158 of file xfilter.h.

◆ TR_IS_SOURCE_ROUTING

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

Definition at line 173 of file xfilter.h.

◆ TR_LENGTH_OF_ADDRESS

#define TR_LENGTH_OF_ADDRESS   6

Definition at line 153 of file xfilter.h.

◆ TR_LENGTH_OF_FUNCTIONAL

#define TR_LENGTH_OF_FUNCTIONAL   4

Definition at line 152 of file xfilter.h.

Typedef Documentation

◆ TR_FUNCTIONAL_ADDRESS

Definition at line 155 of file xfilter.h.

◆ TR_GROUP_ADDRESS

Definition at line 156 of file xfilter.h.