VLAN - 802.1Q Customer VLAN Tag Type¶
pcapkit.protocols.link.vlan
contains
VLAN
only, which implements extractor for 802.1Q
Customer VLAN Tag Type *, whose structure is
described as below:
Octets |
Bits |
Name |
Description |
---|---|---|---|
1 |
0 |
|
Tag Control Information |
1 |
0 |
|
Priority Code Point |
1 |
3 |
|
Drop Eligible Indicator |
1 |
4 |
|
VLAN Identifier |
3 |
24 |
|
Protocol (Internet Layer) |
- class pcapkit.protocols.link.vlan.VLAN(file=None, length=None, **kwargs)[source]¶
-
This class implements 802.1Q Customer VLAN Tag Type.
- Parameters
*args (Any) – Arbitrary positional arguments.
**kwargs (Any) – Arbitrary keyword arguments.
- Return type
Protocol[PT]
- classmethod __index__()[source]¶
Numeral registry index of the protocol.
- Raises
UnsupportedCall – This protocol has no registry entry.
- Return type
- property name: Literal['802.1Q Customer VLAN Tag Type']¶
Name of current protocol.
- Return type
Literal
[‘802.1Q Customer VLAN Tag Type’]
- read(length=None, **kwargs)[source]¶
Read 802.1Q Customer VLAN Tag Type.
Structure of 802.1Q Customer VLAN Tag Type [IEEE 802.1Q]:
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TCI | | |-------------------------------| | | P |D| | Type | | C |E| VID | | | P |I| | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Data Structures¶
- class pcapkit.protocols.data.link.vlan.VLAN(tci, type)[source]¶
Bases:
Info
Data model for 802.1Q customer VLAN tag type.
- Parameters
*args (VT) – Arbitrary positional arguments.
**kwargs (VT) – Arbitrary keyword arguments.
- Return type
- class pcapkit.protocols.data.link.vlan.TCI(pcp, dei, vid)[source]¶
Bases:
Info
Data model for tag control information.
- Parameters
*args (VT) – Arbitrary positional arguments.
**kwargs (VT) – Arbitrary keyword arguments.
- Return type
- pcp: PriorityLevel¶
Priority code point.