drivers

package
v0.0.0-...-53421ca Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2019 License: GPL-3.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

Functions

func SnifferRegister

func SnifferRegister(name string, packetDataSourceCloserFactory func(*types.SnifferDriverOptions) (types.PacketDataSourceCloser, error))

Register makes a ethernet sniffer driver available by the provided name. If Register is called twice with the same name or if driver is nil, it panics.

Types

type AfpacketHandle

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

func (*AfpacketHandle) Close

func (a *AfpacketHandle) Close() error

func (*AfpacketHandle) ReadPacketData

func (a *AfpacketHandle) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error)

type PcapHandle

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

func NewPcapFileSniffer

func NewPcapFileSniffer(filename string) (*PcapHandle, error)

func NewPcapWireSniffer

func NewPcapWireSniffer(netDevice string, snaplen int32, wireDuration time.Duration, filter string) (*PcapHandle, error)

func (*PcapHandle) Close

func (p *PcapHandle) Close() error

func (*PcapHandle) ReadPacketData

func (p *PcapHandle) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error)

type PcapgoHandle

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

func (*PcapgoHandle) Close

func (a *PcapgoHandle) Close() error

func (*PcapgoHandle) ReadPacketData

func (a *PcapgoHandle) ReadPacketData() ([]byte, gopacket.CaptureInfo, error)

Jump to

Keyboard shortcuts

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