VLAN(3) | vlan 1.0 | VLAN(3) |
NAME¶
packet.link.vlan - VLAN module
DESCRIPTION¶
Decode Virtual LAN IEEE 802.1Q/802.1ad layer
CLASSES¶
class VLAN(baseobj.BaseObj)¶
VLAN object Usage:
from packet.link.vlan import VLAN
x = VLAN(pktt) Object definition: VLAN(
pcp = int, # Priority Point Code
dei = int, # Drop Eligible Indicator
vid = int, # VLAN Identifier
etype = int, # Payload Type
psize = int, # Payload Data Size )
Methods defined here: ---------------------
__init__(self, pktt) Constructor Initialize object's private data.
- pktt:
-
Packet trace object (packet.pktt.Pktt) so this layer has access to the parent layers.
__str__(self) String representation of object The representation depends on the verbose level set by debug_repr(). If set to 0 the generic object representation is returned. If set to 1 the representation of the object is condensed:
'802.1Q VLAN pcp: 4, dei: 0, vid: 2704 ' If set to 2 the representation of the object also includes the type of payload:
'802.1Q Virtual LAN, pcp: 4, dei: 0, vid: 2704, etype: 0x0800(IPv4)'
FUNCTIONS¶
vlan_layers(pktt) Get all nested (stacked VLANs or QinQ) VLAN layers A Packet layer attribute is created for each VLAN layer: vlan1, vlan2, ..., and vlan. The last packet attribute is always vlan.
SEE ALSO¶
baseobj(3), packet.link.ethernet_const(3)
BUGS¶
No known bugs.
AUTHOR¶
Jorge Mora (mora@netapp.com)
21 March 2023 | NFStest 3.2 |