LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pcap

file format used by libpcap for storing network packet data

TLDR

Read pcap with tcpdump
$ tcpdump -r [capture.pcap]
copy
Read with tshark
$ tshark -r [capture.pcap]
copy
Write pcap
$ tcpdump -i [eth0] -w [capture.pcap]
copy
Filter and read
$ tcpdump -r [capture.pcap] 'port 80'
copy
Convert with editcap
$ editcap [input.pcap] [output.pcapng]
copy

SYNOPSIS

pcap - packet capture file format

DESCRIPTION

pcap (Packet Capture) is the file format used by libpcap for storing network packet data. It's the standard format for network captures, used by tcpdump, Wireshark, and many security tools.

FILE STRUCTURE

$ Global Header (24 bytes)
├── Magic Number (0xa1b2c3d4)
├── Version
├── Timestamp offset
├── Snap length
└── Link type

Packet Records
├── Timestamp
├── Captured length
├── Original length
└── Packet data
copy

TOOLS

$ tcpdump    - CLI capture/read
wireshark  - GUI analysis
tshark     - CLI analysis
editcap    - Edit captures
mergecap   - Merge captures
copy

CAVEATS

pcap is binary format. pcapng offers more features. Large captures need significant storage.

HISTORY

The pcap format and libpcap were developed at Lawrence Berkeley Laboratory by Van Jacobson, Craig Leres, and Steven McCanne.

SEE ALSO

tcpdump(1), wireshark(1), tshark(1), editcap(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid