Skip to content

snet: add extension header support to DataplanePath and PacketInfo #4628

Open
@marcodermatt

Description

@marcodermatt

For the implementation of the FABRID protocol in scionlab (netsec-ethz#168) it was necessary to access Hop-by-Hop and End-to-End extension headers during serialization and decoding of the packet.

We added a new SetExtensions function to the DataplanePath interface, which is called in packet.go. For existing DataplanePaths (onehop, scion, etc.) this function just returns nil.

// DataplanePath is an abstract representation of a SCION dataplane path.
type DataplanePath interface {
	// SetPath sets the path in the SCION header. It assumes that all the fields
	// except the path and path type are set correctly.
	SetPath(scion *slayers.SCION) error
	// SetExtensions sets the HBH and E2E extension headers. It is called directly after
	// the SetPath function.
	SetExtensions(s *slayers.SCION, p *PacketInfo) error
}

The complete code changes can be found in this commit (marcodermatt@576373e) which is independent of FABRID.

This would also allow implementing EPIC-HP as an HBH-option (#4099).

Metadata

Metadata

Assignees

No one assigned

    Labels

    i/proposalA new idea requiring additional input and discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions