Add a structured parser for the BGP Traffic Engineering attribute (code 24, RFC 5543).
Currently this attribute is raw-retained (AttributeValue::Raw). Full semantic support needs a custom parser because the wire format is a complex fixed+variable GMPLS ISCD descriptor rather than a simple TLV list.
Wire format
Switching Capability (1 octet)
Encoding (1 octet)
Reserved (2 octets)
Max LSP Bandwidth at priority 0-7 (8 × 4 bytes, IEEE float)
Switching Capability specific information (variable)
The content and length of the variable tail depend on the Switching Capability field (PSC-1/2/3/4, etc.).
Proposed scope
- Add a
TrafficEngineering model struct with the fixed fields and a raw Bytes field for the switching-capability-specific tail.
- Add
parse_traffic_engineering and encode_traffic_engineering functions.
- Wire
AttrType::TRAFFIC_ENGINEERING in the parser and encoder (currently raw-retained).
- Add tests for:
- PSC-1 format with Minimum LSP Bandwidth and Interface MTU
- unknown switching capability type → retain raw tail
- malformed/truncated input
- round-trip encode/decode
Out of scope
- Full GMPLS ISCD semantic decoding (switching-capability-specific TLV parsing).
- Policy validation based on TE data.
- Integration with other TE/GMPLS features.
References
Add a structured parser for the BGP Traffic Engineering attribute (code 24, RFC 5543).
Currently this attribute is raw-retained (
AttributeValue::Raw). Full semantic support needs a custom parser because the wire format is a complex fixed+variable GMPLS ISCD descriptor rather than a simple TLV list.Wire format
The content and length of the variable tail depend on the
Switching Capabilityfield (PSC-1/2/3/4, etc.).Proposed scope
TrafficEngineeringmodel struct with the fixed fields and a rawBytesfield for the switching-capability-specific tail.parse_traffic_engineeringandencode_traffic_engineeringfunctions.AttrType::TRAFFIC_ENGINEERINGin the parser and encoder (currently raw-retained).Out of scope
References