Fix a couple (value) mistakes in value_strings. Found by Martin's patch on the ...
[obnox/wireshark/wip.git] / wiretap / README
1 $Id$
2
3 Wiretap is a library that is being developed as a future replacement for
4 libpcap, the current standard Unix library for packet capturing. Libpcap
5 is great in that it is very platform independent and has a wonderful
6 BPF optimizing engine. But it has some shortcomings as well. These
7 shortcomings came to a head during the development of Wireshark
8 (http://www.wireshark.org/), a packet analyzer. As such, I began developing
9 wiretap so that:
10
11 1. The library can easily be amended with new packet filtering objects.
12 Libpcap is very TCP/IP-oriented. I want to filter on IPX objects, SNA objects,
13 etc. I also want any decent programmer to be able to add new filters to the
14 library.
15
16 2. The library can read file formats from many packet-capturing utilities.
17 Libpcap only reads Libpcap files.
18
19 3. The library can capture on more than one network interface at a time, and
20 save this trace in one file.
21
22 4. Network names can be resolved immediately after a trace and saved in the
23 trace file. That way, I can ship a trace of my firewall-protected network to a
24 colleague, and he'll see the proper hostnames for the IP addresses in the
25 packet capture, even though he doesn't have access to the DNS server behind my
26 LAN's firewall.
27
28 5. I want to look into the possibility of compressing packet data when saved
29 to a file, like Sniffer.
30
31 6. The packet-filter can be optimized for the host OS. Not all OSes have BPF;
32 SunOS has NIT and Solaris has DLPI, which both use the CMU/Stanford
33 packet-filter pseudomachine. RMON has another type of packet-filter syntax
34 which we could support.
35
36 Wiretap is very good at reading many file formats, as per #2
37 above. Wiretap has no filter capability at present; it currently doesn't
38 support packet capture, so it wouldn't be useful there, and filtering
39 when reading a capture file is done by Wireshark, using a more powerful
40 filtering mechanism than that provided by BPF.
41
42
43 File Formats
44 ============
45
46 Libpcap
47 -------
48 The "libpcap" file format was determined by reading the "libpcap" code;
49 wiretap reads the "libpcap" file format with its own code, rather than
50 using the "libpcap" library's code to read it.
51
52 Sniffer (compressed and uncompressed)
53 -------
54 The uncompressed Sniffer format is documented in the Sniffer manual.
55 Unfortunately, Sniffer manuals tend to document only the format for
56 the Sniffer model they document. Token-Ring and ethernet seems to work
57 well, though.  If you have an ATM Sniffer file, both Guy and Gilbert
58 would be *very* interested in receiving a sample. (see 'AUTHORS' file
59 for our e-mail addresses).
60
61 LANalyzer
62 ---------
63 The LANalyzer format is available from http://www.novell.com. Search
64 their knowledge base for "Trace File Format".
65
66 Network Monitor
67 ---------------
68 Microsoft's Network Monitor file format is supported, at least under
69 Ethernet and token-ring. If you have capture files of other datalink
70 types, please send them to Guy.
71
72 "snoop"
73 -------
74 The Solaris 2.x "snoop" program's format is documented in RFC 1761.
75
76 "iptrace"
77 ---------
78 This is the capture program that comes with AIX 3.x and 4.x.  AIX 3 uses
79 the iptrace 1.0 file format, while AIX4 uses iptrace 2.0.  iptrace has
80 an undocumented, yet very simple, file format.  The interesting thing
81 about iptrace is that it will record packets coming in from all network
82 interfaces; a single iptrace file can contain multiple datalink types.
83
84 Sniffer Basic (NetXRay)/Windows Sniffer Pro
85 -------------------------------------------
86 Network Associates' Sniffer Basic (formerly NetXRay from Cinco Networks)
87 file format is now supported, at least for Ethernet and token-ring. 
88 Network Associates' Windows Sniffer Pro appears to use a variant of that
89 format; it's supported to the same extent.
90
91 RADCOM WAN/LAN Analyzers
92 ------------------------
93 Olivier Abad has added code to read Ethernet and LAPB captures from
94 RADCOM WAN/LAN Analyzers (see http://www.radcom-inc.com/).
95
96 Lucent/Ascend access products
97 -----------------------------
98 Gerald
99
100 HP-UX nettl
101 -----------
102 nettl is used on HP-UX to trace various streams based subsystems.  Wiretap
103 can read nettl files containing IP frames (NS_LS_IP subsystem) and LAPB
104 frames (SX25L2 subsystem). It has been tested with files generated on
105 HP-UX 9.04 and 10.20.
106 Use the following commands to generate a trace :
107 # IP capture. 0x30000000 means PDU in and PDU out :
108 nettl -tn 0x30000000 -e NS_LS_IP -f tracefile
109 # X25 capture. You must specify an interface :
110 nettl -tn 0x30000000 -e SX25l2 -d /dev/x25_0 -f tracefile
111 # stop capture. subsystem is NS_LS_IP or SX25L2 :
112 nettl -tf -e subsystem
113
114 One may be able to specify "-tn pduin pduout" rather than
115 "-tn 0x30000000"; the nettl man page for HP-UX 10.30 implies that it
116 should work.
117
118 There is also basic support for nettl files containing NS_LS_DRIVER, 
119 NS_LS_TCP, NS_LS_UDP, NS_LS_LOOPBACK, unknown type 0xb9, and NS_LS_ICMP.
120 However, NS_LS_ICMP will not be decoded since WTAP lacks a raw ICMP 
121 encapsulation type.
122
123
124 Toshiba ISDN Router
125 -------------------
126 An under-documented command that the router supports in a telnet session
127 is "snoop" (not related to the Solaris "snoop" command). If you give
128 it the "dump" option (either by letting "snoop" query you for its next
129 argument, or typing "snoop dump" on the command line), you'll get a hex
130 dump of all packets across the router (except of your own telnet session
131 -- good thinking Toshiba!). You can select a certain channel to sniff
132 (LAN, B1, B2, D), but the default is all channels.  You save this hex
133 dump to disk with 'script' or by 'telnet | tee'. Wiretap will read the
134 ASCII hex dump and convert it to binary data.
135
136 ISDN4BSD "i4btrace" utility
137 ---------------------------
138 Bert Driehuis
139
140 Cisco Secure Intrustion Detection System iplogging facility
141 -----------------------------------------------------------
142 Mike Hall
143
144 pppd logs (pppdump-format files)
145 --------------------------------
146 Gilbert
147
148 VMS TCPTRACE
149 ------------
150 Compaq VMS's TCPIPTRACE format is supported.  This is the capture program
151 that comes with TCP/IP or UCX as supplied by Compaq or Digital Equipment
152 Corporation.
153
154 Under UCX 4.x, it is invoked as TCPIPTRACE.  Under TCPIP 5.x, it is invoked
155 as TCPTRACE.
156
157 TCPTRACE produces an ascii text based format, that has changed slightly over
158 time.
159
160 DBS Etherwatch (text format)
161 ----------------------------
162 Text output from DBS Etherwatch is supported.  DBS Etherwatch is available
163 from: http://www.users.bigpond.com/dbsneddon/software.htm.
164
165 Catapult DCT2000 (.out files)
166 -----------------------------
167 DCT2000 test systems produce ascii text-based .out files for ports
168 that have logging enabled. When being read, the data part of the message is
169 prefixed with a short header that provides some context (context+port,
170 direction, original timestamp, etc).
171
172 You can choose to suppress the reading of non-standard protocols
173 (i.e. messages between layers rather than the well-known link-level protocols
174 usually found on board ports).
175
176
177 Gilbert Ramirez <gram@alumni.rice.edu>
178 Guy Harris <guy@alum.mit.edu>