xref: /freebsd/contrib/file/magic/Magdir/sniffer (revision ae316d1d1cffd71ab7751f94e10118777a88e027)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*ae316d1dSXin LI# $File: sniffer,v 1.36 2024/06/16 15:09:26 christos Exp $
4b6cee71dSXin LI# sniffer:  file(1) magic for packet capture files
5b6cee71dSXin LI#
6b6cee71dSXin LI# From: guy@alum.mit.edu (Guy Harris)
7b6cee71dSXin LI#
8b6cee71dSXin LI
9b6cee71dSXin LI#
10b6cee71dSXin LI# Microsoft Network Monitor 1.x capture files.
11b6cee71dSXin LI#
12b6cee71dSXin LI0	string		RTSS		NetMon capture file
13b6cee71dSXin LI>5	byte		x		- version %d
14b6cee71dSXin LI>4	byte		x		\b.%d
15b6cee71dSXin LI>6	leshort		0		(Unknown)
16b6cee71dSXin LI>6	leshort		1		(Ethernet)
17b6cee71dSXin LI>6	leshort		2		(Token Ring)
18b6cee71dSXin LI>6	leshort		3		(FDDI)
19b6cee71dSXin LI>6	leshort		4		(ATM)
20b6cee71dSXin LI>6	leshort		>4		(type %d)
21b6cee71dSXin LI
22b6cee71dSXin LI#
23b6cee71dSXin LI# Microsoft Network Monitor 2.x capture files.
24b6cee71dSXin LI#
25b6cee71dSXin LI0	string		GMBU		NetMon capture file
26b6cee71dSXin LI>5	byte		x		- version %d
27b6cee71dSXin LI>4	byte		x		\b.%d
28b6cee71dSXin LI>6	leshort		0		(Unknown)
29b6cee71dSXin LI>6	leshort		1		(Ethernet)
30b6cee71dSXin LI>6	leshort		2		(Token Ring)
31b6cee71dSXin LI>6	leshort		3		(FDDI)
32b6cee71dSXin LI>6	leshort		4		(ATM)
33b6cee71dSXin LI>6	leshort		5		(IP-over-IEEE 1394)
34b6cee71dSXin LI>6	leshort		6		(802.11)
35b6cee71dSXin LI>6	leshort		7		(Raw IP)
36b6cee71dSXin LI>6	leshort		8		(Raw IP)
37b6cee71dSXin LI>6	leshort		9		(Raw IP)
38b6cee71dSXin LI>6	leshort		>9		(type %d)
39b6cee71dSXin LI
40b6cee71dSXin LI#
41b6cee71dSXin LI# Network General Sniffer capture files.
42b6cee71dSXin LI# Sorry, make that "Network Associates Sniffer capture files."
43b6cee71dSXin LI# Sorry, make that "Network General old DOS Sniffer capture files."
44b6cee71dSXin LI#
4548c779cdSXin LI0	string		TRSNIFF\040data\040\040\040\040\032	Sniffer capture file
46b6cee71dSXin LI>33	byte		2		(compressed)
47b6cee71dSXin LI>23	leshort		x		- version %d
48b6cee71dSXin LI>25	leshort		x		\b.%d
49b6cee71dSXin LI>32	byte		0		(Token Ring)
50b6cee71dSXin LI>32	byte		1		(Ethernet)
51b6cee71dSXin LI>32	byte		2		(ARCNET)
52b6cee71dSXin LI>32	byte		3		(StarLAN)
53b6cee71dSXin LI>32	byte		4		(PC Network broadband)
54b6cee71dSXin LI>32	byte		5		(LocalTalk)
55b6cee71dSXin LI>32	byte		6		(Znet)
56b6cee71dSXin LI>32	byte		7		(Internetwork Analyzer)
57b6cee71dSXin LI>32	byte		9		(FDDI)
58b6cee71dSXin LI>32	byte		10		(ATM)
59b6cee71dSXin LI
60b6cee71dSXin LI#
61b6cee71dSXin LI# Cinco Networks NetXRay capture files.
62b6cee71dSXin LI# Sorry, make that "Network General Sniffer Basic capture files."
63b6cee71dSXin LI# Sorry, make that "Network Associates Sniffer Basic capture files."
64b6cee71dSXin LI# Sorry, make that "Network Associates Sniffer Basic, and Windows
65b6cee71dSXin LI# Sniffer Pro", capture files."
66b6cee71dSXin LI# Sorry, make that "Network General Sniffer capture files."
67b6cee71dSXin LI# Sorry, make that "NetScout Sniffer capture files."
68b6cee71dSXin LI#
69b6cee71dSXin LI0	string		XCP\0		NetXRay capture file
70b6cee71dSXin LI>4	string		>\0		- version %s
71b6cee71dSXin LI>44	leshort		0		(Ethernet)
72b6cee71dSXin LI>44	leshort		1		(Token Ring)
73b6cee71dSXin LI>44	leshort		2		(FDDI)
74b6cee71dSXin LI>44	leshort		3		(WAN)
75b6cee71dSXin LI>44	leshort		8		(ATM)
76b6cee71dSXin LI>44	leshort		9		(802.11)
77b6cee71dSXin LI
78b6cee71dSXin LI#
79b6cee71dSXin LI# "libpcap" capture files.
8048c779cdSXin LI# https://www.tcpdump.org/manpages/pcap-savefile.5.html
81*ae316d1dSXin LI# (We call them "libpcap capture file(s)", as "libpcap" is
82*ae316d1dSXin LI# the first library that uses that format, but there are other programs
83b6cee71dSXin LI# that use "libpcap", or that use the same capture file format.)
84b6cee71dSXin LI#
85b6cee71dSXin LI0	name		pcap-be
86b6cee71dSXin LI>4	beshort		x		- version %d
87b6cee71dSXin LI>6	beshort		x		\b.%d
8848c779cdSXin LI# clear that continuation level match
8948c779cdSXin LI>20	clear		x
902726a701SXin LI>20	belong&0x03FFFFFF		0		(No link-layer encapsulation
912726a701SXin LI>20	belong&0x03FFFFFF		1		(Ethernet
922726a701SXin LI>20	belong&0x03FFFFFF		2		(3Mb Ethernet
932726a701SXin LI>20	belong&0x03FFFFFF		3		(AX.25
942726a701SXin LI>20	belong&0x03FFFFFF		4		(ProNET
952726a701SXin LI>20	belong&0x03FFFFFF		5		(CHAOS
962726a701SXin LI>20	belong&0x03FFFFFF		6		(Token Ring
972726a701SXin LI>20	belong&0x03FFFFFF		7		(BSD ARCNET
982726a701SXin LI>20	belong&0x03FFFFFF		8		(SLIP
992726a701SXin LI>20	belong&0x03FFFFFF		9		(PPP
1002726a701SXin LI>20	belong&0x03FFFFFF		10		(FDDI
1012726a701SXin LI>20	belong&0x03FFFFFF		11		(RFC 1483 ATM
1022726a701SXin LI>20	belong&0x03FFFFFF		12		(Raw IP
1032726a701SXin LI>20	belong&0x03FFFFFF		13		(BSD/OS SLIP
1042726a701SXin LI>20	belong&0x03FFFFFF		14		(BSD/OS PPP
1052726a701SXin LI>20	belong&0x03FFFFFF		19		(Linux ATM Classical IP
1062726a701SXin LI>20	belong&0x03FFFFFF		50		(PPP or Cisco HDLC
1072726a701SXin LI>20	belong&0x03FFFFFF		51		(PPP-over-Ethernet
1082726a701SXin LI>20	belong&0x03FFFFFF		99		(Symantec Enterprise Firewall
1092726a701SXin LI>20	belong&0x03FFFFFF		100		(RFC 1483 ATM
1102726a701SXin LI>20	belong&0x03FFFFFF		101		(Raw IP
1112726a701SXin LI>20	belong&0x03FFFFFF		102		(BSD/OS SLIP
1122726a701SXin LI>20	belong&0x03FFFFFF		103		(BSD/OS PPP
1132726a701SXin LI>20	belong&0x03FFFFFF		104		(BSD/OS Cisco HDLC
1142726a701SXin LI>20	belong&0x03FFFFFF		105		(802.11
1152726a701SXin LI>20	belong&0x03FFFFFF		106		(Linux Classical IP over ATM
1162726a701SXin LI>20	belong&0x03FFFFFF		107		(Frame Relay
1172726a701SXin LI>20	belong&0x03FFFFFF		108		(OpenBSD loopback
1182726a701SXin LI>20	belong&0x03FFFFFF		109		(OpenBSD IPsec encrypted
1192726a701SXin LI>20	belong&0x03FFFFFF		112		(Cisco HDLC
1202726a701SXin LI>20	belong&0x03FFFFFF		113		(Linux cooked v1
1212726a701SXin LI>20	belong&0x03FFFFFF		114		(LocalTalk
1222726a701SXin LI>20	belong&0x03FFFFFF		117		(OpenBSD PFLOG
1232726a701SXin LI>20	belong&0x03FFFFFF		119		(802.11 with Prism header
1242726a701SXin LI>20	belong&0x03FFFFFF		122		(RFC 2625 IP over Fibre Channel
1252726a701SXin LI>20	belong&0x03FFFFFF		123		(SunATM
1262726a701SXin LI>20	belong&0x03FFFFFF		127		(802.11 with radiotap header
1272726a701SXin LI>20	belong&0x03FFFFFF		129		(Linux ARCNET
1282726a701SXin LI>20	belong&0x03FFFFFF		130		(Juniper Multi-Link PPP
1292726a701SXin LI>20	belong&0x03FFFFFF		131		(Juniper Multi-Link Frame Relay
1302726a701SXin LI>20	belong&0x03FFFFFF		132		(Juniper Encryption Services PIC
1312726a701SXin LI>20	belong&0x03FFFFFF		133		(Juniper GGSN PIC
1322726a701SXin LI>20	belong&0x03FFFFFF		134		(Juniper FRF.16 Frame Relay
1332726a701SXin LI>20	belong&0x03FFFFFF		135		(Juniper ATM2 PIC
1342726a701SXin LI>20	belong&0x03FFFFFF		136		(Juniper Advanced Services PIC
1352726a701SXin LI>20	belong&0x03FFFFFF		137		(Juniper ATM1 PIC
1362726a701SXin LI>20	belong&0x03FFFFFF		138		(Apple IP over IEEE 1394
1372726a701SXin LI>20	belong&0x03FFFFFF		139		(SS7 MTP2 with pseudo-header
1382726a701SXin LI>20	belong&0x03FFFFFF		140		(SS7 MTP2
1392726a701SXin LI>20	belong&0x03FFFFFF		141		(SS7 MTP3
1402726a701SXin LI>20	belong&0x03FFFFFF		142		(SS7 SCCP
1412726a701SXin LI>20	belong&0x03FFFFFF		143		(DOCSIS
1422726a701SXin LI>20	belong&0x03FFFFFF		144		(Linux IrDA
1432726a701SXin LI>20	belong&0x03FFFFFF		147		(Private use 0
1442726a701SXin LI>20	belong&0x03FFFFFF		148		(Private use 1
1452726a701SXin LI>20	belong&0x03FFFFFF		149		(Private use 2
1462726a701SXin LI>20	belong&0x03FFFFFF		150		(Private use 3
1472726a701SXin LI>20	belong&0x03FFFFFF		151		(Private use 4
1482726a701SXin LI>20	belong&0x03FFFFFF		152		(Private use 5
1492726a701SXin LI>20	belong&0x03FFFFFF		153		(Private use 6
1502726a701SXin LI>20	belong&0x03FFFFFF		154		(Private use 7
1512726a701SXin LI>20	belong&0x03FFFFFF		155		(Private use 8
1522726a701SXin LI>20	belong&0x03FFFFFF		156		(Private use 9
1532726a701SXin LI>20	belong&0x03FFFFFF		157		(Private use 10
1542726a701SXin LI>20	belong&0x03FFFFFF		158		(Private use 11
1552726a701SXin LI>20	belong&0x03FFFFFF		159		(Private use 12
1562726a701SXin LI>20	belong&0x03FFFFFF		160		(Private use 13
1572726a701SXin LI>20	belong&0x03FFFFFF		161		(Private use 14
1582726a701SXin LI>20	belong&0x03FFFFFF		162		(Private use 15
1592726a701SXin LI>20	belong&0x03FFFFFF		163		(802.11 with AVS header
1602726a701SXin LI>20	belong&0x03FFFFFF		164		(Juniper Passive Monitor PIC
1612726a701SXin LI>20	belong&0x03FFFFFF		165		(BACnet MS/TP
1622726a701SXin LI>20	belong&0x03FFFFFF		166		(PPPD
1632726a701SXin LI>20	belong&0x03FFFFFF		167		(Juniper PPPoE
1642726a701SXin LI>20	belong&0x03FFFFFF		168		(Juniper PPPoE/ATM
1652726a701SXin LI>20	belong&0x03FFFFFF		169		(GPRS LLC
1662726a701SXin LI>20	belong&0x03FFFFFF		170		(GPF-T
1672726a701SXin LI>20	belong&0x03FFFFFF		171		(GPF-F
1682726a701SXin LI>20	belong&0x03FFFFFF		174		(Juniper PIC Peer
1692726a701SXin LI>20	belong&0x03FFFFFF		175		(Ethernet with Endace ERF header
1702726a701SXin LI>20	belong&0x03FFFFFF		176		(Packet-over-SONET with Endace ERF header
1712726a701SXin LI>20	belong&0x03FFFFFF		177		(Linux LAPD
1722726a701SXin LI>20	belong&0x03FFFFFF		178		(Juniper Ethernet
1732726a701SXin LI>20	belong&0x03FFFFFF		179		(Juniper PPP
1742726a701SXin LI>20	belong&0x03FFFFFF		180		(Juniper Frame Relay
1752726a701SXin LI>20	belong&0x03FFFFFF		181		(Juniper C-HDLC
1762726a701SXin LI>20	belong&0x03FFFFFF		182		(FRF.16 Frame Relay
1772726a701SXin LI>20	belong&0x03FFFFFF		183		(Juniper Voice PIC
1782726a701SXin LI>20	belong&0x03FFFFFF		184		(Arinc 429
1792726a701SXin LI>20	belong&0x03FFFFFF		185		(Arinc 653 Interpartition Communication
1802726a701SXin LI>20	belong&0x03FFFFFF		186		(USB with FreeBSD header
1812726a701SXin LI>20	belong&0x03FFFFFF		187		(Bluetooth HCI H4
1822726a701SXin LI>20	belong&0x03FFFFFF		188		(802.16 MAC Common Part Sublayer
1832726a701SXin LI>20	belong&0x03FFFFFF		189		(Linux USB
1842726a701SXin LI>20	belong&0x03FFFFFF		190		(Controller Area Network (CAN) v. 2.0B
1852726a701SXin LI>20	belong&0x03FFFFFF		191		(802.15.4 with Linux padding
1862726a701SXin LI>20	belong&0x03FFFFFF		192		(PPI
1872726a701SXin LI>20	belong&0x03FFFFFF		193		(802.16 MAC Common Part Sublayer plus radiotap header
1882726a701SXin LI>20	belong&0x03FFFFFF		194		(Juniper Integrated Service Module
1892726a701SXin LI>20	belong&0x03FFFFFF		195		(802.15.4 with FCS
1902726a701SXin LI>20	belong&0x03FFFFFF		196		(SITA
1912726a701SXin LI>20	belong&0x03FFFFFF		197		(Endace ERF
1922726a701SXin LI>20	belong&0x03FFFFFF		198		(Ethernet with u10 Networks pseudo-header
1932726a701SXin LI>20	belong&0x03FFFFFF		199		(IPMB
1942726a701SXin LI>20	belong&0x03FFFFFF		200		(Juniper Secure Tunnel
1952726a701SXin LI>20	belong&0x03FFFFFF		201		(Bluetooth HCI H4 with pseudo-header
1962726a701SXin LI>20	belong&0x03FFFFFF		202		(AX.25 with KISS header
1972726a701SXin LI>20	belong&0x03FFFFFF		203		(LAPD
1982726a701SXin LI>20	belong&0x03FFFFFF		204		(PPP with direction pseudo-header
1992726a701SXin LI>20	belong&0x03FFFFFF		205		(Cisco HDLC with direction pseudo-header
2002726a701SXin LI>20	belong&0x03FFFFFF		206		(Frame Relay with direction pseudo-header
201*ae316d1dSXin LI>20	belong&0x03FFFFFF		209		(Linux I2C
2022726a701SXin LI>20	belong&0x03FFFFFF		215		(802.15.4 with non-ASK PHY header
2032726a701SXin LI>20	belong&0x03FFFFFF		216		(Linux evdev events
2042726a701SXin LI>20	belong&0x03FFFFFF		219		(MPLS with label as link-layer header
2052726a701SXin LI>20	belong&0x03FFFFFF		220		(Memory-mapped Linux USB
2062726a701SXin LI>20	belong&0x03FFFFFF		221		(DECT
2072726a701SXin LI>20	belong&0x03FFFFFF		222		(AOS Space Data Link protocol
2082726a701SXin LI>20	belong&0x03FFFFFF		223		(Wireless HART
2092726a701SXin LI>20	belong&0x03FFFFFF		224		(Fibre Channel FC-2
2102726a701SXin LI>20	belong&0x03FFFFFF		225		(Fibre Channel FC-2 with frame delimiters
2112726a701SXin LI>20	belong&0x03FFFFFF		226		(Solaris IPNET
2122726a701SXin LI>20	belong&0x03FFFFFF		227		(SocketCAN
2132726a701SXin LI>20	belong&0x03FFFFFF		228		(Raw IPv4
2142726a701SXin LI>20	belong&0x03FFFFFF		229		(Raw IPv6
2152726a701SXin LI>20	belong&0x03FFFFFF		230		(802.15.4 without FCS
2162726a701SXin LI>20	belong&0x03FFFFFF		231		(D-Bus messages
2172726a701SXin LI>20	belong&0x03FFFFFF		232		(Juniper Virtual Server
2182726a701SXin LI>20	belong&0x03FFFFFF		233		(Juniper SRX E2E
2192726a701SXin LI>20	belong&0x03FFFFFF		234		(Juniper Fibre Channel
2202726a701SXin LI>20	belong&0x03FFFFFF		235		(DVB-CI
2212726a701SXin LI>20	belong&0x03FFFFFF		236		(MUX27010
2222726a701SXin LI>20	belong&0x03FFFFFF		237		(STANAG 5066 D_PDUs
2232726a701SXin LI>20	belong&0x03FFFFFF		238		(Juniper ATM CEMIC
2242726a701SXin LI>20	belong&0x03FFFFFF		239		(Linux netfilter log messages
2252726a701SXin LI>20	belong&0x03FFFFFF		240		(Hilscher netAnalyzer
2262726a701SXin LI>20	belong&0x03FFFFFF		241		(Hilscher netAnalyzer with delimiters
2272726a701SXin LI>20	belong&0x03FFFFFF		242		(IP-over-Infiniband
2282726a701SXin LI>20	belong&0x03FFFFFF		243		(MPEG-2 Transport Stream packets
2292726a701SXin LI>20	belong&0x03FFFFFF		244		(ng4t ng40
2302726a701SXin LI>20	belong&0x03FFFFFF		245		(NFC LLCP
2312726a701SXin LI>20	belong&0x03FFFFFF		246		(Packet filter state syncing
2322726a701SXin LI>20	belong&0x03FFFFFF		247		(InfiniBand
2332726a701SXin LI>20	belong&0x03FFFFFF		248		(SCTP
2342726a701SXin LI>20	belong&0x03FFFFFF		249		(USB with USBPcap header
2352726a701SXin LI>20	belong&0x03FFFFFF		250		(Schweitzer Engineering Laboratories RTAC packets
2362726a701SXin LI>20	belong&0x03FFFFFF		251		(Bluetooth Low Energy air interface
2372726a701SXin LI>20	belong&0x03FFFFFF		252		(Wireshark Upper PDU export
2382726a701SXin LI>20	belong&0x03FFFFFF		253		(Linux netlink
2392726a701SXin LI>20	belong&0x03FFFFFF		254		(Bluetooth Linux Monitor
2402726a701SXin LI>20	belong&0x03FFFFFF		255		(Bluetooth Basic Rate/Enhanced Data Rate baseband packets
2412726a701SXin LI>20	belong&0x03FFFFFF		256		(Bluetooth Low Energy air interface with pseudo-header
2422726a701SXin LI>20	belong&0x03FFFFFF		257		(PROFIBUS data link layer
2432726a701SXin LI>20	belong&0x03FFFFFF		258		(Apple DLT_PKTAP
2442726a701SXin LI>20	belong&0x03FFFFFF		259		(Ethernet with 802.3 Clause 65 EPON preamble
2452726a701SXin LI>20	belong&0x03FFFFFF		260		(IPMI trace packets
2462726a701SXin LI>20	belong&0x03FFFFFF		261		(Z-Wave RF profile R1 and R2 packets
2472726a701SXin LI>20	belong&0x03FFFFFF		262		(Z-Wave RF profile R3 packets
2482726a701SXin LI>20	belong&0x03FFFFFF		263		(WattStopper Digital Lighting Mngmt/Legrand Nitoo Open Proto
2492726a701SXin LI>20	belong&0x03FFFFFF		264		(ISO 14443 messages
2502726a701SXin LI>20	belong&0x03FFFFFF		265		(IEC 62106 Radio Data System groups
2512726a701SXin LI>20	belong&0x03FFFFFF		266		(USB with Darwin header
2522726a701SXin LI>20	belong&0x03FFFFFF		267		(OpenBSD DLT_OPENFLOW
2532726a701SXin LI>20	belong&0x03FFFFFF		268		(IBM SDLC frames
2542726a701SXin LI>20	belong&0x03FFFFFF		269		(TI LLN sniffer frames
2552726a701SXin LI>20	belong&0x03FFFFFF		271		(Linux vsock
2562726a701SXin LI>20	belong&0x03FFFFFF		272		(Nordic Semiconductor Bluetooth LE sniffer frames
2572726a701SXin LI>20	belong&0x03FFFFFF		273		(Excentis XRA-31 DOCSIS 3.1 RF sniffer frames
2582726a701SXin LI>20	belong&0x03FFFFFF		274		(802.3br mPackets
2592726a701SXin LI>20	belong&0x03FFFFFF		275		(DisplayPort AUX channel monitoring data
2602726a701SXin LI>20	belong&0x03FFFFFF		276		(Linux cooked v2
2612726a701SXin LI>20	belong&0x03FFFFFF		278		(OpenVizsla USB
2622726a701SXin LI>20	belong&0x03FFFFFF		279		(Elektrobit High Speed Capture and Replay (EBHSCR)
2632726a701SXin LI>20	belong&0x03FFFFFF		281		(Broadcom tag
2642726a701SXin LI>20	belong&0x03FFFFFF		282		(Broadcom tag (prepended)
26543a5ec4eSXin LI>20	belong&0x03FFFFFF		283		(802.15.4 with TAP
2662726a701SXin LI>20	belong&0x03FFFFFF		284		(Marvell DSA
2672726a701SXin LI>20	belong&0x03FFFFFF		285		(Marvell EDSA
26843a5ec4eSXin LI>20	belong&0x03FFFFFF		286		(ELEE lawful intercept
26943a5ec4eSXin LI>20	belong&0x03FFFFFF		287		(Z-Wave serial
27043a5ec4eSXin LI>20	belong&0x03FFFFFF		288		(USB 2.0
27143a5ec4eSXin LI>20	belong&0x03FFFFFF		289		(ATSC ALP
27243a5ec4eSXin LI>20	belong&0x03FFFFFF		290		(Event Tracing for Windows
273a2dfb722SXin LI>20	belong&0x03FFFFFF		291		(Hilscher netANALYZER NG pseudo-footer
274a2dfb722SXin LI>20	belong&0x03FFFFFF		292		(ZBOSS NCP protocol with pseudo-header
275a2dfb722SXin LI>20	belong&0x03FFFFFF		293		(Low-Speed USB 2.0/1.1/1.0
276a2dfb722SXin LI>20	belong&0x03FFFFFF		294		(Full-Speed USB 2.0/1.1/1.0
277a2dfb722SXin LI>20	belong&0x03FFFFFF		295		(High-Speed USB 2.0
27848c779cdSXin LI# print default match
27948c779cdSXin LI>20	default		x
28048c779cdSXin LI>>20	belong		x		(linktype#%u
28148c779cdSXin LI>16	belong		x		\b, capture length %u)
282b6cee71dSXin LI
28348c779cdSXin LI# packets time stamps in seconds and microseconds.
28448c779cdSXin LI0	ubelong		0xa1b2c3d4	pcap capture file, microseconds ts (big-endian)
285b6cee71dSXin LI!:mime	application/vnd.tcpdump.pcap
286b6cee71dSXin LI>0	use	pcap-be
28748c779cdSXin LI0	ulelong		0xa1b2c3d4	pcap capture file, microsecond ts (little-endian)
28848c779cdSXin LI!:mime	application/vnd.tcpdump.pcap
28948c779cdSXin LI>0	use	\^pcap-be
29048c779cdSXin LI
29148c779cdSXin LI# packets time stamps in seconds and nanoseconds.
29248c779cdSXin LI0	ubelong		0xa1b23c4d	pcap capture file, nanosecond ts (big-endian)
29348c779cdSXin LI!:mime	application/vnd.tcpdump.pcap
29448c779cdSXin LI>0	use	pcap-be
29548c779cdSXin LI0	ulelong		0xa1b23c4d	pcap capture file, nanosecond ts (little-endian)
296b6cee71dSXin LI!:mime	application/vnd.tcpdump.pcap
297b6cee71dSXin LI>0	use	\^pcap-be
298b6cee71dSXin LI
299b6cee71dSXin LI#
300b6cee71dSXin LI# "libpcap"-with-Alexey-Kuznetsov's-patches capture files.
301b6cee71dSXin LI#
30248c779cdSXin LI0	ubelong		0xa1b2cd34	pcap capture file, microsecond ts, extensions (big-endian)
303b6cee71dSXin LI>0	use	pcap-be
30448c779cdSXin LI0	ulelong		0xa1b2cd34	pcap capture file, microsecond ts, extensions (little-endian)
305b6cee71dSXin LI>0	use	\^pcap-be
306b6cee71dSXin LI
307b6cee71dSXin LI#
30848c779cdSXin LI# "pcapng" capture files.
30948c779cdSXin LI# https://github.com/pcapng/pcapng
31048c779cdSXin LI# Pcapng files can contain multiple sections. Printing the endianness,
311b6cee71dSXin LI# snaplen, or other information from the first SHB may be misleading.
312b6cee71dSXin LI#
313b6cee71dSXin LI0	ubelong		0x0a0d0d0a
31448c779cdSXin LI>8	ubelong		0x1a2b3c4d	pcapng capture file
315b6cee71dSXin LI>>12	beshort		x		- version %d
316b6cee71dSXin LI>>14	beshort		x		\b.%d
317b6cee71dSXin LI0	ulelong		0x0a0d0d0a
31848c779cdSXin LI>8	ulelong		0x1a2b3c4d	pcapng capture file
319b6cee71dSXin LI>>12	leshort		x		- version %d
320b6cee71dSXin LI>>14	leshort		x		\b.%d
321b6cee71dSXin LI
322b6cee71dSXin LI#
323b6cee71dSXin LI# AIX "iptrace" capture files.
324b6cee71dSXin LI#
32548c779cdSXin LI0	string		iptrace\0401.0	AIX iptrace capture file
32648c779cdSXin LI0	string		iptrace\0402.0	AIX iptrace capture file
327b6cee71dSXin LI
328b6cee71dSXin LI#
329b6cee71dSXin LI# Novell LANalyzer capture files.
330898496eeSXin LI# URL:		http://www.blacksheepnetworks.com/security/info/nw/lan/trace.txt
331898496eeSXin LI# Reference:	https://github.com/wireshark/wireshark/blob/master/wiretap/lanalyzer.c
332898496eeSXin LI# Update:	Joerg Jenderek
333b6cee71dSXin LI#
334898496eeSXin LI# regular trace header record (RT_HeaderRegular)
335898496eeSXin LI0	leshort		0x1001
336898496eeSXin LI# GRR: line above is too generic because it matches Commodore Plus/4 BASIC V3.5
337898496eeSXin LI# and VIC-20 BASIC V2 program
338898496eeSXin LI# skip many Commodore Basic program (Microzodiac.prg Minefield.prg Vic-tac-toe.prg breakvic_joy.prg)
339898496eeSXin LI# with invalid second record type 0 instead of "Trace receive channel name record"
340898496eeSXin LI>(2.s+4)	leshort	=0x1006h
341898496eeSXin LI>>0	use	novell-lanalyzer
342898496eeSXin LI# cyclic trace header record (RT_HeaderCyclic)
343898496eeSXin LI0	leshort		0x1007
344898496eeSXin LI>0	use	novell-lanalyzer
345898496eeSXin LI0	name	novell-lanalyzer
346898496eeSXin LI>0	leshort		x		Novell LANalyzer capture file
347898496eeSXin LI# https://reposcope.com/mimetype/application/x-lanalyzer
348898496eeSXin LI!:mime	application/x-lanalyzer
349898496eeSXin LI# maybe also TR2 .. TR9 TRA .. TRZ
350898496eeSXin LI!:ext	tr1
351898496eeSXin LI# version like: 1.5
352898496eeSXin LI>4		ubyte	x		\b, version %u
353898496eeSXin LI# minor version; one byte identifying the trace file minor version number
354898496eeSXin LI>5		ubyte	x		\b.%u
355898496eeSXin LI# Trace header record type like: 1001~regular or 1007~cyclic
356898496eeSXin LI>0	leshort		!0x1001		\b, record type %4.4x
357898496eeSXin LI# record_length[2] is the length of the data part of 1st reorcd (without "type" and "length" fields) like: 4Ch
358898496eeSXin LI>2		leshort	x		\b, record length %#x
359898496eeSXin LI# second record type like: 1006h~Trace receive channel name record
360898496eeSXin LI>(2.s+4)	leshort	!0x1006h	\b, 2nd record type %#4.4x
361898496eeSXin LI>(2.s+6)	leshort	x		\b, 2nd record length %#x
362898496eeSXin LI# each channel name is a null-terminated, eight-byte ASCII string like: Channel1
363898496eeSXin LI>(2.s+8)	string	x		\b, names %.9s
364898496eeSXin LI# 2nd channel name like: Channel2
365898496eeSXin LI>(2.s+17)	string	x		%.9s ...
366b6cee71dSXin LI
367b6cee71dSXin LI#
368b6cee71dSXin LI# HP-UX "nettl" capture files.
369898496eeSXin LI# URL:		https://nixdoc.net/man-pages/HP-UX/man1m/nettl.1m.html
370898496eeSXin LI# Reference:	https://github.com/wireshark/wireshark/blob/master/wiretap/nettl.c
371898496eeSXin LI# Update:	Joerg Jenderek
372898496eeSXin LI# Note:		Wireshark fills "meta information header fields" with "dummy" values
373898496eeSXin LI# nettl_magic_hpux9[12]; for HP-UX 9.x not tested
374898496eeSXin LI0	string		\x00\x00\x00\x01\x00\x00\x00\x00\x00\x07\xD0\x00	HP/UX 9.x nettl capture file
375898496eeSXin LI!:mime	application/x-nettl
376898496eeSXin LI!:ext	trc0/trc1
377898496eeSXin LI# nettl_magic_hpux10[12]; for HP-UX 10.x and 11.x
37848c779cdSXin LI0	string		\x54\x52\x00\x64\x00	HP/UX nettl capture file
379898496eeSXin LI# https://reposcope.com/mimetype/application/x-nettl
380898496eeSXin LI!:mime	application/x-nettl
381898496eeSXin LI# maybe also TRC000 TRC001 TRC002 ...
382898496eeSXin LI!:ext	trc0/trc1
383898496eeSXin LI# file_name[56]; maybe also like /tmp/raw.tr.TRC000
384898496eeSXin LI>12	string		!/tmp/wireshark.TRC000
385898496eeSXin LI>>12	string		x			"%-.56s"
386898496eeSXin LI# tz[20]; like UTC
387898496eeSXin LI>68	string		!UTC			\b, tz
388898496eeSXin LI>>68	string		x			%-.20s
389898496eeSXin LI# host_name[9];
390898496eeSXin LI>88	string		>\0			\b, host %-.9s
391898496eeSXin LI# os_vers[9]; like B.11.11
392898496eeSXin LI>97	string		!B.11.11		\b, os
393898496eeSXin LI>>97	string		x			%-.9s
394898496eeSXin LI# os_v; like 55h
395898496eeSXin LI>>106	ubyte		x			(%#x)
396898496eeSXin LI# xxa[8]; like 0
397898496eeSXin LI>107	ubequad		!0			\b, xxa=%#16.16llx
398898496eeSXin LI# model[11] like: 9000/800
399898496eeSXin LI>115	string		!9000/800		\b, model
400898496eeSXin LI>>115	string		x			%-.11s
401898496eeSXin LI# unknown; probably just padding to 128 bytes like: 0406h
402898496eeSXin LI>126	ubeshort	!0x0406h		\b, at 126 %#4.4x
403b6cee71dSXin LI
404b6cee71dSXin LI#
405b6cee71dSXin LI# RADCOM WAN/LAN Analyzer capture files.
406b6cee71dSXin LI#
407b6cee71dSXin LI0	string		\x42\xd2\x00\x34\x12\x66\x22\x88	RADCOM WAN/LAN Analyzer capture file
408b6cee71dSXin LI
409b6cee71dSXin LI#
410b6cee71dSXin LI# NetStumbler log files.  Not really packets, per se, but about as
411b6cee71dSXin LI# close as you can get.  These are log files from NetStumbler, a
412b6cee71dSXin LI# Windows program, that scans for 802.11b networks.
413b6cee71dSXin LI#
414b6cee71dSXin LI0	string		NetS		NetStumbler log file
415b6cee71dSXin LI>8	lelong		x		\b, %d stations found
416b6cee71dSXin LI
417b6cee71dSXin LI#
418b6cee71dSXin LI# *Peek tagged capture files.
419b6cee71dSXin LI#
420b6cee71dSXin LI0	string		\177ver		EtherPeek/AiroPeek/OmniPeek capture file
421b6cee71dSXin LI
422b6cee71dSXin LI#
423b6cee71dSXin LI# Visual Networks traffic capture files.
424b6cee71dSXin LI#
425b6cee71dSXin LI0	string		\x05VNF		Visual Networks traffic capture file
426b6cee71dSXin LI
427b6cee71dSXin LI#
428b6cee71dSXin LI# Network Instruments Observer capture files.
429b6cee71dSXin LI#
430b6cee71dSXin LI0	string		ObserverPktBuffe	Network Instruments Observer capture file
431b6cee71dSXin LI
432b6cee71dSXin LI#
433b6cee71dSXin LI# Files from Accellent Group's 5View products.
434b6cee71dSXin LI#
435a4d6d3b8SXin LI# URL:		http://www.infovista.com
436a4d6d3b8SXin LI# Reference:	http://mark0.net/download/triddefs_xml.7z
437a4d6d3b8SXin LI#		defs/0/5vw.trid.xml
438a4d6d3b8SXin LI#		https://2.na.dl.wireshark.org/src/wireshark-3.6.2.tar.xz
439a4d6d3b8SXin LI#		wireshark-3.6.2/wiretap/5views.c
440a4d6d3b8SXin LI# Update:	Joerg Jenderek
441a4d6d3b8SXin LI# Note:		called "5View capture" by TrID and
442a4d6d3b8SXin LI#		"Wireshark capture file" on Windows or
443a4d6d3b8SXin LI#		"Packet Capture (Accellent/InfoVista 5view)" by shared MIME-info database
444a4d6d3b8SXin LI#		verified/falsified by `wireshark *.5vw`
445a4d6d3b8SXin LI0	string		\xaa\xaa\xaa\xaa
446a4d6d3b8SXin LI# skip misidentified boot/x86_64/loader/kroete.dat on Suse LEAP DVD
447a4d6d3b8SXin LI# by check for valid record version
448a4d6d3b8SXin LI>8	ulelong		=0x00010000
449a4d6d3b8SXin LI>>0	use	5view-le
450a4d6d3b8SXin LI0	name	5view-le
451a4d6d3b8SXin LI# t_5VW_Info_Header.Signature = CST_5VW_INFO_HEADER_KEY = 0xAAAAAAAAU
452a4d6d3b8SXin LI>0	ulelong		x			5View capture file
453a4d6d3b8SXin LI# https://reposcope.com/mimetype/application/x-5view
454a4d6d3b8SXin LI!:mime	application/x-5view
455a4d6d3b8SXin LI!:ext	5vw
456a4d6d3b8SXin LI# size of header in bytes (included signature and reserved fields); probably always 20h
457a4d6d3b8SXin LI>4	ulelong		!0x00000020		\b, header size %#x
458a4d6d3b8SXin LI# version of header record; apparently always CST_5VW_INFO_RECORD_VERSION=0x00010000U
459a4d6d3b8SXin LI>8	ulelong		!0x00010000		\b, record version %#x
460a4d6d3b8SXin LI# DataSize; total size of data without header like: 18h
461a4d6d3b8SXin LI>12	ulelong		x			\b, record size %#x
462a4d6d3b8SXin LI# filetype; type of the capture file like: 18001000h
463a4d6d3b8SXin LI>16	ulelong		x			\b, file type %#8.8x
464a4d6d3b8SXin LI# Reserved[3]; reserved for future use; apparently zero
465a4d6d3b8SXin LI>20	quad		!0			\b, Reserved %#llx
466a4d6d3b8SXin LI# look for record header key CST_5VW_RECORDS_HEADER_KEY of structure t_5VW_TimeStamped_Header
467a4d6d3b8SXin LI>0x20	search/0xB8/b	\xEE\xEE\x33\x33	\b; record
468a4d6d3b8SXin LI# HeaderSize; actual size of this header in bytes like: 32 24h
469a4d6d3b8SXin LI>>&0	uleshort	x			size %#x
470a4d6d3b8SXin LI# HeaderType; exact type of this header; probably always 0x4000
471a4d6d3b8SXin LI>>&2	uleshort	!0x4000			\b, header type %#x
472a4d6d3b8SXin LI# RecType; type of record like: 80000000h
473a4d6d3b8SXin LI>>&4	ulelong		x			\b, record type %#x
474a4d6d3b8SXin LI# RecSubType; subtype of record like: 0
475a4d6d3b8SXin LI>>&8	ulelong		!0			\b, subtype %#x
476a4d6d3b8SXin LI# RecSize; Size of one record like: 5Ch
477a4d6d3b8SXin LI>>&12	ulelong		x			\b, RecSize %#x
478a4d6d3b8SXin LI# RecNb; Number of records like: 1
479a4d6d3b8SXin LI>>&16	ulelong		>1			\b, %#x records
480a4d6d3b8SXin LI# Timestamp Utc
481a4d6d3b8SXin LI#>>&20	ulelong		x			\b, RAW TIME %#8.8x
482a4d6d3b8SXin LI>>&20	date		x			\b, Time-stamp %s
483