C_Tag - 802.1Q Customer VLAN Tag Type

pcapkit.protocols.link.c_tag contains C_Tag only, which implements extractor for the 802.1Q Customer VLAN Tag Type (C-Tag) [*], EtherType 0x8100.

Its structure, and all of its parsing and construction, come from VLAN; this class adds only the tag’s own identity – name, alias, info_name, id() – and its registry index.

It has a module of its own, apart from S_Tag, because the two are reached through different registry indices, 0x8100 against 0x88A8; see pcapkit.protocols.link.vlan for the rule.

class pcapkit.protocols.link.c_tag.C_Tag(file=None, length=None, **kwargs)[source]

Bases: VLAN

This class implements 802.1Q Customer VLAN Tag Type.

Added in version 1.5.0: Takes over the customer tag from VLAN.

property name: Literal['802.1Q Customer VLAN Tag Type']

Name of current protocol.

property alias: Literal['802.1Q']

Acronym of corresponding protocol.

property info_name: Literal['c_tag']

Key name of the info dict.

classmethod id()[source]

Index ID of the protocol.

Return type:

tuple[Literal['C_Tag'], Literal['VLAN']]

Returns:

Index ID of the protocol. VLAN is retained alongside the class’s own name so that selecting VLAN tags by that name, e.g. pcapkit.extract(..., protocol='VLAN'), matches the customer tag; S_Tag carries the same alias.

classmethod __index__()[source]

Numeral registry index of the protocol.

Return type:

EtherType

Returns:

Numeral registry index of the protocol in IANA.

Footnotes