decode/vlan: Remove unused macros/functions

This commit removes unused functions and macros related to fetching VLAN
values.
pull/8965/head
Jeff Lucovsky 3 years ago committed by Victor Julien
parent 0d2268ddfc
commit 0ff403fb60

@ -1,4 +1,4 @@
/* 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
@ -95,16 +95,6 @@ int DecodeVLAN(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p,
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];

@ -1,4 +1,4 @@
/* 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
@ -36,11 +36,6 @@ uint16_t DecodeVLANGetId(const struct Packet_ *, uint8_t layer);
#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;

Loading…
Cancel
Save