24 #ifndef __DECODE_VLAN_H__ 25 #define __DECODE_VLAN_H__ 31 #define ETHERNET_TYPE_VLAN 0x8100 34 #define GET_VLAN_PRIORITY(vlanh) ((SCNtohs((vlanh)->vlan_cfi) & 0xe000) >> 13) 35 #define GET_VLAN_CFI(vlanh) ((SCNtohs((vlanh)->vlan_cfi) & 0x0100) >> 12) 36 #define GET_VLAN_ID(vlanh) ((uint16_t)(SCNtohs((vlanh)->vlan_cfi) & 0x0FFF)) 37 #define GET_VLAN_PROTO(vlanh) ((SCNtohs((vlanh)->protocol))) 40 #define VLAN_GET_ID1(p) DecodeVLANGetId((p), 0) 41 #define VLAN_GET_ID2(p) DecodeVLANGetId((p), 1) 50 #define VLAN_HEADER_LEN 4 uint16_t DecodeVLANGetId(const struct Packet_ *, uint8_t layer)
void DecodeVLANRegisterTests(void)
struct VLANHdr_ __attribute__((__packed__)) VLANHdr
DNP3 link header.