15 #define ETHERNET_VLAN_TAG_ID_nh (0x0081)
17 #ifndef _OPEN_NET_NO_FUNCTION_
40 unsigned short lType_nh = *((OPEN_NET_GLOBAL
unsigned short *)(aBase + aPacketInfo->mOffset_byte + 12));
42 return (aBase + aPacketInfo->mOffset_byte + ((ETHERNET_VLAN_TAG_ID_nh == lType_nh) ? 18 : 14));
63 unsigned short lType_nh = *((OPEN_NET_GLOBAL
unsigned short *)(aBase + aPacketInfo->mOffset_byte + 12));
65 return (aPacketInfo->mSize_byte - ((ETHERNET_VLAN_TAG_ID_nh == lType_nh) ? 18 : 14));
88 return ((OPEN_NET_GLOBAL
unsigned short *)(aBase + aPacketInfo->mOffset_byte + 0));
107 return ((OPEN_NET_GLOBAL
unsigned short *)(aBase + aPacketInfo->mOffset_byte + 6));
126 unsigned short lType_nh = *((OPEN_NET_GLOBAL
const unsigned short *)(aBase + aPacketInfo->mOffset_byte + 12));
128 return (ETHERNET_VLAN_TAG_ID_nh == lType_nh) ? (*((OPEN_NET_GLOBAL
const unsigned short *)(aBase + aPacketInfo->mOffset_byte + 16))) : lType_nh;
149 unsigned short lType_nh = *((OPEN_NET_GLOBAL
const unsigned short *)(aBase + aPacketInfo->mOffset_byte + 12));
151 return (ETHERNET_VLAN_TAG_ID_nh == lType_nh);
172 unsigned short lType_nh = *((OPEN_NET_GLOBAL
const unsigned short *)(aBase + aPacketInfo->mOffset_byte + 12));
174 return (ETHERNET_VLAN_TAG_ID_nh == lType_nh) ? (*((OPEN_NET_GLOBAL
const unsigned short *)(aBase + aPacketInfo->mOffset_byte + 14))) : 0;
177 #endif // ! _OPEN_NET_NO_FUNCTION_
unsigned int Ethernet_DataSize(OPEN_NET_GLOBAL unsigned char *aBase, OPEN_NET_GLOBAL const OpenNet_PacketInfo *aPacketInfo)
Cette fonction retourne la taille de la charge utile du paquet Ethernet.
Definition: Ethernet.h:61
OPEN_NET_GLOBAL unsigned char * Ethernet_Data(OPEN_NET_GLOBAL unsigned char *aBase, OPEN_NET_GLOBAL const OpenNet_PacketInfo *aPacketInfo)
Cette fonction retourne un pointeur vers la charge utile du paquet Ethernet.
Definition: Ethernet.h:38
OPEN_NET_GLOBAL unsigned short * Ethernet_Destination(OPEN_NET_GLOBAL unsigned char *aBase, OPEN_NET_GLOBAL const OpenNet_PacketInfo *aPacketInfo)
Cette fonction retourne un pointeur vers l'adresse de destination.
Definition: Ethernet.h:86
Cette structure est utilisée pour passer les informations au sujet d'un paquet.
Definition: Types.h:55
OPEN_NET_GLOBAL unsigned short * Ethernet_Source(OPEN_NET_GLOBAL unsigned char *aBase, OPEN_NET_GLOBAL const OpenNet_PacketInfo *aPacketInfo)
Cette fonction retourne un pointeur vers l'adresse de source.
Definition: Ethernet.h:105
unsigned short Ethernet_Type(OPEN_NET_GLOBAL const unsigned char *aBase, OPEN_NET_GLOBAL const OpenNet_PacketInfo *aPacketInfo)
Cette fonction retourne le type du paquet Ethernet.
Definition: Ethernet.h:124
unsigned short Ethernet_VlanTag(OPEN_NET_GLOBAL const unsigned char *aBase, OPEN_NET_GLOBAL const OpenNet_PacketInfo *aPacketInfo)
Cette fonction retourne le tag VLAN.
Definition: Ethernet.h:170
int Ethernet_Vlan(OPEN_NET_GLOBAL const unsigned char *aBase, OPEN_NET_GLOBAL const OpenNet_PacketInfo *aPacketInfo)
Cette fonction indique si un tag VLAN est présent.
Definition: Ethernet.h:147