path

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 19 Imported by: 2

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

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

func NewEPICDataplanePath

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

func (*EPIC) SetPath

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

type Empty

type Empty struct{}

func (Empty) SetPath

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

type OneHop

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

func NewOneHop

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

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

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

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

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

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

NewSCIONFromDecoded serializes the decoded SCION path into a dataplane path.

func (SCION) SetPath

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