STP Constant Enumerations

STP_ProtocolVersion

STP Protocol Version Identifiers

STP_BPDUType

STP BPDU Types

STP_PortRole

STP Port Roles

Added in version 1.9.0.

STP Protocol Version Identifiers

Generated from pcapkit.vendor.stp.protocol_version.ProtocolVersion.

class pcapkit.const.stp.protocol_version.ProtocolVersion(*values)[source]

Bases: EnumRegistry, aenum.IntEnum

[ProtocolVersion] STP Protocol Version Identifiers [IEEE Std 802.1D-2004; IEEE Std 802.1Q-2022]

STP = 0

Spanning Tree Protocol: Configuration and TCN BPDUs [IEEE Std 802.1D-2004]

RSTP = 2

Rapid Spanning Tree Protocol: RST BPDUs [IEEE Std 802.1D-2004]

MSTP = 3

Multiple Spanning Tree Protocol: MST BPDUs [IEEE Std 802.1Q-2022]

SPT = 4

Shortest Path Tree: SPT BPDUs [IEEE Std 802.1Q-2022]

classmethod _validate_value(value)[source]

Reject value unless it passes the range check _missing_() makes.

Overrides _validate_value() with that check and the message it raises, so register() refuses exactly the values get() refuses, in the same words (#1816).

Parameters:

value (Any) – Value about to be looked up or minted.

Raises:

EnumValueError – If value fails that check. A ValueError, so an except ValueError caller is unaffected.

classmethod _missing_(value)[source]

Lookup function used when value is not found.

Parameters:

value (int) – Value to get enum item.

Return type:

ProtocolVersion

STP BPDU Types

Generated from pcapkit.vendor.stp.bpdu_type.BPDUType.

class pcapkit.const.stp.bpdu_type.BPDUType(*values)[source]

Bases: EnumRegistry, aenum.IntEnum

[BPDUType] STP BPDU Types [IEEE Std 802.1D-2004; IEEE Std 802.1Q-2022]

Configuration = 0

Configuration BPDU [IEEE Std 802.1D-2004]

RST = 2

RST BPDU, and the MST and SPT BPDUs [IEEE Std 802.1D-2004; IEEE Std 802.1Q-2022]

TCN = 128

Topology Change Notification BPDU [IEEE Std 802.1D-2004]

classmethod _validate_value(value)[source]

Reject value unless it passes the range check _missing_() makes.

Overrides _validate_value() with that check and the message it raises, so register() refuses exactly the values get() refuses, in the same words (#1816).

Parameters:

value (Any) – Value about to be looked up or minted.

Raises:

EnumValueError – If value fails that check. A ValueError, so an except ValueError caller is unaffected.

classmethod _missing_(value)[source]

Lookup function used when value is not found.

Parameters:

value (int) – Value to get enum item.

Return type:

BPDUType

STP Port Roles

Generated from pcapkit.vendor.stp.port_role.PortRole.

class pcapkit.const.stp.port_role.PortRole(*values)[source]

Bases: EnumRegistry, aenum.IntEnum

[PortRole] STP Port Roles [IEEE Std 802.1Q-2022]

Master = 0

Master Port in the MSTI Flags; Unknown in the CIST Flags, as IEEE Std 802.1D-2004 names it [IEEE Std 802.1Q-2022]

Alternate_or_Backup = 1

Alternate or Backup Port [IEEE Std 802.1Q-2022]

Root = 2

Root Port [IEEE Std 802.1Q-2022]

Designated = 3

Designated Port [IEEE Std 802.1Q-2022]

classmethod _validate_value(value)[source]

Reject value unless it passes the range check _missing_() makes.

Overrides _validate_value() with that check and the message it raises, so register() refuses exactly the values get() refuses, in the same words (#1816).

Parameters:

value (Any) – Value about to be looked up or minted.

Raises:

EnumValueError – If value fails that check. A ValueError, so an except ValueError caller is unaffected.

classmethod _missing_(value)[source]

Lookup function used when value is not found.

Parameters:

value (int) – Value to get enum item.

Return type:

PortRole