classVLAN(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
)
Methodsdefinedhere:
---------------------
__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)'