bird

package
v0.0.0-...-6cd304b Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package bird can lookup IP prefixes and autonomous system numbers and add them to flows in case the routers implementation doesn't support this, e.g. ipt-NETFLOW

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotator

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

Annotator represents a BIRD based BGP annotator

func NewAnnotator

func NewAnnotator(sock string, sock6 string, debug int) *Annotator

NewAnnotator creates a new BIRD annotator and get's service started

func (*Annotator) Augment

func (a *Annotator) Augment(fl *netflow.Flow)

Augment function provides the main interface to the external world to consume service of this module

type Query

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

Query represents a query to BIRD and encapsulates it with a channel where it's result is expected

type QueryCache

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

QueryCache represents a set of QueryResults that have been cached

func (*QueryCache) Get

func (qc *QueryCache) Get(addr []byte) *QueryResult

Get tries to receive an entry from QueryCache `qc`

func (*QueryCache) Set

func (qc *QueryCache) Set(addr []byte, qres *QueryResult)

Set sets data for `addr` in QueryCache `qc` to `qres`

type QueryResult

type QueryResult struct {
	// Pfx is the prefix that is being used to forward packets for the IP
	// address from the query
	Pfx net.IPNet

	// As is the ASN that the subject IP is announced by
	AS uint32

	// NhAs is the ASN of the subject IPs associated Next Hop
	NHAS uint32
}

QueryResult carries all useful information we extracted from a BIRD querys result

Jump to

Keyboard shortcuts

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