nexthop

package
v0.0.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NextHopMap

type NextHopMap map[string]*net.UDPAddr // FIXME: do not use pointers

NextHopMap is a map of CIDR to next hop IP address.

func NewNextHopMap

func NewNextHopMap() NextHopMap

func (NextHopMap) GetNextHop

func (m NextHopMap) GetNextHop(ip net.IP) (*net.UDPAddr, error)

GetNextHop returns the next hop IP address for the given IP address. TODO: change CIDR to single IP

func (NextHopMap) GetNextHopByString

func (m NextHopMap) GetNextHopByString(ip string) (*net.UDPAddr, error)

GetNextHopByString returns the next hop IP address for the given IP address.

func (NextHopMap) RemoveNextHop

func (m NextHopMap) RemoveNextHop(cidr *net.IPNet)

RemoveNextHop removes a CIDR to next hop IP address mapping.

func (NextHopMap) SetNextHop

func (m NextHopMap) SetNextHop(cidr *net.IPNet, nextHop string) error

SetNextHop adds a CIDR to next hop IP address mapping. // TODO: make nextHop *net.UDPAddr

func (NextHopMap) SetNextHopByString

func (m NextHopMap) SetNextHopByString(ip, nextHop string) error

SetNextHop by IP string

Jump to

Keyboard shortcuts

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