base

package
v0.0.0-...-c8fc2fc Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package base contains the tables for remote SIGs, ASes and their prefixes

Index

Constants

This section is empty.

Variables

View Source
var Map = newASMap()

Functions

func PollReqHdlr

func PollReqHdlr()

Types

type ASEntry

type ASEntry struct {
	sync.RWMutex
	Nets     map[string]*NetEntry
	Sigs     *siginfo.SigMap
	IA       *addr.ISD_AS
	IAString string
	Session  *egress.Session
	DevName  string

	log.Logger
	// contains filtered or unexported fields
}

ASEntry contains all of the information required to interact with a remote AS.

func (*ASEntry) AddNet

func (ae *ASEntry) AddNet(ipnet *net.IPNet) error

AddNet idempotently adds a network for the remote IA.

func (*ASEntry) AddSig

func (ae *ASEntry) AddSig(id siginfo.SigIdType, ip net.IP, ctrlPort, encapPort int,
	static bool) error

AddSig idempotently adds a SIG for the remote IA.

func (*ASEntry) Cleanup

func (ae *ASEntry) Cleanup() error

func (*ASEntry) DelNet

func (ae *ASEntry) DelNet(ipnet *net.IPNet) error

DelIA removes a network for the remote IA.

func (*ASEntry) DelSig

func (ae *ASEntry) DelSig(id siginfo.SigIdType) error

DelSIG removes an SIG for the remote IA.

func (*ASEntry) ReloadConfig

func (ae *ASEntry) ReloadConfig(cfg *config.ASEntry) bool

type ASMap

type ASMap sync.Map

ASMap is not concurrency safe against multiple writers.

func (*ASMap) ASEntry

func (am *ASMap) ASEntry(ia *addr.ISD_AS) *ASEntry

ASEntry returns the entry for the specified remote IA, or nil if not present.

func (*ASMap) AddIA

func (am *ASMap) AddIA(ia *addr.ISD_AS) (*ASEntry, error)

AddIA idempotently adds an entry for a remote IA.

func (*ASMap) DelIA

func (am *ASMap) DelIA(ia *addr.ISD_AS) error

DelIA removes an entry for a remote IA.

func (*ASMap) Delete

func (am *ASMap) Delete(key addr.IAInt)

func (*ASMap) Load

func (am *ASMap) Load(key addr.IAInt) (*ASEntry, bool)

func (*ASMap) LoadOrStore

func (am *ASMap) LoadOrStore(key addr.IAInt, value *ASEntry) (*ASEntry, bool)

func (*ASMap) Range

func (am *ASMap) Range(f func(key addr.IAInt, value *ASEntry) bool)

func (*ASMap) ReloadConfig

func (am *ASMap) ReloadConfig(cfg *config.Cfg) bool

func (*ASMap) Store

func (am *ASMap) Store(key addr.IAInt, value *ASEntry)

type NetEntry

type NetEntry struct {
	Net   *net.IPNet
	Route *netlink.Route
}

func (*NetEntry) Cleanup

func (ne *NetEntry) Cleanup() error

Jump to

Keyboard shortcuts

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