Target: 2.5.0 (Tier 3 — L2 discovery & tunneling) — depends on
the 802.3 length-field/LLC-detection issue in this same tier.
Context
STP (IEEE 802.1D) BPDUs ride classic 802.3 + LLC framing — DSAP/SSAP
0x42, no SNAP — with no EtherType at all. This issue is undecodable
until the LLC-detection issue in this tier lands; it's filed now so
the tier's full shape is visible, not as work to start early.
Deliverable
Add netprotocols.STP (layer 2, dispatched from the new llc.dsap
table at DSAP 0x42):
- Decode the Configuration BPDU (IEEE 802.1D §9.3.1, 35 bytes):
Protocol ID, Protocol Version ID, BPDU Type, Flags, Root ID (Bridge
ID: 2-byte priority + 6-byte MAC), Root Path Cost, Bridge ID, Port
ID, Message Age, Max Age, Hello Time, Forward Delay — all in the
fixed-width, no-TLV shape this library already handles well.
- RSTP (802.1w) reuses the same BPDU shape with BPDU Type 0x02 and
one additional Version 1 Length byte (always 0 in practice) — decode
both Configuration and RSTP BPDUs as one class, branching on BPDU Type the way ICMPv4/ICMPv6 branch on message type.
- Topology Change Notification BPDUs (Type 0x80) are 4 bytes total
(Protocol ID, Version, Type) — trivial, decode as the same class's
short-form case.
Acceptance criteria
References
IEEE 802.1D §9.3, IEEE 802.1w (RSTP) · blocked by: the LLC-detection
issue, this tier (#173)
Part of #173
Target: 2.5.0 (Tier 3 — L2 discovery & tunneling) — depends on
the 802.3 length-field/LLC-detection issue in this same tier.
Context
STP (IEEE 802.1D) BPDUs ride classic 802.3 + LLC framing — DSAP/SSAP
0x42, no SNAP — with no EtherType at all. This issue is undecodable
until the LLC-detection issue in this tier lands; it's filed now so
the tier's full shape is visible, not as work to start early.
Deliverable
Add
netprotocols.STP(layer 2, dispatched from the newllc.dsaptable at DSAP 0x42):
Protocol ID, Protocol Version ID, BPDU Type, Flags, Root ID (Bridge
ID: 2-byte priority + 6-byte MAC), Root Path Cost, Bridge ID, Port
ID, Message Age, Max Age, Hello Time, Forward Delay — all in the
fixed-width, no-TLV shape this library already handles well.
one additional Version 1 Length byte (always 0 in practice) — decode
both Configuration and RSTP BPDUs as one class, branching on
BPDU Typethe wayICMPv4/ICMPv6branch on message type.(Protocol ID, Version, Type) — trivial, decode as the same class's
short-form case.
Acceptance criteria
STPdecodes Configuration, RSTP, and Topology ChangeNotification BPDUs;
bytes(STP.decode(x)) == x.STPvia the table added by theLLC-detection issue.
lab topology) and truncation.
References
IEEE 802.1D §9.3, IEEE 802.1w (RSTP) · blocked by: the LLC-detection
issue, this tier (#173)
Part of #173