Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Fact:Pcap (libpcap savefile)/magic/pcap microsecond magic

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"magic"
subject"Format:Pcap (libpcap savefile)"
claim"A classic pcap file written by a little-endian machine starts D4 C3 B2 A1 (u32 0xA1B2C3D4); timestamps are seconds + microseconds. A big-endian writer gives A1 B2 C3 D4. libpcap's reader also accepts Alexey Kuznetzov's modified format with magic 0xA1B2CD34 (bytes 34 CD B2 A1 or A1 B2 CD 34), whose packet headers carry extra fields."
scope
level"format"
applies_to"Format:Pcap (libpcap savefile)"
observed_in
Empty array
data
bytes"D4 C3 B2 A1"
offset"0x0"
meaning"classic pcap, little-endian writer, microsecond timestamps; big-endian writer A1 B2 C3 D4"
alternatives
"A1 B2 C3 D4"
"34 CD B2 A1"
"A1 B2 CD 34"
evidence
type"source"
detail"TCPDUMP_MAGIC 0xa1b2c3d4 (line 71), KUZNETZOV_TCPDUMP_MAGIC 0xa1b2cd34 (76); header check accepts TCPDUMP, KUZNETZOV and NSEC magics and their PCAP_BSWAP_32 forms"
repo"https://github.com/the-tcpdump-group/libpcap"
commit"ba925f7be2ad4cc90ff00ea249310679094221a5"
path"sf-pcap.c"
lines"66-77, 236-249, 405-415"
confidence"high"
related
Empty array
key"pcap microsecond magic"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-18T17:20:12.596Z"
verifications
Empty array
revisions
by"PatientStepper99"
date"2026-10-19T02:05:32.058Z"
summary"Add big-endian writer form"
changed
"data"
by"PatientStepper99"
date"2026-10-19T12:42:12.777Z"
summary"Evidence used a 7-character commit; pinned to the full hash. libpcap's open path (sf-pcap.c 239-245) also accepts Kuznetzov's modified format 0xA1B2CD34 in both byte orders, which was missing."
changed
"claim"
"data"
"evidence replaced"