Note that the requirement for a command interpreter that understands
[obnox/wireshark/wip.git] / README.win32
1 $Id: README.win32,v 1.38 2002/07/06 19:51:25 guy Exp $
2
3 Installing Ethereal, Tethereal, and Editcap on Win32
4 ====================================================
5 These are the instructions for installing Ethereal
6 from the installation executable that is provided on
7 the Ethereal website and any of its mirrors.
8
9 The installation package allows you to install:
10
11         o Ethereal - the GUI version
12         o Tethereal - the console, line-mode version
13         o Editcap - a console, line-mode utility to convert
14                 capture files from one format to another.
15                 (The same functions are available in Ethereal)
16         o Text2Pcap - a console, line-mode utility to generate 
17                 a capture file from an ASCII hexdump of packets
18         o Mergecap - a console, line-mode utility to merge two 
19                 capture files into one
20
21 Additionally, the installation package contains a "plugins"
22 option, which installs the Gryphon, MGCP and GIOP dissector plugins
23 for use with Ethereal and Tethereal.
24
25 All binaries in Ethereal package are now built with debugging
26 information embedded. If you are experiencing a crash when running
27 Ethereal or other binaries, Dr. Watson or your debugger
28 can use the information embedded in the binary to provide useful 
29 information to the Ethereal developers that will help them pinpoint 
30 the problem. 
31
32 In the past, two versions of Ethereal binaries were published -- a
33 version that could capture packets and a version which could not.
34 The latter is useful if you're only reading files produced by
35 another product (e.g., a sniffer, firewall, or intrustion detection system)
36 and did not wish to install WinPcap, the library Ethereal uses
37 to capture packets on Win32 platforms.
38
39 As of WinPcap 2.1, all the WinPcap libraries have been released as DLLs. 
40 This means that Ethereal can detect the presence of WinPcap at run time,
41 which means that only one version of the Ethereal binaries needs to be
42 shipped.
43
44 If you don't want to capture packets, just install the Ethereal
45 package. If you do want to capture packets, install Ethereal *and*
46 install the latest non-beta version of WinPcap, available from:
47
48         http://winpcap.polito.it/
49
50 and mirrored at
51
52         http://winpcap.mirror.ethereal.com/
53
54 and
55
56         http://www.mirrors.wiretapped.net/security/packet-capture/winpcap/
57
58 If you already have an earlier version of WinPcap installed, you need to
59 un-install it and install the latest version.  If the older version is
60 WinPcap 2.0 or 2.02, and you have other applications that use the older
61 version , you will have to decide which applications to keep, since
62 WinPcap 2.0/2.02 and later versions cannot be installed on the same
63 system at the same time.
64
65 If Ethereal is not capturing packets and you have WinPcap installed, you
66 can test your WinPcap installation by installing WinDump (tcpdump for
67 Windows) ported by the same folks who make WinPcap.  It's at:
68
69         http://windump.polito.it/
70
71 and mirrored at
72
73         http://windump.mirror.ethereal.com/
74
75 and
76
77         http://www.mirrors.wiretapped.net/security/packet-capture/windump/
78
79 They also make Analyzer, a GUI sniffer for Win32:
80
81         http://analyzer.polito.it/
82
83 The rest of this documentation is only interesting if
84 you want to compile Ethereal yourself.
85
86
87 Running Ethereal, Tethereal, and Editcap on Win32
88 =================================================
89 You need the glib and gtk libraries for running Ethereal. 
90
91 These packages for win32 can be found at:
92
93         http://www.ethereal.com/distribution/win32
94
95 and at the home page for the GTK+ for Win32 project:
96
97         http://www.gimp.org/~tml/gimp/win32
98
99 or
100         http://www.iki.fi/tml/gimp/win32/
101
102 (the mirror nearer to you may be faster).
103
104 Plugins (gryphon.dll and mgcp.dll) can go in:
105         C:\Program Files\Ethereal\plugins\<version>
106         C:\Ethereal\plugins\<version>
107
108 Where <version> is the version number, without brackets.
109 For example, C:\Ethereal\plugins\0.8.16
110
111 Yes, the location of plugins needs to be more flexible.
112
113 Make sure the glib and gtk DLL's are in your path - i.e., that your path
114 includes the directory (folder) or directories (folders) in which those
115 DLLs are found - when you run Ethereal.  This includes gtk-*.dll,
116 glib-*.dll, gmodule-*.dll, gdk-*.dll, gnu-intl.dll, and iconv-*.dll.
117 As of the 20000805 GTK+/GLIB distribution, gthread-*.dll is no longer needed.
118
119 The Win32 Binary distribution, available from
120
121         http://www.ethereal.com/distribution/win32
122
123 used different version of the GTK+/GLIB libraries at different points
124 in time:
125
126 Ethereal Version                GTK+/GLIB version
127 ----------------                -----------------
128 0.8.16 and after                20001226
129 0.8.11 - 0.8.15                 20000805
130 0.8.9 - 0.8.10                  20000416
131 0.8.8 and before                19990828
132
133
134 Capturing Packets
135 -----------------
136 In order to capture with Win32, you need to install the NDIS
137 packet capture driver for your particular Win32 OS; drivers for Windows
138 9x, Windows NT 4.0, and Windows 2000 can be downloaded from the
139 WinPcap home page:
140
141         http://winpcap.polito.it/
142
143 or the mirror site at
144
145         http://www.wiretapped.net/security/packet-capture/winpcap/default.htm
146
147 Compiling the Ethereal distribution from source
148 ===============================================
149 You'll need the development package for GLIB, GTK+, and WinPcap.
150 Those versions are available from the respctive home pages for
151 each project (the same URLs as listed above). The development
152 packages contain header files and stub libaries to link against.
153
154 The use of an SNMP library has not been made to work yet in
155 Ethereal/Win32, but a binary distribution of the UCD SNMP package,
156 including header files and a DLL of the UCD SNMP library, can be had
157 from:
158
159         ftp://ftp.revelstone.com/snmp/binaries/
160
161 The file will probably be called "ucd-snmp-X.X-x86-win32.zip", where
162 "X.X" is the version number of the UCD SNMP library.
163
164 Instructions for MS Visual C
165 ----------------------------
166 Modify the config.nmake file in the top directory of the Ethereal source
167 tree to work for your local configuration; if you don't have Python,
168 comment out the line that defines PYTHON, otherwise set it to refer to
169 the pathname of your Python interpreter executable.  You should not have
170 to modify any other Makefile.
171
172 In order to compile, at least with the default settings, you
173 also need zlib, which is provided as an archive library, not
174 a DLL. The pre-compiled zlib which comes with the "extralibs"
175 package from Gimp/Win32 is faulty; a working version can be
176 downloaded from:
177
178         http://www.ethereal.com/distribution/win32/zlib-1.1.3-fixed.zip
179
180 Many of the file and directory names used in the build process go past the
181 old 8.3 naming limitations.  As a result, you should use the newer
182 "cmd.exe" interpreter instead of the old "command.com"; this may mean
183 it's not possible to build Ethereal, at least not from the command line,
184 on Windows 95/98/Me - you might have to do it on Windows NT/2000/XP/.NET
185 Server.
186
187 Be sure that your command-line environment is set up to compile
188 and link with MSVC. When installing MSVC, you can have your
189 system's environment set up to always allow compiling from the
190 command line, or you can invoke the vcvars32.bat script, which can
191 usually be found in the "VC98\Bin" subdirectory of the directory in
192 which Visual Studio was installed.
193
194 The first time you build Ethereal, run the script "cleanbld.bat" in the
195 top-level Ethereal source directory to make sure that the "config.h"
196 files will be reconstructed from the "config.h.win32" files.  (If, for
197 example, you have "config.h" files left over from a Unix build, a
198 Windows build will fail.)
199
200 In the ethereal directory, type "nmake -f makefile.nmake". It will
201 recurse into the subdirectories as appropriate.
202
203 Some generated source is created by traditionally "Unix-ish" tools.
204 If you are building from an official distribution, these files are
205 already generated, so you have nothing to worry about unless you
206 modify the source. If building from a CVS image, you'll need the tools
207 to generate C source. The "special" files and their requisite tools are:
208
209 Source                          Output                  Tool
210 ------                          ------                  ----
211 config.h.win32                  config.h                sed
212 epan/config.h.win32             epan/config.h           sed
213 image/ethereal.rc.in            image/ethereal.rc       sed
214 image/tethereal.rc.in           image/tethereal.rc      sed
215 image/editcap.rc.in             image/editcap.rc        sed
216 image/mergecap.rc.in            image/mergecap.rc       sed
217 image/text2pcap.rc.in           image/text2pcap.rc      sed
218 packaging/nsis/ethereal.nsi.in  packaging/ethereal.nsi  sed
219 wiretap/config.h.win32          wiretap/config.h        sed
220 epan/dfilter/dfilter-scanner.l  epan/dfilter/*.c        Flex
221 text2pcap-scanner.l             *.c                     Flex
222 wiretap/ascend-scanner.l        *.c                     Flex
223 wiretap/ascend-grammar.y        *.c,*.h                 Bison/Yacc
224 ncp2222.py                      packet-ncp2222.c        Python
225
226 make-reg-dotc, packet*.c        register.c              Bash + grep + sed
227 or
228 make-reg-dotc.py, packet*.c     register.c              Python
229
230 The Makefile.nmake supplied with the Ethereal distribution will, if
231 PYTHON is defined in config.nmake, attempt to make register.c with
232 Python, since it is much much much faster than the shell version.  The
233 reason it is faster is because the shell version launches multiple
234 processes (grep, sed) for each source file, multiple times.  The Python
235 script is one process.  This matters a lot on Win32.
236
237 If you have a Unix system handy, you can first build on Unix to create
238 most of the source files that these tools make, then run the build on
239 Windows.  That will avoid the need for these tools on your Windows
240 computer.  (This won't work for the files in the "image" directory,
241 however, as those aren't built on Unix - they're only for Windows
242 builds.  It also won't work for the "config.h" files; whilst those are
243 built for Unix, they're specific to the platform on which you're
244 building, and the "config.h" files constructed for a Unix build will not
245 work with a Windows build.)
246
247 If you don't have a Unix system handy, most of those tools are available for
248 Win32 systems as part of the Cygwin package:
249
250         http://sources.redhat.com/cygwin/
251
252 After installing them, you will probably have to modify the config.nmake
253 file to specify where the Cygwin binaries are installed.
254
255 Python for Win32 is available from
256
257         http://www.python.org/
258
259
260 Instructions for Cygwin
261 -----------------------
262
263 It is possible to build Ethereal under Cygwin using their version
264 of XFree86.  Ronnie Sahlberg has this to say in 
265 http://www.ethereal.com/lists/ethereal-dev/200205/msg00107.html:
266
267 To get it running there are some small steps :
268 1, Install XFree for Cygwin and make sure it runs properly
269 (www.cygwin.com)
270 2, Follow the GNOME link on www.cygwin.com and download, compile and install
271 both gtk 1.2.10 and glib 1.2.10 . Note on the page that there is a one line
272 fix required for
273 gtk to compile.
274 3, Download ethereal nightly snapshot and configure it with
275  ./autogen.sh --without-pcap --without-plugins
276 (is it --without-plugin or --without-plugins ? dont remember)
277 4, Run 'make ethereal.exe'
278
279 Something is wrong with the makefile that gets generated so it doesnt work
280 just running make.
281 I am not curious enough to look at why 'make' doesnt work. 'make
282 ethereal.exe' works well
283 enough for me.
284
285 4, start X and ethereal, voila behold the mighty sniffer in all its glory.
286