dispatcher

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ErrUnsupportedL4 common.ErrMsg = "unsupported SCION L4 protocol"

Variables

This section is empty.

Functions

func ListenAndServe added in v0.12.0

func ListenAndServe(
	isDispatcher bool,
	svcAddrs map[addr.Addr]netip.AddrPort,
	addr *net.UDPAddr,
) error

Types

type Server

type Server struct {

	// TODO(JordiSubira): This may be taken from daemon for non self-contained
	// applications.
	ServiceAddresses map[addr.Addr]netip.AddrPort
	// contains filtered or unexported fields
}

Server is the main object allowing to forward SCION packets coming from legacy BR to the final endhost application and to handle SCMP info packets destined to this endhost.

func NewServer

func NewServer(
	isDispatcher bool,
	svcAddrs map[addr.Addr]netip.AddrPort,
	conn *net.UDPConn,
) *Server

NewServer creates new instance of Server.

func (*Server) Serve

func (s *Server) Serve() error

Serve starts reading packets from network and dispatching them to the end application. It also replies to SCMPEchoRequest and SCMPTracerouteRequest. The function blocks and returns if there's an error or when Close has been called.

Directories

Path Synopsis
cmd
Package config contains the configuration of the SCION dispatcher.
Package config contains the configuration of the SCION dispatcher.
Package mgmtapi provides primitives to interact with the openapi HTTP API.
Package mgmtapi provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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