dumpcap

package
v0.0.0-...-81cd769 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package dumpcap is what the *_dump tools in scripts/ have in common: open a classic pcap given on the command line, walk its packets, and build the connection key and TCP segment the importer's trackers take.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEachPacket

func ForEachPacket(tool string, fn func(n int, pkt gopacket.Packet))

ForEachPacket calls fn for every packet of the pcap named by the only command-line argument, with the packet's 1-based number. It exits with status 2 on a wrong usage and 1 on an I/O error. tool is the command name for the usage line.

func Key

func Key(src string, sport layers.TCPPort, dst string, dport layers.TCPPort, request bool) string

Key identifies a connection the same way for both directions: the client endpoint first. request is true for a packet sent to the server.

func Segment

func Segment(tcp *layers.TCP) detect.TCPSegment

Segment is the part of a TCP layer a tracker needs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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