sigconfig

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 7 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  env.Logging
	Metrics  env.Metrics
	Sciond   env.SciondClient `toml:"sd_client"`
	Sig      SigConf
}

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
	// The SIG config json file. (required)
	SIGConfig string
	// IA the local IA (required)
	IA addr.IA
	// IP the bind IP address (required)
	IP net.IP
	// Control data port, e.g. keepalives. (default DefaultCtrlPort)
	CtrlPort uint16
	// Encapsulation data port. (default DefaultEncapPort)
	EncapPort uint16
	// SCION dispatcher path. (default "")
	Dispatcher string
	// Name of TUN device to create. (default DefaultTunName)
	Tun string
	// TunRTableId the id of the routing table used in the SIG. (default DefaultTunRTableId)
	TunRTableId int
	// IPv4 source address hint to put into routing table.
	SrcIP4 net.IP
	// IPv6 source address hint to put into routing table.
	SrcIP6 net.IP
}

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