Skip to content

Add structured parser for Traffic Engineering attribute (RFC 5543, code 24) #290

Description

@digizeph

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions