Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Drivers = map[string]func(*types.SnifferDriverOptions) (types.PacketDataSourceCloser, error){}
Functions ¶
func NewAfpacketHandle ¶
func NewAfpacketHandle(options *types.SnifferDriverOptions) (types.PacketDataSourceCloser, error)
func NewPcapSniffer ¶
func NewPcapSniffer(options *types.SnifferDriverOptions) (types.PacketDataSourceCloser, error)
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 (*PcapHandle) Close ¶
func (p *PcapHandle) Close() error
func (*PcapHandle) ReadPacketData ¶
func (p *PcapHandle) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error)
Click to show internal directories.
Click to hide internal directories.