Documentation ¶
Index ¶
Constants ¶
View Source
const ( DockerRouterImage = "topomate/router" DockerRSImage = "topomate/route-server" DockerRTRImage = "topomate/rtr" )
Variables ¶
View Source
var ASOnly []int
View Source
var ConfigDir string
View Source
var VFlag bool
Functions ¶
This section is empty.
Types ¶
type ASConfig ¶
type ASConfig struct { ASN int `yaml:"asn,omitempty"` NumRouters int `yaml:"routers,omitempty"` IGP string `yaml:"igp,omitempty"` ISIS ISISConfig `yaml:"isis"` OSPF OSPFConfig `yaml:"ospf"` Prefix string `yaml:"prefix,omitempty"` SubnetLength int `yaml:"subnet_length"` LoRange string `yaml:"loopback_start,omitempty"` BGP BGPConfig `yaml:"bgp"` Links InternalLinks `yaml:"links,omitempty"` MPLS bool `yaml:"mpls,omitempty"` VPN []VPNConfig RPKI struct { Servers []string `yaml:"servers"` } `yaml:"rpki"` }
type BGPConfig ¶
type BGPConfig struct { IBGP IBGPConfig `yaml:"ibgp"` Disabled bool `yaml:"disabled"` RedistributeIGP bool `yaml:"redistribute_igp"` }
type BGPRelationConfig ¶
type BaseConfig ¶
type BaseConfig struct { Name string `yaml:"name,omitempty"` Global GlobalConfig `yaml:"global_settings"` AS []ASConfig `yaml:"autonomous_systems"` ExternalFile string `yaml:"external_links_file"` External []ExternalLink `yaml:"external_links"` IXPs []IXPConfig `yaml:"ixps"` RPKI map[string]RPKIConfig `yaml:"rpki"` }
type ExternalLink ¶
type ExternalLink struct { From ExternalLinkItem `yaml:"from"` To ExternalLinkItem `yaml:"to"` Relationship string `yaml:"rel"` }
type ExternalLinkItem ¶
type GlobalBGPConfig ¶
type GlobalBGPConfig struct { Provider BGPRelationConfig `yaml:"provider,omitempty"` Customer BGPRelationConfig `yaml:"customer,omitempty"` Peer BGPRelationConfig `yaml:"peer,omitempty"` }
var DefaultBGPSettings GlobalBGPConfig
func (*GlobalBGPConfig) ToGlobal ¶
func (c *GlobalBGPConfig) ToGlobal()
type GlobalConfig ¶
type GlobalConfig struct {
BGP GlobalBGPConfig
}
type IBGPConfig ¶
type ISISConfig ¶
type ISISConfig struct { L1 []int `yaml:"level-1,flow"` L2 []int `yaml:"level-2,flow"` L12 []int `yaml:"level-1-2,flow"` Areas map[int][]int `yaml:"areas,flow"` }
func (*ISISConfig) CheckArea ¶
func (c *ISISConfig) CheckArea(routerID int) int
CheckArea returns the area of the router designed by routerID. It defaults to 1.
func (*ISISConfig) CheckLevel ¶
func (c *ISISConfig) CheckLevel(routerID int) int
CheckLevel returns the level of the router designed by routerID. It returns 1 for a L1 router, 2 for L2, 3 for L1-2 and 0 if it is not found.
type InternalLinks ¶
type OSPFConfig ¶
type OSPFConfig struct { Networks []networkOSPF `yaml:"networks"` Stubs []int `yaml:"stubs"` }
type RPKIConfig ¶
type VPNConfig ¶
type VPNConfig struct { VRF string `yaml:"vrf"` HubMode bool `yaml:"hub_and_spoke"` Customers []struct { Hostname string `yaml:"hostname"` Loopback string `yaml:"loopback"` RemoteSubnet string `yaml:"remote_subnet"` Subnet string `yaml:"subnet"` SubnetDown string `yaml:"downstream_subnet"` Parent int `yaml:"parent"` Hub bool } `yaml:"customers"` }
Click to show internal directories.
Click to hide internal directories.