1VLAN(3) vlan 1.0 VLAN(3)
2
3
4
6 packet.link.vlan - VLAN module
7
9 Decode Virtual LAN IEEE 802.1Q/802.1ad layer
10
12 class VLAN(baseobj.BaseObj)
13 VLAN object
14
15 Usage:
16 from packet.link.vlan import VLAN
17
18 x = VLAN(pktt)
19
20 Object definition:
21
22 VLAN(
23 pcp = int, # Priority Point Code
24 dei = int, # Drop Eligible Indicator
25 vid = int, # VLAN Identifier
26 etype = int, # Payload Type
27 psize = int, # Payload Data Size
28 )
29
30
31 Methods defined here:
32 ---------------------
33
34 __init__(self, pktt)
35 Constructor
36
37 Initialize object's private data.
38
39
40 pktt: Packet trace object (packet.pktt.Pktt) so this layer has
41 access to the parent layers.
42
43 __str__(self)
44 String representation of object
45
46 The representation depends on the verbose level set by debug_repr().
47 If set to 0 the generic object representation is returned.
48 If set to 1 the representation of the object is condensed:
49 '802.1Q VLAN pcp: 4, dei: 0, vid: 2704 '
50
51 If set to 2 the representation of the object also includes the type
52 of payload:
53 '802.1Q Virtual LAN, pcp: 4, dei: 0, vid: 2704, etype: 0x0800(IPv4)'
54
56 vlan_layers(pktt)
57 Get all nested (stacked VLANs or QinQ) VLAN layers
58 A Packet layer attribute is created for each VLAN layer:
59 vlan1, vlan2, ..., and vlan. The last packet attribute
60 is always vlan.
61
63 baseobj(3), packet.link.ethernet_const(3)
64
65
67 No known bugs.
68
70 Jorge Mora (mora@netapp.com)
71
72
73
74NFStest 3.2 21 March 2023 VLAN(3)