scionutils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPolicyConn

func NewPolicyConn(c *snet.Conn, conf *PathAppConf) net.PacketConn

NewPolicyConn constructs a PolicyConn specified in the PathAppConf argument.

Types

type PathAppConf

type PathAppConf struct {
	// contains filtered or unexported fields
}

PathAppConf represents application paths configurations specified by the user using command-line arguments policy: SCION path policy pathSelection: path selection mode

func NewPathAppConf

func NewPathAppConf(policy *pathpol.Policy, pathSelection string) (*PathAppConf, error)

NewPathAppConf constructs a PathAppConf.

func (*PathAppConf) PathSelection

func (c *PathAppConf) PathSelection() PathSelection

PathSelection returns the PathSelection in the configuration.

func (*PathAppConf) Policy

func (c *PathAppConf) Policy() *pathpol.Policy

Policy returns the pathpol.Policy in the configuration.

type PathSelection

type PathSelection int

PathSelection represents a user-specified path selection mode. Arbitrary: arbitrary path selection Static: use the first selected path for the whole connection RoundRobin: iterate through available paths in a circular fashion

const (
	Arbitrary PathSelection = iota
	Static
	RoundRobin
)

Valid PathSelection values:

func PathSelectionFromString

func PathSelectionFromString(s string) (PathSelection, error)

PathSelectionFromString parses a string into a PathSelection.

type PathSelector

type PathSelector interface {
	// Reset initializes this path selector
	Reset([]snet.Path) error
	// Get implements the path selection logic specified in PathAppConf
	Next() snet.Path
}

PathSelector selects a path for a given address.

Jump to

Keyboard shortcuts

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