decode

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DNSRcodeToStr

func DNSRcodeToStr(rcode uint32) string

DNSRcodeToStr decode DNS flags response code bits and return a string https://datatracker.ietf.org/doc/html/rfc2929#section-2.3

func PBFlowToMap

func PBFlowToMap(flow *pbflow.Record) config.GenericMap

func PktDropCauseToStr

func PktDropCauseToStr(dropCause uint32) string

PktDropCauseToStr is based on kernel drop cause definition https://elixir.bootlin.com/linux/latest/source/include/net/dropreason.h#L88 nolint:cyclop

func TCPStateToStr

func TCPStateToStr(state uint32) string

TCPStateToStr is based on kernel TCP state definition https://elixir.bootlin.com/linux/v6.3/source/include/net/tcp_states.h#L12

Types

type Protobuf

type Protobuf struct {
}

Protobuf decodes protobuf flow records definitions, as forwarded by ingest.NetObservAgent, into a Generic Map that follows the same naming conventions as the IPFIX flows from ingest.IngestCollector

func NewProtobuf

func NewProtobuf() (*Protobuf, error)

func (*Protobuf) Decode

func (p *Protobuf) Decode(rawFlow []byte) (config.GenericMap, error)

Decode decodes the protobuf raw flows and returns a list of GenericMaps representing all the flows there

Jump to

Keyboard shortcuts

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