VLAN
Section: vlan 1.0 (3)
Updated: 19 July 2021
Index
Return to Main Contents
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)
Index
- NAME
-
- DESCRIPTION
-
- CLASSES
-
- class VLAN(baseobj.BaseObj)
-
- FUNCTIONS
-
- vlan_layers(pktt)
-
- SEE ALSO
-
- BUGS
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 16:08:34 GMT, July 19, 2021