routes

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channels

type Channels struct {
	IPv4   chan RouteAnnouncement
	IPv6   chan RouteAnnouncement
	Peers  chan []Peer
	Errors chan error
}

func NewChannels

func NewChannels() Channels

func (*Channels) Close

func (c *Channels) Close()

type MOASPrefix

type MOASPrefix struct {
	Prefix string             `json:"prefix"`
	Origin []MOASPrefixOrigin `json:"origin"`
}

type MOASPrefixOrigin

type MOASPrefixOrigin struct {
	AS         string `json:"as"`
	Visibility []Peer `json:"visibility"`
}

type Peer

type Peer struct {
	AS string `json:"as"`
	IP string `json:"ip"`
}

type PeerStatistics

type PeerStatistics struct {
	Peer
	IPv4Prefixes     int `json:"ipv4_prefixes"`
	IPv6Prefixes     int `json:"ipv6_prefixes"`
	IPv4MOASPrefixes int `json:"ipv4_moas_prefixes"`
	IPv6MOASPrefixes int `json:"ipv6_moas_prefixes"`
}

type RouteAnnouncement

type RouteAnnouncement struct {
	Prefix     string
	OriginAS   string
	ReceivedBy Peer
}

type Routes

type Routes struct {
	// contains filtered or unexported fields
}

func NewRoutes

func NewRoutes() Routes

func (*Routes) HandleAnnouncements

func (r *Routes) HandleAnnouncements(channels Channels) error

func (*Routes) PrintMOASPrefixes

func (r *Routes) PrintMOASPrefixes(directory string) error

type Statistics

type Statistics struct {
	IPv4Prefixes     int              `json:"ipv4_prefixes"`
	IPv6Prefixes     int              `json:"ipv6_prefixes"`
	IPv4MOASPrefixes int              `json:"ipv4_moas_prefixes"`
	IPv6MOASPrefixes int              `json:"ipv6_moas_prefixes"`
	Peers            []PeerStatistics `json:"peers"`
}

Jump to

Keyboard shortcuts

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