utils

package
v0.6.11 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: BSD-3-Clause, GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetErrorMap

func SetErrorMap(e *AtomicCounterMap)

SetErrorMap sets the map for tracking errors it gets passed in from the collector during initialization

Types

type AtomicCounterMap

type AtomicCounterMap struct {
	sync.Mutex
	Items map[string]int64
}

AtomicCounterMap maps strings to integers.

var (
	// AllDecoderNames contains the decoder names at runtime.
	AllDecoderNames = make(map[string]struct{})

	// ErrorMap contains error during reassembly at runtime.
	ErrorMap *AtomicCounterMap
)

func NewAtomicCounterMap

func NewAtomicCounterMap() *AtomicCounterMap

NewAtomicCounterMap returns a new AtomicCounterMap.

func (*AtomicCounterMap) Inc

func (a *AtomicCounterMap) Inc(val string)

Inc increments a value.

type PacketInfo

type PacketInfo struct {
	Packet    gopacket.Packet
	Timestamp int64
	SrcMAC    string
	DstMAC    string
	SrcIP     string
	DstIP     string
}

PacketInfo contains packet meta information.

func NewPacketInfo

func NewPacketInfo(p gopacket.Packet) *PacketInfo

NewPacketInfo returns a new packet summary

Jump to

Keyboard shortcuts

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