pcap_impl

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PacketFilter = "tcp or udp"
	SnapLen      = int32(65535)
)

Variables

This section is empty.

Functions

func OpenSources

func OpenSources(filename string, nics []string, allPublicNics bool) ([]pcap.PacketSource, error)

func PhysicalInterfaces

func PhysicalInterfaces() ([]string, error)

func TestLiveCapture

func TestLiveCapture(nics []string) error

Types

type Packet

type Packet struct {
	gopacket.Packet
}

func (Packet) Info

func (packet Packet) Info() (*pcap.Connection, error)

type PacketSource

type PacketSource struct {
	*gopacket.PacketSource
}

func OpenFilePcap

func OpenFilePcap(filename string, packetFilter string) (PacketSource, error)

func OpenFilePcapDefault

func OpenFilePcapDefault(filename string) (PacketSource, error)

func OpenLivePcap

func OpenLivePcap(nic string, packetFilter string, snapLength int32) (PacketSource, error)

func OpenLivePcapDefault

func OpenLivePcapDefault(nic string) (PacketSource, error)

func (PacketSource) Capture

func (source PacketSource) Capture() (res pcap.CapturedPacket)

Jump to

Keyboard shortcuts

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