combinator

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

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

func Combine(src, dst addr.IA, ups, cores, downs []*seg.PathSegment,
	findAllIdentical bool) []Path

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL