55 const uint8_t *pkt, uint32_t
len)
72 if (!PacketIncreaseCheckLayers(
p)) {
80 VLANHdr *vlan_hdr = (VLANHdr *)pkt;
84 SCLogDebug(
"p %p pkt %p VLAN protocol %04x VLAN PRI %d VLAN CFI %d VLAN ID %d Len: %" PRIu32
"",
104 #define IEEE8021AH_HEADER_LEN sizeof(IEEE8021ahHdr)
107 const uint8_t *pkt, uint32_t
len)
118 if (!PacketIncreaseCheckLayers(
p)) {
121 IEEE8021ahHdr *hdr = (IEEE8021ahHdr *)pkt;
122 const uint16_t next_proto =
SCNtohs(hdr->type);
124 DecodeNetworkLayer(
tv,
dtv, next_proto,
p,
144 static int DecodeVLANtest01 (
void)
146 uint8_t raw_vlan[] = { 0x00, 0x20, 0x08 };
167 static int DecodeVLANtest02 (
void)
169 uint8_t raw_vlan[] = {
170 0x00, 0x20, 0x01, 0x00, 0x45, 0x00, 0x00, 0x34,
171 0x3b, 0x36, 0x40, 0x00, 0x40, 0x06, 0xb7, 0xc9,
172 0x83, 0x97, 0x20, 0x81, 0x83, 0x97, 0x20, 0x15,
173 0x04, 0x8a, 0x17, 0x70, 0x4e, 0x14, 0xdf, 0x55,
174 0x4d, 0x3d, 0x5a, 0x61, 0x80, 0x10, 0x6b, 0x50,
175 0x3c, 0x4c, 0x00, 0x00, 0x01, 0x01, 0x08, 0x0a,
176 0x00, 0x04, 0xf0, 0xc8, 0x01, 0x99, 0xa3, 0xf3};
197 static int DecodeVLANtest03 (
void)
199 uint8_t raw_vlan[] = {
200 0x00, 0x20, 0x08, 0x00, 0x45, 0x00, 0x00, 0x34,
201 0x3b, 0x36, 0x40, 0x00, 0x40, 0x06, 0xb7, 0xc9,
202 0x83, 0x97, 0x20, 0x81, 0x83, 0x97, 0x20, 0x15,
203 0x04, 0x8a, 0x17, 0x70, 0x4e, 0x14, 0xdf, 0x55,
204 0x4d, 0x3d, 0x5a, 0x61, 0x80, 0x10, 0x6b, 0x50,
205 0x3c, 0x4c, 0x00, 0x00, 0x01, 0x01, 0x08, 0x0a,
206 0x00, 0x04, 0xf0, 0xc8, 0x01, 0x99, 0xa3, 0xf3};