summaryrefslogtreecommitdiff
path: root/usr.bin/file/magdir/sniffer
blob: b1958d2a9eed6d2772977419844bb1c5e050f4bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

#------------------------------------------------------------------------------
# sniffer:  file(1) magic for packet captured files
#
# From: guy@netapp.com (Guy Harris)
#
# Microsoft NetMon (packet capture/display program) capture files.
#
0	string		RTSS		NetMon capture file
>4	byte		x		- version %d
>5	byte		x		\b.%d
#
# Network General Sniffer capture files.
#
0	string		TRSNIFF\ data\ \ \ \ \032	Sniffer capture file
>23	leshort		x		- version %d
>25	leshort		x		\b.%d
>33	byte		x		(Format %d,
>32	byte		0		Token ring)
>32	byte		1		Ethernet)
>32	byte		2		ARCnet)
>32	byte		3		StarLAN)
>32	byte		4		PC Network broadband)
>32	byte		5		LocalTalk)
>32	byte		6		Znet)
#
# "libpcap" capture files.
# (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
# the main program that uses that format, but there's also "tcpview",
# and there may be others in the future.)
#
0	ubelong		0xa1b2c3d4	tcpdump capture file (big-endian)
>4	beshort		x		- version %d
>6	beshort		x		\b.%d
>20	belong		0		(No link-layer encapsulation
>20	belong		1		(Ethernet
>20	belong		2		(3Mb Ethernet
>20	belong		3		(AX.25
>20	belong		4		(ProNet
>20	belong		5		(Chaos
>20	belong		6		(IEEE 802.x network
>20	belong		7		(ARCnet
>20	belong		8		(SLIP
>20	belong		9		(PPP
>20	belong		10		(FDDI
>20	belong		11		(RFC 1483 ATM
>20	belong		12		(Loopback
>20	belong		13		(IPSec Enc
>20	belong		14		(Raw IP
>20	belong		15		(BSD/OS SLIP
>20	belong		16		(BSD/OS PPP
>20	belong		17		(Old PF Log
>20	belong		18		(PFSync
>20	belong		105		(IEEE 802.11 wireless
>20	belong		117		(PF Log
>16	belong		x		\b, capture length %d)
0	ulelong		0xa1b2c3d4	tcpdump capture file (little-endian)
>4	leshort		x		- version %d
>6	leshort		x		\b.%d
>20	lelong		0		(No link-layer encapsulation
>20	lelong		1		(Ethernet
>20	lelong		2		(3Mb Ethernet
>20	lelong		3		(AX.25
>20	lelong		4		(ProNet
>20	lelong		5		(Chaos
>20	lelong		6		(IEEE 802.x network
>20	lelong		7		(ARCnet
>20	lelong		8		(SLIP
>20	lelong		9		(PPP
>20	lelong		10		(FDDI
>20	lelong		11		(RFC 1483 ATM
>20	lelong		12		(Loopback
>20	lelong		13		(IPSec Enc
>20	lelong		14		(Raw IP
>20	lelong		15		(BSD/OS SLIP
>20	lelong		16		(BSD/OS PPP
>20	lelong		17		(Old PF Log
>20	lelong		18		(PFSync
>20	lelong		105		(IEEE 802.11 wireless
>20	lelong		117		(PF Log
>16	lelong		x		\b, capture length %d)