streams

package
v0.0.0-...-e731dd0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssemblerContext

type AssemblerContext struct {
	CaptureInfo gopacket.CaptureInfo
}

func (*AssemblerContext) GetCaptureInfo

func (ac *AssemblerContext) GetCaptureInfo() gopacket.CaptureInfo

type Stream

type Stream struct {
	ClientAddr       []byte
	ServerAddr       []byte
	ClientPort       uint16
	ServerPort       uint16
	Packets          []gopacket.CaptureInfo
	PacketDirections []reassembly.TCPFlowDirection
	Data             []StreamData
	Flags            StreamFlags
	// contains filtered or unexported fields
}

func (*Stream) Accept

func (*Stream) AddUDPPacket

func (s *Stream) AddUDPPacket(dir reassembly.TCPFlowDirection, data []byte, ac reassembly.AssemblerContext)

func (*Stream) ReassembledSG

func (s *Stream) ReassembledSG(sg reassembly.ScatterGather, ac reassembly.AssemblerContext)

func (*Stream) ReassemblyComplete

func (s *Stream) ReassemblyComplete(_ reassembly.AssemblerContext) bool

type StreamData

type StreamData struct {
	Bytes       []byte
	PacketIndex uint64
}

type StreamFactory

type StreamFactory struct {
	Streams []*Stream
}

func (*StreamFactory) New

func (f *StreamFactory) New(netFlow, tcpFlow gopacket.Flow, tcp *layers.TCP, ac reassembly.AssemblerContext) reassembly.Stream

func (*StreamFactory) NewUDP

func (f *StreamFactory) NewUDP(netFlow, udpFlow gopacket.Flow) *Stream

type StreamFlags

type StreamFlags uint8
const (
	InactivityTimeout = time.Minute * time.Duration(-5)

	StreamFlagsComplete    StreamFlags = 1
	StreamFlagsProtocol    StreamFlags = 2
	StreamFlagsProtocolTCP StreamFlags = 0
	StreamFlagsProtocolUDP StreamFlags = 2
)

Jump to

Keyboard shortcuts

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