underlay

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package underlay holds the facts of the UDP/IP network beneath SCION that the data plane shares with the node's sockets: the end-host port, the largest datagram, the underlay types, and the resolution of underlay addresses. A shared library: no loops of its own, no policy.

Index

Constants

View Source
const (
	UDPIPv4Name  = "UDP/IPv4"
	UDPIPv6Name  = "UDP/IPv6"
	UDPIPv46Name = "UDP/IPv4+6"
)
View Source
const BufferSize = 9000

BufferSize is the largest datagram the underlay carries, a jumbo frame: the data plane's packet buffers and the SCION sockets' reads are this size.

View Source
const (
	// EndhostPort is the underlay port that SCION binds to on non-routers. Subject to
	// change during standardisation.
	EndhostPort = 30041
)

Variables

This section is empty.

Functions

func ResolveAddrPort

func ResolveAddrPort(s string) (netip.AddrPort, error)

ResolveAddrPort resolves a "host:port" address whose host names an address. IPv4 addresses in the v4-mapped IPv6 form are normalized to plain IPv4.

func ResolveAddrPortDefault added in v0.0.2

func ResolveAddrPortDefault(s string, defaultPort uint16) (netip.AddrPort, error)

ResolveAddrPortDefault resolves an address as ResolveAddrPort does, a form without a port naming the given default port instead.

func ResolveLocalAddr

func ResolveLocalAddr(s string) (*net.UDPAddr, error)

ResolveLocalAddr resolves a local address of the form "host:port". The host part may be empty, meaning any address. IPv4 addresses in the v4-mapped IPv6 form are normalized to plain IPv4.

Types

type Type

type Type int
const (
	Invalid Type = iota
	UDPIPv4
	UDPIPv6
	UDPIPv46
)

func TypeFromString

func TypeFromString(s string) (Type, error)

func (Type) IsUDP

func (ot Type) IsUDP() bool

func (Type) MarshalJSON

func (ot Type) MarshalJSON() ([]byte, error)

func (Type) String

func (ot Type) String() string

func (*Type) UnmarshalJSON

func (ot *Type) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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