quagga

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

The package advertises list of networks by connecting to the instance of bgpd and executing `networl A.B.C.D/E` command for every network in a list.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config router.Config) (router.Interface, error)

Types

type QuaggaBgpRoutePublisher

type QuaggaBgpRoutePublisher struct {
	// Connect to BGP
	*sync.Mutex

	// IP address or hostname bgpd listens on.
	BgpdHost string

	// bgpd port (defaul 2605)
	BgpdPort string

	// Quagga password. Required.
	Password string

	// Enable privilege password. Required.
	EnablePass string

	// User prompt to expect in telnet session. Optional.
	UserPrompt string

	// Admin prompt to expect in telnet session. Optional
	AdminPrompt string

	// Config prompt to expect in telnet session. Optional.
	ConfigPrompt string

	// Router prompt to expect in a telnet session. Optional.
	RouterPrompt string

	// LocalAS used to identify proper config context in bgpd
	// `router bgp .LocalAS`. Required.
	LocalAS string

	// Extra output
	Debug bool

	// Internal.
	Input bytes.Buffer
	// contains filtered or unexported fields
}

Default implementation of Interface that publishes routes via instance of bgpd managed by quagga.

func (*QuaggaBgpRoutePublisher) Authentificate

func (caller *QuaggaBgpRoutePublisher) Authentificate(writer telnet.Writer) error

func (QuaggaBgpRoutePublisher) CallTELNET

func (caller QuaggaBgpRoutePublisher) CallTELNET(ctx telnet.Context, writer telnet.Writer, reader telnet.Reader)

CallTELNET implements telnet.Caller interface, this is a callback that gets called by telnet package.

func (*QuaggaBgpRoutePublisher) Interact

func (caller *QuaggaBgpRoutePublisher) Interact(commands []interactCmd, writer telnet.Writer) error

func (QuaggaBgpRoutePublisher) Update

func (q QuaggaBgpRoutePublisher) Update(networks []net.IPNet, args map[string]interface{}) error

Update implements Interact, it publishes provided networks with quagga managed bgp.

Jump to

Keyboard shortcuts

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