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]¶ Bases:
pcapkit.protocols.link.link.LinkThis class implements 802.1Q Customer VLAN Tag Type.
-
classmethod
__index__()[source]¶ Numeral registry index of the protocol.
- Raises
UnsupportedCall – This protocol has no registry entry.
-
make(**kwargs)[source]¶ Make (construct) packet data.
- Keyword Arguments
**kwargs – Arbitrary keyword arguments.
- Returns
Constructed packet data.
- Return type
-
read(length=None, **kwargs)[source]¶ Read 802.1Q Customer VLAN Tag Type.
- Parameters
length (Optional[int]) – Length of packet data.
- Keyword Arguments
**kwargs – Arbitrary keyword arguments.
- Returns
Parsed packet data.
- Return type
-
property
alias¶ Acronym of corresponding protocol.
- Return type
Literal[‘802.1Q’]
-
property
length¶ Header length of current protocol.
- Return type
Literal[4]
-
property
name¶ Name of current protocol.
- Return type
Literal[‘802.1Q Customer VLAN Tag Type’]
-
property
protocol¶ Name of next layer protocol.
- Return type
-
classmethod
Data Structure¶
Important
Following classes are only for documentation purpose.
They do NOT exist in the pcapkit module.
-
class
pcapkit.protocols.link.vlan.DataType_VLAN¶ - Bases
TypedDict
IEEE 802.1Q customer VLAN tag type [RFC 7042].
-
tci: DataType_TCI¶ Tag control information.
-
type: pcapkit.const.reg.ethertype.EtherType¶ Protocol (internet layer).
-
class
pcapkit.protocols.link.vlan.DataType_TCI¶ - Bases
TypedDict
Tag control information.
-
pcp: pcapkit.const.vlan.priority_level.PriorityLevel¶ Priority code point.