assemblers

package
v0.8.38-canary Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProfilingEnabledEnvVarName                     = "PROFILING_ENABLED"
	ProfilingDumpPath                              = "PROFILING_DUMP_PATH"
	ProfilingTimeIntervalSeconds                   = "PROFILING_INTERVAL_SECONDS"
	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,
	assembler *TcpAssembler,
	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,
	assembler *TcpAssembler,
	isTargeted bool,
	streamsMap api.TcpStreamMap,
) *tcpStream

func NewTcpStreamFactory

func NewTcpStreamFactory(
	pcapId string,
	assembler *TcpAssembler,
	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 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) DumpStats

func (a *TcpAssembler) DumpStats() AssemblerStats

func (*TcpAssembler) DumpStreamPool

func (a *TcpAssembler) DumpStreamPool()

func (*TcpAssembler) GetMasterPcap added in v0.8.2

func (a *TcpAssembler) GetMasterPcap() *MasterPcap

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) SendSortedPacket added in v0.8.2

func (a *TcpAssembler) SendSortedPacket(sortedPacket *wcap.SortedPacket)

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