flow

package
v0.0.0-...-a2e6e6b Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Flows *lru.Cache
	Input chan Flow
	// contains filtered or unexported fields
}

func NewCache

func NewCache(maxFlows uint32, idle uint32, active uint32, output chan Flow, logger *log.Entry) (*Cache, error)

func (*Cache) Listen

func (c *Cache) Listen()

func (*Cache) Start

func (c *Cache) Start() error

func (*Cache) Stop

func (c *Cache) Stop() error

func (*Cache) UpdateFlow

func (c *Cache) UpdateFlow(flow Flow)

type Exporter

type Exporter struct {
	Input chan Flow

	TotalFlowCount uint32
	BaseTime       time.Time
	// contains filtered or unexported fields
}

func NewExporter

func NewExporter(destinationAddress string, destinationPort uint16, maxFlows uint32, logger *log.Entry) (*Exporter, error)

func (*Exporter) ExportNetflow5

func (e *Exporter) ExportNetflow5(flow Flow) error

func (*Exporter) Listen

func (e *Exporter) Listen()

func (*Exporter) Start

func (e *Exporter) Start() error

func (*Exporter) Stop

func (e *Exporter) Stop() error

type Flow

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

func NewFlow

func NewFlow(parameters ParserParameters, info gopacket.CaptureInfo, iface net.Interface) Flow

func (*Flow) SerializeNetflow5

func (f *Flow) SerializeNetflow5(buf []byte, baseTime time.Time)

func (*Flow) String

func (f *Flow) String() string

type FlowKey

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

func (FlowKey) Hash

func (fk FlowKey) Hash() uint64

func (FlowKey) SerializeKey

func (fk FlowKey) SerializeKey() []byte

func (FlowKey) SortKeyHeader

func (fk FlowKey) SortKeyHeader() []byte

func (FlowKey) String

func (fk FlowKey) String() string

type PacketHandler

type PacketHandler struct {
	Worker chan Flow
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(iface *net.Interface, worker chan Flow, logger *log.Entry) (*PacketHandler, error)

func (*PacketHandler) Close

func (handler *PacketHandler) Close()

func (*PacketHandler) Listen

func (handler *PacketHandler) Listen()

func (*PacketHandler) SetFilter

func (handler *PacketHandler) SetFilter(filter string) error

func (*PacketHandler) Start

func (handler *PacketHandler) Start() error

func (*PacketHandler) Stop

func (handler *PacketHandler) Stop() error

type PacketLayers

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

type ParserParameters

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

Jump to

Keyboard shortcuts

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