path

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: 19 Imported by: 0

Documentation

Overview

Package path implements snet.Path with full metadata This is used by libraries that provide paths for applications to use, such as the path combinator and the SCION Daemon API. Applications using snet will not usually make use of this package directly.

TODO(matzf): perhaps moving empty path and partial path here too could be a nice cleanup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EPIC added in v0.7.0

type EPIC struct {
	AuthPHVF []byte
	AuthLHVF []byte
	SCION    []byte
	// contains filtered or unexported fields
}

func NewEPICDataplanePath added in v0.7.0

func NewEPICDataplanePath(p SCION, auths snet.EpicAuths) (*EPIC, error)

func (*EPIC) SetPath added in v0.7.0

func (e *EPIC) SetPath(s *slayers.SCION) error

type Empty added in v0.7.0

type Empty struct{}

func (Empty) SetPath added in v0.7.0

func (e Empty) SetPath(s *slayers.SCION) error

type OneHop added in v0.7.0

type OneHop struct {
	Info      path.InfoField
	FirstHop  path.HopField
	SecondHop path.HopField
}

func NewOneHop added in v0.7.0

func NewOneHop(
	egress uint16,
	timestamp time.Time,
	expiration uint8,
	mac hash.Hash,
) (OneHop, error)

NewOneHop creates a onehop path that has the first hopfield initialized.

func (OneHop) SetPath added in v0.7.0

func (p OneHop) SetPath(s *slayers.SCION) error

type Path

type Path struct {
	Src           addr.IA
	Dst           addr.IA
	DataplanePath snet.DataplanePath
	NextHop       *net.UDPAddr
	Meta          snet.PathMetadata
}

Path is an snet.Path with full metadata

func (Path) Dataplane added in v0.7.0

func (p Path) Dataplane() snet.DataplanePath

func (Path) Destination

func (p Path) Destination() addr.IA

func (Path) Metadata

func (p Path) Metadata() *snet.PathMetadata

func (Path) Source added in v0.7.0

func (p Path) Source() addr.IA

func (Path) String

func (p Path) String() string

func (Path) UnderlayNextHop

func (p Path) UnderlayNextHop() *net.UDPAddr

type SCION added in v0.7.0

type SCION struct {
	// Raw is the raw representation of this path. This data should not be
	// modified because it is potentially shared.
	Raw []byte
}

func NewSCIONFromDecoded added in v0.7.0

func NewSCIONFromDecoded(d scion.Decoded) (SCION, error)

NewSCIONFromDecoded serializes the decoded SCION path into a dataplane path.

func (SCION) SetPath added in v0.7.0

func (p SCION) SetPath(s *slayers.SCION) error

Jump to

Keyboard shortcuts

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