packet

package
v0.0.0-...-0b57c3c Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotSupported = errors.New("source is not supported")
)

Functions

This section is empty.

Types

type PacketData

type PacketData struct {
	Timestamp uint64
	Data      []byte
}

type PacketSource

type PacketSource interface {
	NextPacket() (gopacket.Packet, error)
	Start() error
	Stop() error
	Stats() (packetsGot, packetsLost uint64)
}

func NewPlainPacketSource

func NewPlainPacketSource(dataDir string) (PacketSource, error)

func NewTLSPacketSource

func NewTLSPacketSource(dataDir string) (PacketSource, error)

type PacketSourceImpl

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

func (*PacketSourceImpl) NextPacket

func (p *PacketSourceImpl) NextPacket() (gopacket.Packet, error)

func (*PacketSourceImpl) Start

func (p *PacketSourceImpl) Start() error

func (*PacketSourceImpl) Stats

func (p *PacketSourceImpl) Stats() (packetsGot, packetsLost uint64)

func (*PacketSourceImpl) Stop

func (p *PacketSourceImpl) Stop() error

func (*PacketSourceImpl) WritePacket

func (p *PacketSourceImpl) WritePacket(pkt gopacket.Packet) error

type PacketsPoller

type PacketsPoller interface {
	Start()
	Stop() error
	GetReceivedPackets() uint64
	GetLostChunks() uint64
}

Jump to

Keyboard shortcuts

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