Documentation ¶
Index ¶
- func ListDeviceNames(withDescription bool) ([]string, error)
- type AfpacketHandle
- type PfringHandle
- type SnifferSetup
- func (sniffer *SnifferSetup) Close() error
- func (sniffer *SnifferSetup) Datalink() layers.LinkType
- func (sniffer *SnifferSetup) Init(test_mode bool, icmp4 icmp.ICMPv4Processor, icmp6 icmp.ICMPv6Processor, ...) error
- func (sniffer *SnifferSetup) IsAlive() bool
- func (sniffer *SnifferSetup) Reopen() error
- func (sniffer *SnifferSetup) Run() error
- func (sniffer *SnifferSetup) Stop() error
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.
Types ¶
type AfpacketHandle ¶
func NewAfpacketHandle ¶
func (*AfpacketHandle) Close ¶
func (h *AfpacketHandle) Close()
func (*AfpacketHandle) ReadPacketData ¶
func (h *AfpacketHandle) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error)
func (*AfpacketHandle) SetBPFFilter ¶
func (h *AfpacketHandle) SetBPFFilter(expr string) (_ error)
type PfringHandle ¶
type PfringHandle struct { }
func NewPfringHandle ¶
func NewPfringHandle(device string, snaplen int, promisc bool) (*PfringHandle, error)
func (*PfringHandle) Close ¶
func (h *PfringHandle) Close()
func (*PfringHandle) Enable ¶
func (h *PfringHandle) Enable() (_ error)
func (*PfringHandle) ReadPacketData ¶
func (h *PfringHandle) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error)
func (*PfringHandle) SetBPFFilter ¶
func (h *PfringHandle) SetBPFFilter(expr string) (_ error)
type SnifferSetup ¶
type SnifferSetup struct { Decoder *decoder.DecoderStruct 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( test_mode bool, icmp4 icmp.ICMPv4Processor, icmp6 icmp.ICMPv6Processor, tcp tcp.Processor, udp udp.Processor, ) 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
Click to show internal directories.
Click to hide internal directories.