onehop

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const PathLen = path.InfoLen + 2*path.HopLen

PathLen is the length of a serialized one hop path in bytes.

View Source
const PathType path.Type = 2

Variables

This section is empty.

Functions

func RegisterPath

func RegisterPath()

Types

type Path

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

Path encodes a one hop path. A one hop path is a special path that is created by a SCION router in the first AS and completed by a SCION router in the second AS. It is used during beaconing when there is not yet any other path segment available.

func (*Path) DecodeFromBytes

func (o *Path) DecodeFromBytes(data []byte) error

func (*Path) Len

func (o *Path) Len() int

func (*Path) Reverse

func (o *Path) Reverse() (path.Path, error)

Rerverse a OneHop path that returns a reversed SCION path.

func (*Path) SerializeTo

func (o *Path) SerializeTo(b []byte) error

func (*Path) ToSCIONDecoded

func (o *Path) ToSCIONDecoded() (*scion.Decoded, error)

ToSCIONDecoded converts the one hop path in to a normal SCION path in the decoded format.

func (*Path) Type

func (o *Path) Type() path.Type

Jump to

Keyboard shortcuts

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