find

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeIP  = 0x0800
	TypeARP = 0x0806
	TypeIP6 = 0x86DD

	IPICMP = 1
	IPINIP = 4
	IPTCP  = 6
	IPUDP  = 17
)

Variables

This section is empty.

Functions

func OpenDump

func OpenDump(file string) (*pcap.Handle, error)

OpenDump device for offline pacp file

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) Decode

func (p *Pacp) Decode(expr ...string)

Decode decoding packets faster

func (*Pacp) FindAllDevs

func (p *Pacp) FindAllDevs() ([]pcap.Interface, error)

FindAllDevs find all devices

func (*Pacp) Info

func (p *Pacp) Info() string

Info pcap version info

func (*Pacp) Open

func (p *Pacp) Open(pcapFile string) (*pcap.Handle, error)

Open device for offline pcap file

func (*Pacp) ReadFilter

func (p *Pacp) ReadFilter(expr ...string) (*pcap.Handle, error)

ReadFilter open device for Live Capture and set BPF filter

func (*Pacp) TimeOut

func (p *Pacp) TimeOut()

TimeOut set timeout

func (*Pacp) Write

func (p *Pacp) Write(files string)

Write write pcap file

Jump to

Keyboard shortcuts

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