packet-headers

command module
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

README

packet-headers

Version Build Status Coverage Status GoDoc Go Report Card

The packet-headers service provides a binary which collects packet headers for all incoming TCP flows and saves each stream of packet captures into a per-stream .pcap file where the filename is the UUID of the TCP flow. It only saves the packet headers, and it supports (with a command-line flag) IP anonymity for the saved addresses.

Usage

$ ./packet-headers -help 2>&1 | fmt | sed -e 's/\t/        /g'

Usage of ./packet-headers:
  -anonymize.ip value
        Valid values are "none" and "netblock". (default none)
  -captureduration duration
        Only save the first captureduration of each flow, to prevent
        long-lived flows from spamming the hard drive. (default 30s)
  -datadir string
        The directory to which data is written (default ".")
  -flowtimeout duration
        Once there have been no packets for a flow for at least
        flowtimeout, the flow can be assumed to be closed. (default 30s)
  -interface value
        The interface on which to capture traffic. May be repeated. If
        unset, will capture on all available interfaces.
  -maxheadersize int
        The maximum size of packet headers allowed. A lower value allows
        the pcap process to be less wasteful but risks more esoteric
        IPv6 headers (which can theoretically be up to the full size
        of the packet but in practice seem to be under 128) getting
        truncated. (default 256)
  -maxidleram value
        How much idle RAM we should tolerate before we try and forcibly
        return it to the OS. (default 3GB)
  -prometheusx.listen-address string
         (default ":9990")
  -sigtermwait duration
        How long should the daemon hang around before exiting after
        receiving a SIGTERM. (default 1s)
  -stream
        Stream results to disk instead of buffering them in RAM.
  -tcpinfo.eventsocket string
        The filename of the unix-domain socket on which events are served.
  -uuidwaitduration duration
        Wait up to uuidwaitduration for each flow before either assigning
        a UUID or discarding all future packets. This prevents buffering
        unsaveable packets. (default 5s)

Running packet-headers also requires running tcp-info and setting it up with an eventsocket.

FAQ: What about UDP? ICMP?

A good idea, but not required for v1.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package demuxer contains the tools for sending packets to the right goroutine to save them to disk.
Package demuxer contains the tools for sending packets to the right goroutine to save them to disk.
Package metrics is the central storage lcoation for all program metrics.
Package metrics is the central storage lcoation for all program metrics.
Package muxer helps solve the problem that captures take place only on a per-interface basis, but tcp-info collects flow information with no reference to the underlying interface.
Package muxer helps solve the problem that captures take place only on a per-interface basis, but tcp-info collects flow information with no reference to the underlying interface.
Package saver provides the toold for saving a single flow's packets to disk.
Package saver provides the toold for saving a single flow's packets to disk.
Package tcpinfohandler deals with the output from the eventsocket served by the tcp-info binary.
Package tcpinfohandler deals with the output from the eventsocket served by the tcp-info binary.

Jump to

Keyboard shortcuts

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