flowhandler

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ICMPTypeDestinationUnreachable = "Destination Unreachable"
	ICMPTypeParameterProblem       = "Parameter Problem"
	ICMPTypeRedirectMessage        = "Redirect Message"
)
View Source
const SflowPacketBufferSize = 2048

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindAddress    string `envconfig:"FLOW_BIND_ADDRESS"`
	Port           int    `envconfig:"FLOW_PORT"`
	SflowEventType string `envconfig:"SFLOW_EVENT_TYPE"`
	IpfixEventType string `envconfig:"IPFIX_EVENT_TYPE"`
	AsnPeerMap     map[uint32]string
}

type ControlMessage

type ControlMessage int
const (
	ControlMessageQuit  ControlMessage = iota
	ControlMessageStart ControlMessage = iota
	ControlMessageReady ControlMessage = iota
	ControlMessageDone  ControlMessage = iota
)

type FlowHandler

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

*****************************************************************************

*
* FlowHandler struct
*
*****************************************************************************

func New

func New(config Config, resultChan chan map[string]interface{}, nr newrelic.Application) *FlowHandler

*****************************************************************************

*
* Create a new FlowHandler instance
*
*****************************************************************************

func (*FlowHandler) Start

func (s *FlowHandler) Start(controlChan chan ControlMessage) error

*****************************************************************************

*
* Start the UDP server
*
*****************************************************************************

type IpfixHandler

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

*****************************************************************************

*
* IPFIXhandler object
*
*****************************************************************************

func NewIpfixHandler

func NewIpfixHandler(packetChan chan IpfixPacket, resultChan chan map[string]interface{}, eventType string, peerMap map[uint32]string, nr newrelic.Application) *IpfixHandler

*****************************************************************************

*
* Create a new IPFIXhandler instance
*
*****************************************************************************

func (*IpfixHandler) Start

func (h *IpfixHandler) Start()

*****************************************************************************

*
* Start the IPFIX processor
*
*****************************************************************************

type IpfixPacket

type IpfixPacket struct {
	AgentIP   string
	BytesRead int
	Data      []byte
}

type SflowHandler

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

*****************************************************************************

*
* SflowHandler object
*
*****************************************************************************

func NewSflowHandler

func NewSflowHandler(packetChan chan SflowPacket, resultChan chan map[string]interface{}, eventType string, nr newrelic.Application) *SflowHandler

*****************************************************************************

*
* Create a new SflowHandler instance
*
*****************************************************************************

func (*SflowHandler) Start

func (h *SflowHandler) Start()

*****************************************************************************

*
* Start the Sflow processor
*
*****************************************************************************

type SflowPacket

type SflowPacket []byte

Jump to

Keyboard shortcuts

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