assemblers

package
v0.8.59 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: GPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProfilingEnabledEnvVarName                     = "PROFILING_ENABLED"
	MaxBufferedPagesTotalEnvVarName                = "MAX_BUFFERED_PAGES_TOTAL"
	MaxBufferedPagesPerConnectionEnvVarName        = "MAX_BUFFERED_PAGES_PER_CONNECTION"
	MaxBufferedPagesTotalDefaultValue              = 5000
	MaxBufferedPagesPerConnectionDefaultValue      = 5000
	TcpStreamChannelTimeoutMsEnvVarName            = "TCP_STREAM_CHANNEL_TIMEOUT_MS"
	TcpStreamChannelTimeoutMsDefaultValue          = 10000
	CloseTimedoutTcpChannelsIntervalMsEnvVarName   = "CLOSE_TIMEDOUT_TCP_STREAM_CHANNELS_INTERVAL_MS"
	CloseTimedoutTcpChannelsIntervalMsDefaultValue = 1000
	CloseTimedoutTcpChannelsIntervalMsMinValue     = 10
	CloseTimedoutTcpChannelsIntervalMsMaxValue     = 10000
)

Variables

This section is empty.

Functions

func GetCloseTimedoutTcpChannelsInterval

func GetCloseTimedoutTcpChannelsInterval() time.Duration

func GetMaxBufferedPagesPerConnection

func GetMaxBufferedPagesPerConnection() int

func GetMaxBufferedPagesTotal

func GetMaxBufferedPagesTotal() int

func GetProfilingEnabled added in v0.8.2

func GetProfilingEnabled() bool

func GetTcpChannelTimeoutMs

func GetTcpChannelTimeoutMs() time.Duration

func NewDnsFactory added in v0.6.0

func NewDnsFactory(
	pcapId string,
	sorter *PacketSorter,
	outputChannel chan *api.OutputChannelItem,
	streamsMap api.TcpStreamMap,
	opts *misc.Opts,
) *dnsFactory

func NewTcpReader

func NewTcpReader(ident string, tcpId *api.TcpID, parent *tcpStream, isClient bool, isOutgoing bool, emitter api.Emitter) *tcpReader

func NewTcpReaderDataMsg

func NewTcpReaderDataMsg(data []byte, ci gopacket.CaptureInfo) api.TcpReaderDataMsg

func NewTcpReassemblyStream

func NewTcpReassemblyStream(ident string, tcp *layers.TCP, fsmOptions reassembly.TCPSimpleFSMOptions, stream *tcpStream) reassembly.Stream

func NewTcpStream

func NewTcpStream(
	pcapId string,
	sorter *PacketSorter,
	isTargeted bool,
	streamsMap api.TcpStreamMap,
) *tcpStream

func NewTcpStreamFactory

func NewTcpStreamFactory(
	pcapId string,
	sorter *PacketSorter,
	outputChannel chan *api.OutputChannelItem,
	streamsMap api.TcpStreamMap,
	opts *misc.Opts,
	captureMode AssemblerMode,
) *tcpStreamFactory

func NewTcpStreamMap

func NewTcpStreamMap() api.TcpStreamMap

Types

type AssemblerMode added in v0.8.2

type AssemblerMode int
const (
	MasterCapture AssemblerMode = iota
	SortCapture
	ItemCapture
)

type AssemblerStats

type AssemblerStats struct {
	FlushedConnections int
	ClosedConnections  int
}

type MasterPcap added in v0.8.2

type MasterPcap struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*MasterPcap) WritePacket added in v0.8.2

func (m *MasterPcap) WritePacket(ci gopacket.CaptureInfo, data []byte) (err error)

type PacketSorter added in v0.8.56

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

func NewPacketSorter added in v0.8.56

func NewPacketSorter(
	captureMode AssemblerMode,
	sortedPackets chan<- *wcap.SortedPacket,
) *PacketSorter

func (*PacketSorter) Close added in v0.8.56

func (s *PacketSorter) Close()

func (*PacketSorter) GetMasterPcap added in v0.8.56

func (s *PacketSorter) GetMasterPcap() *MasterPcap

func (*PacketSorter) SendSortedPacket added in v0.8.56

func (s *PacketSorter) SendSortedPacket(sortedPacket *wcap.SortedPacket)

type TcpAssembler

type TcpAssembler struct {
	*reassembly.Assembler

	sync.Mutex
	// contains filtered or unexported fields
}

func NewTcpAssembler

func NewTcpAssembler(
	pcapId string,
	captureMode AssemblerMode,
	sortedPackets chan<- *wcap.SortedPacket,
	outputChannel chan *api.OutputChannelItem,
	streamsMap api.TcpStreamMap,
	opts *misc.Opts,
) *TcpAssembler

func (*TcpAssembler) DumpSafe added in v0.8.47

func (a *TcpAssembler) DumpSafe() string

func (*TcpAssembler) DumpStats

func (a *TcpAssembler) DumpStats() AssemblerStats

func (*TcpAssembler) DumpStreamPool

func (a *TcpAssembler) DumpStreamPool()

func (*TcpAssembler) GetSorter added in v0.8.56

func (a *TcpAssembler) GetSorter() *PacketSorter

func (*TcpAssembler) PeriodicClean added in v0.8.2

func (a *TcpAssembler) PeriodicClean()

func (*TcpAssembler) ProcessPacket

func (a *TcpAssembler) ProcessPacket(packetInfo source.TcpPacketInfo, dumpPacket bool)

func (*TcpAssembler) ProcessPackets

func (a *TcpAssembler) ProcessPackets(packets <-chan source.TcpPacketInfo)

func (*TcpAssembler) WaitAndDump

func (a *TcpAssembler) WaitAndDump()

Jump to

Keyboard shortcuts

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