sniffer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2015 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AfpacketHandle

type AfpacketHandle struct {
	TPacket *afpacket.TPacket
}

func NewAfpacketHandle

func NewAfpacketHandle(device string, snaplen int, block_size int, num_blocks int,
	timeout time.Duration) (*AfpacketHandle, error)

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    *tcp.DecoderStruct
	DataSource gopacket.PacketDataSource
	// contains filtered or unexported fields
}

func (*SnifferSetup) Close

func (sniffer *SnifferSetup) Close() error
func (sniffer *SnifferSetup) Datalink() layers.LinkType

func (*SnifferSetup) Init

func (sniffer *SnifferSetup) Init(test_mode bool, events chan common.MapStr) 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

Jump to

Keyboard shortcuts

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