sigconfig

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCtrlPort    = 30256
	DefaultEncapPort   = 30056
	DefaultTunName     = "sig"
	DefaultTunRTableId = 11
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Features env.Features
	Logging  log.Config       `toml:"log,omitempty"`
	Metrics  env.Metrics      `toml:"metrics,omitempty"`
	Sciond   env.SCIONDClient `toml:"sciond_connection,omitempty"`
	Sig      SigConf          `toml:"sig,omitempty"`
}

func (*Config) ConfigName

func (cfg *Config) ConfigName() string

func (*Config) InitDefaults

func (cfg *Config) InitDefaults()

func (*Config) Sample

func (cfg *Config) Sample(dst io.Writer, path config.Path, _ config.CtxMap)

func (*Config) Validate

func (cfg *Config) Validate() error

type SigConf

type SigConf struct {
	// ID of the SIG (required)
	ID string `toml:"id,omitempty"`
	// The SIG config json file. (required)
	SIGConfig string `toml:"sig_config,omitempty"`
	// IA the local IA (required)
	IA addr.IA `toml:"isd_as,omitempty"`
	// IP the bind IP address (required)
	IP net.IP `toml:"ip,omitempty"`
	// Control data port, e.g. keepalives. (default DefaultCtrlPort)
	CtrlPort uint16 `toml:"ctrl_port,omitempty"`
	// Encapsulation data port. (default DefaultEncapPort)
	EncapPort uint16 `toml:"encap_port,omitempty"`
	// Name of TUN device to create. (default DefaultTunName)
	Tun string `toml:"tun,omitempty"`
	// TunRTableId the id of the routing table used in the SIG. (default DefaultTunRTableId)
	TunRTableId int `toml:"tun_routing_table_id,omitempty"`
	// IPv4 source address hint to put into routing table.
	SrcIP4 net.IP `toml:"src_ipv4,omitempty"`
	// IPv6 source address hint to put into routing table.
	SrcIP6 net.IP `toml:"src_ipv6,omitempty"`
	// DispatcherBypass is the overlay address (e.g. ":30041") to use when bypassing SCION
	// dispatcher. If the field is empty bypass is not done and SCION dispatcher is used
	// instead.
	DispatcherBypass string `toml:"disaptcher_bypass,omitempty"`
}

SigConf contains the configuration specific to the SIG.

func (*SigConf) ConfigName

func (cfg *SigConf) ConfigName() string

func (*SigConf) InitDefaults

func (cfg *SigConf) InitDefaults()

InitDefaults sets the default values to unset values.

func (*SigConf) Sample

func (cfg *SigConf) Sample(dst io.Writer, path config.Path, ctx config.CtxMap)

func (*SigConf) Validate

func (cfg *SigConf) Validate() error

Validate validate the config and returns an error if a value is not valid.

Jump to

Keyboard shortcuts

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