-/* Copyright (C) 2007-2021 Open Information Security Foundation
+/* Copyright (C) 2007-2022 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
return TM_ECODE_OK;
}
-uint16_t DecodeVLANGetId(const Packet *p, uint8_t layer)
-{
- if (unlikely(layer > 2))
- return 0;
- if (p->vlan_idx > layer) {
- return p->vlan_id[layer];
- }
- return 0;
-}
-
typedef struct IEEE8021ahHdr_ {
uint32_t flags;
uint8_t c_destination[6];
-/* Copyright (C) 2007-2010 Open Information Security Foundation
+/* Copyright (C) 2007-2022 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
#define GET_VLAN_ID(vlanh) ((uint16_t)(SCNtohs((vlanh)->vlan_cfi) & 0x0FFF))
#define GET_VLAN_PROTO(vlanh) ((SCNtohs((vlanh)->protocol)))
-/* return vlan id in host byte order */
-#define VLAN_GET_ID1(p) DecodeVLANGetId((p), 0)
-#define VLAN_GET_ID2(p) DecodeVLANGetId((p), 1)
-#define VLAN_GET_ID3(p) DecodeVLANGetId((p), 2)
-
/** Vlan header struct */
typedef struct VLANHdr_ {
uint16_t vlan_cfi;