Documentation ¶
Overview ¶
Package combinator contains methods for constructing SCION forwarding paths.
Call Combine to grab all the metadata associated with the constructed paths.
Returned paths are sorted by weight in descending order. The weight is defined as the number of transited AS hops in the path.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Path ¶
type Path struct { Dst addr.IA SCIONPath path.SCION Metadata snet.PathMetadata Weight int // XXX(matzf): unused, drop this? }
func Combine ¶
Combine constructs paths between src and dst using the supplied segments. All possible paths are first computed, and then filtered according to filterLongPaths.
Normally, with findAllIdentical=false, Combine returns one path for each unique sequence of path interfaces found. If there are multiple ways to construct the same sequence of path interfaces from the available path segments, the construction with latest expiration time will be returned.
With findAllIdentical=true, Combine may return multiple paths with identical sequences of path interfaces, but constructed from different path segments. These forwarding paths can only be destinguished by the segment IDs and the hop field MACs. Typically, all of these will have exactly the same forwarding behaviour, but it is possible that an AS would misbehave and change behaviour based on the segment IDs or MACs. An application can use findAllIdentical=true in order to explore whether this may be the case. Note that this may return a large number of paths for wide network topologies.
The remaining paths are returned sorted according to weight (on equal weight, see pathSolutionList.Less for the tie-breaking algorithm).
If Combine cannot extract a hop field or info field from the segments, it panics.