source

package
v0.8.12-canary Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handle

type Handle interface {
	NextPacket() (packet gopacket.Packet, err error)
	SetDecoder(decoder gopacket.Decoder, lazy bool, noCopy bool)
	SetBPF(expr string) (err error)
	LinkType() layers.LinkType
	Stats() (packetsReceived uint, packetsDropped uint, err error)
	Close() (err error)
	FileSize() (size int64, err error)
}

type PacketSourceManager

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

func NewPacketSourceManager

func NewPacketSourceManager(
	procfs string,
	interfaceName string,
	mtls bool,
	pods []v1.Pod,
	packetCapture string,
	packets chan<- TcpPacketInfo,
) (*PacketSourceManager, error)

func (*PacketSourceManager) Close

func (m *PacketSourceManager) Close()

func (*PacketSourceManager) Stats

func (m *PacketSourceManager) Stats() (packetsReceived int, packetsDropped int, err error)

func (*PacketSourceManager) UpdatePods

func (m *PacketSourceManager) UpdatePods(pods []v1.Pod, packets chan<- TcpPacketInfo)

type PacketSourceManagerConfig

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

type TcpPacketInfo

type TcpPacketInfo struct {
	Packet gopacket.Packet
	Source *TcpPacketSource
}

type TcpPacketSource added in v0.2.0

type TcpPacketSource struct {
	Handle Handle
	// contains filtered or unexported fields
}

func NewHostPacketSource added in v0.4.0

func NewHostPacketSource(filename string, interfaceName string, packetCapture string) (*TcpPacketSource, error)

func NewTcpPacketSource added in v0.2.0

func NewTcpPacketSource(name, filename string, interfaceName string, packetCapture string) (*TcpPacketSource, error)

func (*TcpPacketSource) Close added in v0.2.0

func (source *TcpPacketSource) Close()

func (*TcpPacketSource) NewPcapHandle added in v0.8.2

func (source *TcpPacketSource) NewPcapHandle() error

func (*TcpPacketSource) ReadPackets added in v0.2.0

func (source *TcpPacketSource) ReadPackets(
	packets chan<- TcpPacketInfo,
	dontClose bool,
	masterCapture bool,
)

func (*TcpPacketSource) Stats added in v0.2.0

func (source *TcpPacketSource) Stats() (packetsReceived uint, packetsDropped uint, err error)

func (*TcpPacketSource) String added in v0.2.0

func (source *TcpPacketSource) String() string

Jump to

Keyboard shortcuts

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