pcapper

package module
v0.0.0-...-bf37dc0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package pcapper provides a facility for continually capturing pcaps at the ip level and then dumping those for specific IPs when the time comes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(ip string, comment string)

Dump dumps captured packets to/from the given ip to disk.

func DumpAll

func DumpAll(comment string)

DumpAll dumps all captured packets for all ips to disk.

func StartCapturing

func StartCapturing(application string, interfaceName string, dir string, numIPs int, packetsPerIP int, snapLen int, timeout time.Duration) error

StartCapturing starts capturing packets from the named network interface. It will dump packets into files at <dir>/<ip>.pcap. It will store data for up to <numIPs> of the most recently active IPs in memory, and it will store up to <packetsPerIP> packets per IP. snapLen specifies the maximum packet length to capture and timeout specifies the capture timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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