scion

package
v0.0.0-...-4310ded Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KEYPATH = "/go/src/github.com/scionproto/scion/gen-certs/tls.key"
	PEMPATH = "/go/src/github.com/scionproto/scion/gen-certs/tls.pem"
)

Variables

This section is empty.

Functions

func DefaultPathSelector

func DefaultPathSelector(paths []*sciond.PathReplyEntry) *sciond.PathReplyEntry

func ParseAddress

func ParseAddress(addr string) (host string, port int, err error)

func ParseCompleteAddress

func ParseCompleteAddress(addr string) (host string, port int, err error)

 Parses addresses that contain transport layer information, e.g. (UDP)

Types

type Address

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

 Should be treated immutable

func ConvertAddress

func ConvertAddress(addr string) (Address, error)

func (Address) Addr

func (addr Address) Addr() snet.Addr

func (Address) Host

func (addr Address) Host() string

func (Address) Network

func (addr Address) Network() string

func (Address) Port

func (addr Address) Port() int

func (Address) String

func (addr Address) String() string

type Connection

type Connection struct {
	quic.Stream
	// contains filtered or unexported fields
}

func Dial

func Dial(local, remote Address, selector PathSelector) (*Connection, error)

func DialAddr

func DialAddr(localAddr, remoteAddr string, selector PathSelector) (*Connection, error)

func NewSQuicConnection

func NewSQuicConnection(stream quic.Stream, local, remote Address) *Connection

func (*Connection) Close

func (conn *Connection) Close() error

func (*Connection) LocalAddr

func (conn *Connection) LocalAddr() net.Addr

func (*Connection) LocalAddress

func (conn *Connection) LocalAddress() Address

Contains address with readable port etc  There should be another way to handle this, together with net.Addr

func (*Connection) RemoteAddr

func (conn *Connection) RemoteAddr() net.Addr

func (*Connection) RemoteAddress

func (conn *Connection) RemoteAddress() Address

type Listener

type Listener struct {
	Address
	// contains filtered or unexported fields
}

func Listen

func Listen(address string) (*Listener, error)

func (*Listener) Accept

func (listener *Listener) Accept() (*Connection, error)

func (*Listener) Close

func (listener *Listener) Close() error

type PathSelector

type PathSelector func([]*sciond.PathReplyEntry) *sciond.PathReplyEntry

type Rotator

type Rotator struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewRotator

func NewRotator(max int) *Rotator

func (*Rotator) GetNumberOfUsedPaths

func (r *Rotator) GetNumberOfUsedPaths() int

func (*Rotator) PathSelector

func (r *Rotator) PathSelector(paths []*sciond.PathReplyEntry) *sciond.PathReplyEntry

func (*Rotator) Reset

func (r *Rotator) Reset(max int)

type StaticSelector

type StaticSelector struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewStaticSelector

func NewStaticSelector() *StaticSelector

func (*StaticSelector) PathSelector

func (selector *StaticSelector) PathSelector(paths []*sciond.PathReplyEntry) *sciond.PathReplyEntry

func (*StaticSelector) Reset

func (selector *StaticSelector) Reset()

Jump to

Keyboard shortcuts

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