Documentation ¶
Index ¶
- func ListDeviceNames(withDescription bool, withIP bool) ([]string, error)
- type SnifferSetup
- func (sniffer *SnifferSetup) Close() error
- func (sniffer *SnifferSetup) Datalink() layers.LinkType
- func (sniffer *SnifferSetup) Init(testMode bool, filter string, factory WorkerFactory, ...) error
- func (sniffer *SnifferSetup) IsAlive() bool
- func (sniffer *SnifferSetup) Reopen() error
- func (sniffer *SnifferSetup) Run() error
- func (sniffer *SnifferSetup) Stop() error
- type Worker
- type WorkerFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListDeviceNames ¶
ListDevicesNames returns the list of adapters available for sniffing on this computer. If the withDescription parameter is set to true, a human readable version of the adapter name is added. If the withIP parameter is set to true, IP address of the adapter is added.
Types ¶
type SnifferSetup ¶
type SnifferSetup struct { DataSource gopacket.PacketDataSource // contains filtered or unexported fields }
func (*SnifferSetup) Close ¶
func (sniffer *SnifferSetup) Close() error
func (*SnifferSetup) Datalink ¶
func (sniffer *SnifferSetup) Datalink() layers.LinkType
func (*SnifferSetup) Init ¶
func (sniffer *SnifferSetup) Init(testMode bool, filter string, factory WorkerFactory, interfaces *config.InterfacesConfig) error
func (*SnifferSetup) IsAlive ¶
func (sniffer *SnifferSetup) IsAlive() bool
func (*SnifferSetup) Reopen ¶
func (sniffer *SnifferSetup) Reopen() error
func (*SnifferSetup) Run ¶
func (sniffer *SnifferSetup) Run() error
func (*SnifferSetup) Stop ¶
func (sniffer *SnifferSetup) Stop() error
type Worker ¶
type Worker interface {
OnPacket(data []byte, ci *gopacket.CaptureInfo)
}
Click to show internal directories.
Click to hide internal directories.