Documentation
¶
Index ¶
- Constants
- func OpenDump(file string) (*pcap.Handle, error)
- type Pacp
- func (p *Pacp) Decode(expr ...string)
- func (p *Pacp) FindAllDevs() ([]pcap.Interface, error)
- func (p *Pacp) Info() string
- func (p *Pacp) Open(pcapFile string) (*pcap.Handle, error)
- func (p *Pacp) ReadFilter(expr ...string) (*pcap.Handle, error)
- func (p *Pacp) TimeOut()
- func (p *Pacp) Write(files string)
Constants ¶
View Source
const ( TypeIP = 0x0800 TypeARP = 0x0806 TypeIP6 = 0x86DD IPICMP = 1 IPINIP = 4 IPTCP = 6 IPUDP = 17 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pacp ¶
type Pacp struct {
Device string
H *pcap.Handle
Ofile string
Read string
Snaplen int
Promiscuous bool
Hexdump bool
Count int
// Timeout int
Timeout time.Duration
}
Pacp pacp struct
func (*Pacp) FindAllDevs ¶
FindAllDevs find all devices
func (*Pacp) ReadFilter ¶
ReadFilter open device for Live Capture and set BPF filter
Click to show internal directories.
Click to hide internal directories.