VLAN(3)
β¨ VLAN(3) β¨
okay bestie, so this is the manual page for VLAN(3) from vlan 1.0 β yes, that's the whole vibe, we're doing network packet decoding today and honestly it's giving main character energy π
πΈ NAME πΈ
packet.link.vlan β the VLAN module, periodt π
π¦ DESCRIPTION π¦
It decodes the Virtual LAN IEEE 802.1Q/802.1ad layer. That's it, that's the whole job. Lowkey iconic of it. β¨
π CLASSES π
π class VLAN(baseobj.BaseObj)
The VLAN object itself. She's the main character fr fr.
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 π«Ά
It initializes the object's private data. Like, sets up her whole little world.
pkttβ Packet trace object (packet.pktt.Pktt) so this layer has access to the parent layers. She needs to know where she came from, iykyk. π
__str__(self)
String representation of the object. The way she presents herself to the world π
So here's the thing β the representation depends on the verbose level set by debug_repr():
- If set to
0, the generic object representation is returned. Basic. No thoughts, head empty. - 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. She said let me give you the FULL story π:
'802.1Q Virtual LAN, pcp: 4, dei: 0, vid: 2704, etype: 0x0800(IPv4)'
π§ FUNCTIONS π§
vlan_layers(pktt)
Get all the nested VLAN layers β so like stacked VLANs or QinQ, the whole squad π
A Packet layer attribute is created for each VLAN layer: vlan1, vlan2, ..., and vlan. The last packet attribute is always vlan. No cap, that's just how it is. π
β SEE ALSO β
baseobj(3), packet.link.ethernet_const(3)
Go read those too bestie, they're part of the lore π
π BUGS π
No known bugs. She's flawless. Not a single red flag. πβ¨
π AUTHOR π
Jorge Mora (mora@netapp.com) β shoutout to the icon who made this π«Άπ
and that's the whole page!! this was NFStest 3.2, dated 21 March 2023, and it's still VLAN(3) at the end of the day π
slay, bye bestie πβ¨π¦
π¦ where this page comes from
- debian trixie: nfstest 3.2-3
- fedora 43: NFStest 3.2-14.fc43 Β· GPL-2.0-or-later
- fedora 44: NFStest 3.2-16.fc44 Β· GPL-2.0-or-later
- ubuntu noble: nfstest 3.2-2
- ubuntu questing: nfstest 3.2-3
- ubuntu resolute: nfstest 3.2-3build1
- ubuntu stonking: nfstest 3.2-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms