parser

package
v0.0.0-...-02ab0c4 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFlowKey

func GetFlowKey(srcIP, dstIP uint64, protocol uint8, srcPort, dstPort uint16) flows.FlowKeyType

GetFlowKey returns the Flow key. Is symmetric so A:46254<-->B:80 returns the same key in both directions

Types

type PacketData

type PacketData struct {
	Data      []byte
	Timestamp int64
	PacketIdx int64
}

PacketData contains the basic information from the packet source

type Parser

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

Parser multithreads parsing of packets

func NewParser

func NewParser(p *pool.Pools, sortingRingBufferSize int64, numParserThreads int, samplingrate float64, numParserChannel int) *Parser

NewParser returns a new parser

func (*Parser) Close

func (p *Parser) Close()

Close Parser and flush out all packets to the pool

func (*Parser) ParsePacket

func (p *Parser) ParsePacket(data []byte, packetIdx, packetTimestamp int64)

ParsePacket adds a packet to the parser (buffered)

Jump to

Keyboard shortcuts

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