flowtable

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowTable

type FlowTable struct {
	Ticker *time.Ticker
	sync.Map
}

FlowTable stores all TCP and UDP flows

func NewFlowTable

func NewFlowTable() *FlowTable

NewFlowTable Constructs a new FlowTable

func (*FlowTable) Entries

func (table *FlowTable) Entries() int

Entries displays the current number of entries in flowtable

func (*FlowTable) Get

func (table *FlowTable) Get(hash uint64) (uint64, bool)

Get loads packet hash and its timestamp from the FlowTable

func (*FlowTable) Insert

func (table *FlowTable) Insert(hash, timestamp uint64)

Insert adds packet hash and its timestamp to the FlowTable

func (*FlowTable) Prune

func (table *FlowTable) Prune()

Prune clears the stale entries (older than 10 seconds) from the FlowTable

func (*FlowTable) Remove

func (table *FlowTable) Remove(hash uint64)

Remove deletes packet hash and its timestamp from the FlowTable

Jump to

Keyboard shortcuts

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