core

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var Map = &ASMap{}

Functions

This section is empty.

Types

type ASEntry

type ASEntry struct {
	sync.RWMutex
	Nets     map[string]*net.IPNet
	Sigs     *siginfo.SigMap
	IA       addr.IA
	IAString string

	log.Logger

	Session *session.Session
	// 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

DelNet 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.IA) *ASEntry

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

func (*ASMap) AddIA

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

AddIA idempotently adds an entry for a remote IA.

func (*ASMap) DelIA

func (am *ASMap) DelIA(ia addr.IA) 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)

Jump to

Keyboard shortcuts

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