sniffer

package
v0.0.0-...-120d036 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Packet

type Packet struct {
	Proto string

	SrcIP   net.IP
	SrcPort uint16

	DstIP   net.IP
	DstPort uint16

	DNS layers.DNS
}

Packet represents a sniffed packet

type Sniffer

type Sniffer struct {
	Packets chan *Packet
	// contains filtered or unexported fields
}

Sniffer is a struct representing a network sniffer the exports packets that match a specific BPF rule.

func New

func New(timeout time.Duration) (*Sniffer, error)

New creates a new Sniffer struct

func (*Sniffer) Close

func (s *Sniffer) Close()

Close destroys the Sniffer struct

func (*Sniffer) Run

func (s *Sniffer) Run()

Jump to

Keyboard shortcuts

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