29#ifndef _ETHERNET_UTILS_H
30#define _ETHERNET_UTILS_H
35#define ETH_IS_LOCALLY_ADMINISTERED(Address) \
36 (BOOLEAN)(((PUCHAR)(Address))[0] & ((UCHAR)0x02))
38#define ETH_IS_EMPTY(Address) \
39 ((((PUCHAR)(Address))[0] == ((UCHAR)0x00)) && (((PUCHAR)(Address))[1] == ((UCHAR)0x00)) && (((PUCHAR)(Address))[2] == ((UCHAR)0x00)) && (((PUCHAR)(Address))[3] == ((UCHAR)0x00)) && (((PUCHAR)(Address))[4] == ((UCHAR)0x00)) && (((PUCHAR)(Address))[5] == ((UCHAR)0x00)))
41#define ETH_HAS_PRIO_HEADER(Address) \
42 (((PUCHAR)(Address))[12] == ((UCHAR)0x81) && ((PUCHAR)(Address))[13] == ((UCHAR)0x00))
53#define ETH_HEADER_SIZE (sizeof(ETH_HEADER))
54#define ETH_MIN_PACKET_SIZE 60
55#define ETH_PRIORITY_HEADER_OFFSET 12
56#define ETH_PRIORITY_HEADER_SIZE 4
63 pDest[2] |= (
UCHAR)(VlanID >> 8);
64 pDest[3] |= (
UCHAR)VlanID;
112#define TCP_CHECKSUM_OFFSET 16
113#define UDP_CHECKSUM_OFFSET 6
114#define MAX_IPV4_HEADER_SIZE 60
115#define MAX_TCP_HEADER_SIZE 60
119 return (
us << 8) | (
us >> 8);
#define ETH_LENGTH_OF_ADDRESS
struct _tagTCPHeader TCPHeader
struct _ETH_HEADER ETH_HEADER
enum _tag_eInspectedPacketType eInspectedPacketType
struct _tagUDPHeader UDPHeader
_tag_eInspectedPacketType
struct _tagIPv4Header IPv4Header
static __inline USHORT swap_short(USHORT us)
static void FORCEINLINE SetPriorityData(UCHAR *pDest, ULONG priority, ULONG VlanID)
struct _ETH_HEADER * PETH_HEADER