dataplane

package
v0.0.0-...-5d52447 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface struct {
	Conn       net.PacketConn
	RemoteAddr net.Addr
}

Interface represents a router interface.

type Router

type Router struct {
	// Interfaces maps the SCION Interface ID to the underlying connection and remote address.
	Interfaces map[uint16]Interface
	// Key is the secret key used for MAC verification (AES-CMAC usually, here HMAC-SHA256).
	Key []byte
}

Router implements a SCION dataplane router.

func NewRouter

func NewRouter(key []byte) *Router

NewRouter creates a new Router.

func (*Router) AddInterface

func (r *Router) AddInterface(id uint16, conn net.PacketConn, remote net.Addr)

AddInterface adds an interface to the router.

func (*Router) Run

func (r *Router) Run()

Run starts the router. It reads from all interfaces sequentially and forwards packets. This function blocks.

Jump to

Keyboard shortcuts

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