forked from osmocom/wireshark
docs: Windows CMake builds
Updated the WSDG Windows build instructions to use CMake. Change-Id: I5006c07e09ec6f628e8bc44006a3f1086e831a3c Reviewed-on: https://code.wireshark.org/review/11485 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
4ea610a54a
commit
25e3a6c021
|
@ -93,6 +93,8 @@ Also the 64 bit Windows version are now supported by Wireshark. Although
|
||||||
not all libraries are made 64 bit ready yet, basic operations are all
|
not all libraries are made 64 bit ready yet, basic operations are all
|
||||||
available.
|
available.
|
||||||
|
|
||||||
|
* Windows 10
|
||||||
|
|
||||||
* Windows 8.1 / Windows Server 2012 R2
|
* Windows 8.1 / Windows Server 2012 R2
|
||||||
|
|
||||||
* Windows 8 / Windows Server 2012
|
* Windows 8 / Windows Server 2012
|
||||||
|
@ -103,6 +105,9 @@ available.
|
||||||
|
|
||||||
* Windows XP / Windows Server 2003
|
* Windows XP / Windows Server 2003
|
||||||
|
|
||||||
|
Support for XP / Server 2003 is best efforts for Wireshark 2.0 and later, it may fail to run
|
||||||
|
at any time due to 3rd party library compatibility.
|
||||||
|
|
||||||
[[ChIntroDevelopment]]
|
[[ChIntroDevelopment]]
|
||||||
|
|
||||||
=== Development and maintenance of Wireshark
|
=== Development and maintenance of Wireshark
|
||||||
|
|
|
@ -71,83 +71,42 @@ for Wireshark suitable for cygwin's gcc compiler.
|
||||||
|
|
||||||
=== Win32: Automated library download
|
=== Win32: Automated library download
|
||||||
|
|
||||||
[[ChLibsSetupInitial]]
|
The required libraries (apart from Qt) are automatically downloaded as part of
|
||||||
|
the CMake generation step, and subsequently as required when libraries are updated.
|
||||||
|
|
||||||
|
The libraries are downloaded into the directory indicated by the environment
|
||||||
|
variable WIRESHARK_BASE_DIR, this must be set appropriately for your environment.
|
||||||
|
The libraries are downloaded and extracted into WIRESHARK_BASE_DIR\wireshark-win32-libs
|
||||||
|
and WIRESHARK_BASE_DIR\wireshark-win64-libs for 32 and 64 bit builds respectively.
|
||||||
|
|
||||||
==== Initial download
|
You may also directly set the library directory with the environment variable
|
||||||
|
WIRESHARK_LIB_DIR, but if you switch between 32 bit and 64 bit builds, the value of this
|
||||||
|
must be set appropriately.
|
||||||
|
|
||||||
You can download and install all required libraries by using the `setup` target
|
[[ChLibsQt]]
|
||||||
of 'Makefile.nmake' from the source package.
|
|
||||||
|
|
||||||
[TIP]
|
=== Qt
|
||||||
.Use the setup target
|
|
||||||
====
|
|
||||||
It's a really good idea to use the Win32 automated library download to
|
|
||||||
install the required libraries as it makes this download very easy.
|
|
||||||
|
|
||||||
Before you start the download, you must have installed both the required tools
|
The Qt library is used to build the UI for Wireshark and is used to provide a
|
||||||
(see <<ChapterTools>>) and the Wireshark sources (see <<ChSrcObtain>>).
|
platform independant UI.
|
||||||
====
|
For more information on the Qt libraries, see <<ChUIQt>>.
|
||||||
|
|
||||||
By default the libraries will be downloaded and installed into
|
[[ChLibsUnixQt]]
|
||||||
'C:\wireshark-win32-libs' for x86 builds and 'C:\wireshark-win64-libs' for x86_64 builds.
|
|
||||||
You can change this to any other location by editing
|
|
||||||
'config.nmake' and changing the line containing
|
|
||||||
WIRESHARK_LIB_DIR to your favourite place. You must use an absolute path.
|
|
||||||
|
|
||||||
Then run the command
|
==== Unix
|
||||||
|
|
||||||
----
|
TBD.
|
||||||
> nmake -f Makefile.nmake setup
|
|
||||||
----
|
|
||||||
|
|
||||||
This will first check for all the various tools needed to build Wireshark
|
[[ChLibsWin32Qt]]
|
||||||
as described in <<ChToolsWin32Verify>>.
|
|
||||||
|
|
||||||
Then it will download the zipped libraries (together around 45MB for x86 and 52MB for x64) from the
|
==== Win32 MSVC
|
||||||
server location at
|
|
||||||
https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[] into the
|
|
||||||
directory specified by WIRESHARK_LIB_DIR and install (unzip) all required
|
|
||||||
library files there.
|
|
||||||
|
|
||||||
If you have problems downloading the library files, you might be connected to
|
Qt5 must be installed maunally, from the Qt installers page
|
||||||
the internet through a proxy. In this case see the wget proxy comment in
|
http://www.qt.io/download-open-source/#section-2[], using the version of Qt
|
||||||
<<ChToolsWget>>.
|
appropriate for your compiler. Note that separate installations (into different directories) of Qt
|
||||||
|
are required for 32 bit and 64 bit builds. The environment variable QT5_BASE_DIR should be
|
||||||
[[ChLibsSetupUpdate]]
|
set as appropriate for your environment and should point to the Qt directory that contains the
|
||||||
|
bin directory, e.g. C:\Qt\Qt5.5.0\5.5\msvc2013
|
||||||
==== Update of a previous download
|
|
||||||
|
|
||||||
As new versions of the libraries become available, maybe with bugfixes or
|
|
||||||
some new functionality, your libraries get outdated.
|
|
||||||
|
|
||||||
You could simply remove everything in the WIRESHARK_LIB_DIR dir and call the
|
|
||||||
`setup` target again, but that would require a download of every file again,
|
|
||||||
which isn't necessary.
|
|
||||||
|
|
||||||
The following will bring your libraries up to date:
|
|
||||||
|
|
||||||
* Update your Wireshark sources to the latest SVN files (see <<ChSrcObtain>>), so the zip filenames in the setup target
|
|
||||||
of Makefile.nmake are in sync with the library zip files on the server.
|
|
||||||
|
|
||||||
* Execute the library setup command as described above.
|
|
||||||
+
|
|
||||||
--
|
|
||||||
----
|
|
||||||
> nmake -f Makefile.nmake setup
|
|
||||||
----
|
|
||||||
|
|
||||||
Note that this command will automatically do a `clean-setup` which will
|
|
||||||
remove all files previously unzipped from the downloaded files in your
|
|
||||||
WIRESHARK_LIB_DIR library path (all the subdirs, e.g.
|
|
||||||
'$$c:\wireshark-win32-libs\gtk+$$'),
|
|
||||||
except for the zip files located at the toplevel, which are the files
|
|
||||||
downloaded the last time(s).
|
|
||||||
|
|
||||||
Also note that as wget will download only the
|
|
||||||
missing (updated) files, existing zip files in the WIRESHARK_LIB_DIR dir won't be
|
|
||||||
downloaded again. Remaining (outdated) zip files shouldn't do any harm.
|
|
||||||
--
|
|
||||||
|
|
||||||
[[ChLibsGtk]]
|
[[ChLibsGtk]]
|
||||||
|
|
||||||
|
@ -157,7 +116,7 @@ The Glib library is used as a basic platform abstraction library, it's
|
||||||
not related to graphical user interface (GUI) things. For a detailed
|
not related to graphical user interface (GUI) things. For a detailed
|
||||||
description about GLib, see <<ChCodeGLib>>.
|
description about GLib, see <<ChCodeGLib>>.
|
||||||
|
|
||||||
The GTK and its dependent libraries are used to build Wireshark's GUI.
|
The GTK and its dependent libraries are used to build the older, deprecated, Wireshark GUI.
|
||||||
For a detailed description of the GTK libraries, see <<ChUIGTK>>.
|
For a detailed description of the GTK libraries, see <<ChUIGTK>>.
|
||||||
|
|
||||||
All other libraries are dependent on the two libraries mentioned above,
|
All other libraries are dependent on the two libraries mentioned above,
|
||||||
|
@ -170,7 +129,6 @@ The 2.x versions require all mentioned libs.
|
||||||
|
|
||||||
[[ChLibsUnixGTK]]
|
[[ChLibsUnixGTK]]
|
||||||
|
|
||||||
|
|
||||||
==== Unix
|
==== Unix
|
||||||
|
|
||||||
The GLib/GTK+ libraries are available for many unix-like platforms and
|
The GLib/GTK+ libraries are available for many unix-like platforms and
|
||||||
|
@ -410,6 +368,19 @@ http://www.maxmind.com/app/c[].
|
||||||
We provide a package cross-compiled using MinGW32 at
|
We provide a package cross-compiled using MinGW32 at
|
||||||
https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[].
|
https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[].
|
||||||
|
|
||||||
|
[[ChLibsWinSparkle]]
|
||||||
|
|
||||||
|
=== WinSparkle (optional)
|
||||||
|
|
||||||
|
WinSparkle is an easy-to-use software update library for Windows developers.
|
||||||
|
|
||||||
|
[[ChLibsWin32WinSparkle]]
|
||||||
|
|
||||||
|
==== Win32 MSVC
|
||||||
|
|
||||||
|
We provide a copy of the WinSparkle package at
|
||||||
|
https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[].
|
||||||
|
|
||||||
++++++++++++++++++++++++++++++++++++++
|
++++++++++++++++++++++++++++++++++++++
|
||||||
<!-- End of WSDG Chapter Libraries -->
|
<!-- End of WSDG Chapter Libraries -->
|
||||||
++++++++++++++++++++++++++++++++++++++
|
++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
|
@ -38,9 +38,8 @@ Known traps are:
|
||||||
|
|
||||||
. Not using the correct (x86 or x64) version of the Visual Studio command prompt.
|
. Not using the correct (x86 or x64) version of the Visual Studio command prompt.
|
||||||
|
|
||||||
. Not copying win32.mak to the newer versions of the SDK.
|
|
||||||
|
|
||||||
. Not copying/downloading the correct version of vcredist_xYY.exe.
|
. Not copying/downloading the correct version of vcredist_xYY.exe.
|
||||||
|
|
||||||
====
|
====
|
||||||
|
|
||||||
[[ChSetupPowerShell]]
|
[[ChSetupPowerShell]]
|
||||||
|
@ -95,18 +94,6 @@ It's possible to compile Wireshark with a wide range
|
||||||
of Microsoft C compiler variants. For details see
|
of Microsoft C compiler variants. For details see
|
||||||
<<ChToolsMSChain>>.
|
<<ChToolsMSChain>>.
|
||||||
|
|
||||||
[TIP]
|
|
||||||
.Is Win32.Mak missing?
|
|
||||||
====
|
|
||||||
For VS2013 (and later) Microsoft has left out a required file from the
|
|
||||||
include files to build with nmake. To fix this copy Win32.Mak from the Win 7 SDK
|
|
||||||
into an appropriate path for use with VS2013, e.g.
|
|
||||||
----
|
|
||||||
C:\> xcopy "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include\Win32.Mak" ^
|
|
||||||
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include"
|
|
||||||
----
|
|
||||||
====
|
|
||||||
|
|
||||||
You may have to do this as Administrator.
|
You may have to do this as Administrator.
|
||||||
|
|
||||||
Compiling with gcc or Clang is not recommended and will
|
Compiling with gcc or Clang is not recommended and will
|
||||||
|
@ -173,16 +160,10 @@ http://qt-project.org/downloads[download page] and select a component that
|
||||||
matches your target system and compiler. For example, the ``msvc2013 64-bit
|
matches your target system and compiler. For example, the ``msvc2013 64-bit
|
||||||
OpenGL'' component is used to build the official 64-bit packages.
|
OpenGL'' component is used to build the official 64-bit packages.
|
||||||
|
|
||||||
Note that the Qt package also includes the Qt Creator IDE, which is useful
|
Note that separate installations (into different directories) of Qt
|
||||||
for designing graphical components and includes an interactive debugger.
|
are required for 32 bit and 64 bit builds. The environment variable QT5_BASE_DIR should be
|
||||||
You'll need to build Wireshark using nmake before you'll be able to build the
|
set as appropriate for your environment and should point to the Qt directory that contains the
|
||||||
Wireshark project (uiqtWireshark.pro), however.
|
bin directory, e.g. C:\Qt\Qt5.5.0\5.5\msvc2013
|
||||||
|
|
||||||
You can also use Chocolatey to install Qt (there are packages for x86 & x64 and various MSVC compilers, e.g.
|
|
||||||
|
|
||||||
----
|
|
||||||
PS$>choco install qt-sdk-windows-x86-msvc2013_opengl
|
|
||||||
----
|
|
||||||
|
|
||||||
[[ChSetupCygwin]]
|
[[ChSetupCygwin]]
|
||||||
|
|
||||||
|
@ -312,6 +293,22 @@ PS$> choco install git
|
||||||
A list of other GUI interfaces for Git can be found at
|
A list of other GUI interfaces for Git can be found at
|
||||||
http://git-scm.com/downloads/guis
|
http://git-scm.com/downloads/guis
|
||||||
|
|
||||||
|
|
||||||
|
[[ChSetupCMake]]
|
||||||
|
|
||||||
|
=== Install CMake
|
||||||
|
|
||||||
|
Get the CMake installer from https://cmake.org/download/[] and install CMake into
|
||||||
|
the default location. Ensure the directory containing cmake.exe is added to your path.
|
||||||
|
|
||||||
|
Alternatively you can install CMake using Chocolatey:
|
||||||
|
|
||||||
|
----
|
||||||
|
PS$>choco install cmake.portable
|
||||||
|
----
|
||||||
|
|
||||||
|
Chocolatey ensures cmake.exe is on your path.
|
||||||
|
|
||||||
==== Install and Prepare Sources
|
==== Install and Prepare Sources
|
||||||
|
|
||||||
[TIP]
|
[TIP]
|
||||||
|
@ -364,7 +361,8 @@ Make sure your repository path doesn't contain spaces.
|
||||||
|
|
||||||
From the Start Menu (or Start Screen), navigate to the Visual Studio 2013 ->
|
From the Start Menu (or Start Screen), navigate to the Visual Studio 2013 ->
|
||||||
Visual Studio Tools directory and choose the Command Prompt appropriate for
|
Visual Studio Tools directory and choose the Command Prompt appropriate for
|
||||||
the build you wish to make, e.g. VS2013 x86 Native Tools Command Prompt for a 32-bit version, VS2013 x64 Native Tools Command Prompt for a 64-bit version.
|
the build you wish to make, e.g. VS2013 x86 Native Tools Command Prompt for a 32-bit version,
|
||||||
|
VS2013 x64 Native Tools Command Prompt for a 64-bit version.
|
||||||
|
|
||||||
[TIP]
|
[TIP]
|
||||||
.Pin the items to the Task Bar
|
.Pin the items to the Task Bar
|
||||||
|
@ -381,9 +379,9 @@ Set the following environment variables, using paths and values suitable for you
|
||||||
|
|
||||||
----
|
----
|
||||||
> set CYGWIN=nodosfilewarning
|
> set CYGWIN=nodosfilewarning
|
||||||
> set WIRESHARK_BASE_DIR=C:\Development
|
> set WIRESHARK_BASE_DIR=C:\Development or set WIRESHARK_LIB_DIR to the appropriate library directory for your build.
|
||||||
> set WIRESHARK_TARGET_PLATFORM=win32 or win64 as required
|
> set WIRESHARK_TARGET_PLATFORM=win32 or win64 as required
|
||||||
> set QT5_BASE_DIR=C:\Qt\Qt5.3.0\5.3\msvc2013
|
> set QT5_BASE_DIR=C:\Qt\Qt5.5.0\5.5\msvc2013
|
||||||
|
|
||||||
> set WIRESHARK_VERSION_EXTRA=-YourExtraVersionInfo
|
> set WIRESHARK_VERSION_EXTRA=-YourExtraVersionInfo
|
||||||
----
|
----
|
||||||
|
@ -396,103 +394,60 @@ Setting these variables could be added to a batch file to be run after you open
|
||||||
the Visual Studio Tools Command Prompt.
|
the Visual Studio Tools Command Prompt.
|
||||||
--
|
--
|
||||||
|
|
||||||
. Change to the correct source directory
|
. Create and change to the correct build directory. CMake is best used in an out-of-tree build configuration
|
||||||
|
where the build is done in a separate directory to the source tree, leaving the source tree in a pristine
|
||||||
|
state. 32 and 64 bit builds require a separate build directory. Create (if required) and change to the appropriate
|
||||||
|
build directory.
|
||||||
+
|
+
|
||||||
--
|
--
|
||||||
----
|
----
|
||||||
> cd C:\Development\wireshark
|
> mkdir C:\Development\wsbuild32
|
||||||
|
> cd C:\Development\wsbuild32
|
||||||
----
|
----
|
||||||
to jump into the source directory
|
to create and jump into the build directory.
|
||||||
|
|
||||||
|
The build directory can be deleted at any time and the build files regenerated as detailed in <<ChWin32Generate>>.
|
||||||
--
|
--
|
||||||
|
|
||||||
[[ChToolsWin32Verify]]
|
[[ChWin32Generate]]
|
||||||
|
|
||||||
==== Verify installed tools
|
==== Generate the build files
|
||||||
|
|
||||||
After you've installed the Wireshark sources (see <<ChSrcObtain>>), you can
|
CMake is used to process the CMakeLists.txt files in the source tree and produce build files appropriate
|
||||||
check the correct installation of all tools by using the `verify_tools` target of
|
for your system.
|
||||||
the `Makefile.nmake` from the source package.
|
|
||||||
|
|
||||||
[WARNING]
|
You can generate Visual Studio solution files to build either from within Visual Studio, or from the command
|
||||||
.Dependencies ahead
|
line with MSBuild. CMake can also generate other build types but they aren't supported.
|
||||||
====
|
|
||||||
You will need the Wireshark sources and some tools
|
|
||||||
(nmake, bash) installed, before this verification is able
|
|
||||||
to work.
|
|
||||||
====
|
|
||||||
|
|
||||||
Enter at the Visual Studio Command prompt line:
|
The initial generation step is only required the first time a build directory is created. Subsequent
|
||||||
|
builds will regenerate the build files as required.
|
||||||
|
|
||||||
|
If you've closed the Visual Studio Command Prompt <<ChSetupPrepareCommandCom,prepare>> it again.
|
||||||
|
|
||||||
|
To generate the build files enter the following at the Visual Studio command prompt:
|
||||||
----
|
----
|
||||||
> nmake -f Makefile.nmake verify_tools
|
> cmake -DPYTHON_EXECUTABLE=c:/Python27/python -DENABLE_CHM_GUIDES=on -G "Visual Studio 12" ..\wireshark
|
||||||
----
|
----
|
||||||
|
|
||||||
This will check for the various tools needed to build Wireshark:
|
Adjusting the paths as required to Python and the wireshark source tree. To use a different generator
|
||||||
|
modify the -G parameter, cmake -G lists all the CMake supported generators, but only Visual Studio is
|
||||||
|
supported for Wireshark builds.
|
||||||
|
|
||||||
|
The CMake generation process will download the required 3rd party libraries (apart from Qt)
|
||||||
|
as required, then test each library for usability before generating the build files.
|
||||||
|
|
||||||
|
At the end of the CMake generation process the following should be displayed:
|
||||||
|
----
|
||||||
|
-- Configuring done
|
||||||
|
-- Generating done
|
||||||
|
-- Build files have been written to: C:/Development/wsbuild32
|
||||||
----
|
----
|
||||||
|
|
||||||
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
|
If you get any other output, there is an issue in your envirnment that must be rectified before building.
|
||||||
Copyright (C) Microsoft Corporation. All rights reserved.
|
Check the parameters passed to CMake, especially the -G option and the path to the Wireshark sources and
|
||||||
|
the environment variables WIRESHARK_BASE_DIR, WIRESHARK_TARGET_PLATFORM and QT5_BASE_DIR.
|
||||||
|
|
||||||
|
[[ChWin32Build]]
|
||||||
ERROR: The contents of 'E:\Wireshark\Wireshark-win32-libs\current_tag.txt' is (unknown).
|
|
||||||
It should be 2014-10-01.
|
|
||||||
|
|
||||||
Checking for required applications:
|
|
||||||
cl: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN/cl
|
|
||||||
link: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN/link
|
|
||||||
nmake: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN/nmake
|
|
||||||
bash: /usr/bin/bash
|
|
||||||
bison: /usr/bin/bison
|
|
||||||
flex: /usr/bin/flex
|
|
||||||
env: /usr/bin/env
|
|
||||||
grep: /usr/bin/grep
|
|
||||||
/usr/bin/find: /usr/bin/find
|
|
||||||
peflags: /usr/bin/peflags
|
|
||||||
perl: /usr/bin/perl
|
|
||||||
C:\Python27\python.exe: /cygdrive/c/Python27/python.exe
|
|
||||||
C:\Qt\Qt5.3.0\5.3\msvc2013\bin\qmake: /cygdrive/c/Qt/Qt5.3.0/5.3/msvc2013/bin/qmake
|
|
||||||
sed: /usr/bin/sed
|
|
||||||
unzip: /usr/bin/unzip
|
|
||||||
wget: /usr/bin/wget
|
|
||||||
----
|
|
||||||
|
|
||||||
The "ERROR" at the start occurs because you haven't yet downloaded the third
|
|
||||||
party libraries and it can be ignored at this stage.
|
|
||||||
If you have problems with all the first three items (cl, link, nmake), check
|
|
||||||
that you opened a Visual Studio Command Prompt <<ChSetupPrepareCommandCom>>.
|
|
||||||
|
|
||||||
Unfortunately, the `link` command is defined both in Cygwin and in MSVC, each
|
|
||||||
with completely different functionality. You'll need the MSVC link. If your link
|
|
||||||
command looks something like: `/usr/bin/link` the link command of Cygwin takes
|
|
||||||
precedence over the MSVC one. To fix this, you can change your `PATH` environment
|
|
||||||
setting or simply rename `link.exe` in Cygwin. If you rename it, make sure to
|
|
||||||
remember that a Cygwin update may provide a new version of it.
|
|
||||||
|
|
||||||
Make sure that the other tools found are the Cygwin versions. Some build
|
|
||||||
problems have been caused by incompatible versions of `grep` and `unzip` provided by other installed applications.
|
|
||||||
|
|
||||||
==== Install Libraries
|
|
||||||
|
|
||||||
. If you've closed the Visual Studio Command Prompt <<ChSetupPrepareCommandCom,prepare>> it again.
|
|
||||||
|
|
||||||
. Run
|
|
||||||
+
|
|
||||||
--
|
|
||||||
----
|
|
||||||
> nmake -f Makefile.nmake setup
|
|
||||||
----
|
|
||||||
to download and install libraries using `wget`. This may take a while.
|
|
||||||
--
|
|
||||||
|
|
||||||
. If the download fails you may be behind a restrictive firewall. See the proxy
|
|
||||||
comment in <<ChToolsWget>>.
|
|
||||||
|
|
||||||
Note that 32-bit versions of the software require 32-bit versions of the
|
|
||||||
libraries and that 64-bit versions require 64-bit libraries. The build process
|
|
||||||
creates independent directories for each as needed. See
|
|
||||||
<<ChSetupPrepareCommandCom>>for how to open the required Visual Studio Command Prompt and
|
|
||||||
`WIRESHARK_TARGET_PLATFORM` to select either a 32- or 64-bit build.
|
|
||||||
|
|
||||||
==== Build Wireshark
|
==== Build Wireshark
|
||||||
|
|
||||||
|
@ -504,24 +459,28 @@ Now it's time to build Wireshark!
|
||||||
+
|
+
|
||||||
--
|
--
|
||||||
----
|
----
|
||||||
> nmake -f Makefile.nmake all
|
> msbuild /m /p:Configuration=RelWithDebInfo Wireshark.sln
|
||||||
----
|
----
|
||||||
to build Wireshark.
|
to build Wireshark.
|
||||||
--
|
--
|
||||||
|
|
||||||
. Wait for Wireshark to compile. This will take a while, and there will be a lot of text output in the command prompt window
|
. Wait for Wireshark to compile. This will take a while, and there will be a lot of text output in the command prompt window
|
||||||
|
|
||||||
. For the QT version run `C:\Development\wireshark\wireshark-qt-release\Wireshark.exe` and make sure it starts.
|
. For the QT version run `C:\Development\wsbuild32\run\RelWithDebInfo\Wireshark.exe` and make sure it starts.
|
||||||
|
|
||||||
. For the older GTK version run `C:\Development\wireshark\wireshark-gtk2\Wireshark-gtk.exe`.
|
. For the older GTK version run `C:\Development\wsbuild32\run\RelWithDebInfo\wireshark-gtk.exe`.
|
||||||
|
|
||||||
. Open 'Help -> About'. If it shows your "private" program
|
. Open 'Help -> About'. If it shows your "private" program
|
||||||
version, e.g.: Version wireshark-major-minor-version:[].x-myprotocol123
|
version, e.g.: Version wireshark-major-minor-version:[].x-myprotocol123
|
||||||
congratulations! You have compiled your own version of Wireshark!
|
congratulations! You have compiled your own version of Wireshark!
|
||||||
|
|
||||||
TIP: If compilation fails for suspicious
|
You may also open the Wireshark solution file (Wireshark.sln) in the Visual Studio IDE and build there.
|
||||||
reasons after you changed some source files try to "distclean"
|
|
||||||
the sources and make "all" again
|
TIP: If compilation fails for suspicious reasons after you changed some source
|
||||||
|
files try to clean the build files by running msbuild /m /p:Configuration=RelWithDebInfo Wireshark.sln /t:Clean
|
||||||
|
and then building the solution again.
|
||||||
|
|
||||||
|
The build files produced by CMake will regenerate themselves if required by changes in the source tree.
|
||||||
|
|
||||||
==== Debug Environment Setup
|
==== Debug Environment Setup
|
||||||
|
|
||||||
|
@ -545,8 +504,7 @@ you'll need NSIS.
|
||||||
. NSIS:
|
. NSIS:
|
||||||
http://nsis.sourceforge.net[Download] and install NSIS
|
http://nsis.sourceforge.net[Download] and install NSIS
|
||||||
+
|
+
|
||||||
You may check the `MAKENSIS` setting in the file 'config.nmake' in the Wireshark
|
Note that the 32-bit version of NSIS will work for both 32-bit and
|
||||||
sources. Note that the 32-bit version of NSIS will work for both 32-bit and
|
|
||||||
64-bit versions of Wireshark.
|
64-bit versions of Wireshark.
|
||||||
|
|
||||||
Note: If you do not yet have a copy of vcredist_x86.exe or vcredist_x64.exe in ./wireshark-winXX-libs (where XX is 32 or 64) you will need to download the appropriate file and place it in ./wireshark-winXX-libs before starting this step.
|
Note: If you do not yet have a copy of vcredist_x86.exe or vcredist_x64.exe in ./wireshark-winXX-libs (where XX is 32 or 64) you will need to download the appropriate file and place it in ./wireshark-winXX-libs before starting this step.
|
||||||
|
@ -563,7 +521,8 @@ Note you must use the correct version of vcredist for your compiler, unfortunate
|
||||||
+
|
+
|
||||||
--
|
--
|
||||||
----
|
----
|
||||||
> nmake -f Makefile.nmake packaging
|
> msbuild /m /p:Configuration=RelWithDebInfo nsis_package_prep.vcxproj
|
||||||
|
> msbuild /m /p:Configuration=RelWithDebInfo nsis_package.vcxproj
|
||||||
----
|
----
|
||||||
to build a Wireshark installer.
|
to build a Wireshark installer.
|
||||||
--
|
--
|
||||||
|
|
|
@ -396,29 +396,10 @@ to see what options you have.
|
||||||
|
|
||||||
==== Win32 native
|
==== Win32 native
|
||||||
|
|
||||||
Ensure you have correctly set your build environment as discussed in
|
Follow the build procedure in <<ChWin32Build>> to build Wireshark.
|
||||||
<<ChSetupPrepareCommandCom>>
|
|
||||||
|
|
||||||
You should then cleanup any intermediate files, which are shipped for
|
|
||||||
convenience of Unix users, by typing at the command line prompt:
|
|
||||||
|
|
||||||
----
|
|
||||||
> nmake -f Makefile.nmake distclean
|
|
||||||
----
|
|
||||||
|
|
||||||
After doing this, typing at the command line prompt:
|
|
||||||
|
|
||||||
----
|
|
||||||
> nmake -f Makefile.nmake all
|
|
||||||
----
|
|
||||||
|
|
||||||
will start the whole Wireshark build process.
|
|
||||||
|
|
||||||
|
|
||||||
After the build process has successfully finished, you should find a
|
After the build process has successfully finished, you should find a
|
||||||
`wireshark.exe` and some other files
|
`Wireshark.exe` and some other files in the `run\RelWithDebInfo` directory.
|
||||||
in the root directory.
|
|
||||||
|
|
||||||
|
|
||||||
[[ChSrcRunFirstTime]]
|
[[ChSrcRunFirstTime]]
|
||||||
|
|
||||||
|
@ -467,12 +448,12 @@ be informative when things don't work as expected.
|
||||||
==== Win32 native
|
==== Win32 native
|
||||||
|
|
||||||
During the build all relevant program files are collected in a subdirectory
|
During the build all relevant program files are collected in a subdirectory
|
||||||
'wireshark-qt-release'. You can run the program from there by
|
`run\RelWithDebInfo`. You can run the program from there by
|
||||||
launching the Wireshark.exe executable.
|
launching the Wireshark.exe executable.
|
||||||
|
|
||||||
The older GTK based version is also available in the 'wireshark-gtk'
|
The older GTK based version is also available in the same
|
||||||
subdirectory. You can run the program from there by launching the
|
subdirectory. You can run the program from there by launching the
|
||||||
Wireshark-gtk.exe executable.
|
wireshark-gtk.exe executable.
|
||||||
|
|
||||||
|
|
||||||
[[ChSrcDebug]]
|
[[ChSrcDebug]]
|
||||||
|
@ -1139,22 +1120,12 @@ When building with CMake you must first build the 'nsis_package_prep' target,
|
||||||
followed by the 'nsis_package' target, e.g.
|
followed by the 'nsis_package' target, e.g.
|
||||||
|
|
||||||
----
|
----
|
||||||
> msbuild nsis_package_prep.vcxproj
|
> msbuild /m /p:Configuration=RelWithDebInfo nsis_package_prep.vcxproj
|
||||||
> msbuild nsis_package.vcxproj
|
> msbuild /m /p:Configuration=RelWithDebInfo nsis_package.vcxproj
|
||||||
----
|
----
|
||||||
|
|
||||||
Splitting the packaging projects in this way allows for code signing.
|
Splitting the packaging projects in this way allows for code signing.
|
||||||
|
|
||||||
For Nmake you will probably have to modify the MAKENSIS setting in the
|
|
||||||
'config.nmake' file to specify where the NSIS binaries are installed. In the
|
|
||||||
top-level source directory type:
|
|
||||||
|
|
||||||
----
|
|
||||||
> nmake -f makefile.nmake packaging
|
|
||||||
----
|
|
||||||
|
|
||||||
to build the installer.
|
|
||||||
|
|
||||||
[TIP]
|
[TIP]
|
||||||
.This might take a while
|
.This might take a while
|
||||||
====
|
====
|
||||||
|
@ -1164,7 +1135,7 @@ It might take some time, even on fast machines.
|
||||||
|
|
||||||
If everything went well, you will now find something like:
|
If everything went well, you will now find something like:
|
||||||
'wireshark-setup-wireshark-version:[].exe' in
|
'wireshark-setup-wireshark-version:[].exe' in
|
||||||
the 'packaging/nsis' directory.
|
the 'packaging/nsis' directory in the source tree.
|
||||||
|
|
||||||
[[ChSrcPortableApps]]
|
[[ChSrcPortableApps]]
|
||||||
|
|
||||||
|
@ -1173,7 +1144,7 @@ the 'packaging/nsis' directory.
|
||||||
_PortableApps.com_ is an environment that lets users run popular applications
|
_PortableApps.com_ is an environment that lets users run popular applications
|
||||||
from portable media such as flash drives and cloud drive services.
|
from portable media such as flash drives and cloud drive services.
|
||||||
|
|
||||||
Install the 'PortableApps.com Platform'. Install for ``all users,'' which
|
Install the 'PortableApps.com Platform'. Install for ``all users``, which
|
||||||
will place it in `C:\PortableApps`. Add the following apps:
|
will place it in `C:\PortableApps`. Add the following apps:
|
||||||
|
|
||||||
- NSIS Portable (Unicode)
|
- NSIS Portable (Unicode)
|
||||||
|
@ -1186,18 +1157,10 @@ When building with CMake you must first build the 'nsis_package_prep' target
|
||||||
'portableapps_package' target, e.g.
|
'portableapps_package' target, e.g.
|
||||||
|
|
||||||
----
|
----
|
||||||
> msbuild nsis_package_prep.vcxproj
|
> msbuild /m /p:Configuration=RelWithDebInfo nsis_package_prep.vcxproj
|
||||||
> msbuild portableapps_package.vcxproj
|
> msbuild /m /p:Configuration=RelWithDebInfo portableapps_package.vcxproj
|
||||||
----
|
----
|
||||||
|
|
||||||
For Nmake, type the following in the top-level source directory
|
|
||||||
|
|
||||||
----
|
|
||||||
> nmake -f makefile.nmake packaging_papps
|
|
||||||
----
|
|
||||||
|
|
||||||
to build the installer.
|
|
||||||
|
|
||||||
[TIP]
|
[TIP]
|
||||||
.This might take a while
|
.This might take a while
|
||||||
====
|
====
|
||||||
|
|
|
@ -314,8 +314,6 @@ compiler, you'll need:
|
||||||
|
|
||||||
. Linker (`link.exe`)
|
. Linker (`link.exe`)
|
||||||
|
|
||||||
. Make (`nmake.exe`)
|
|
||||||
|
|
||||||
. C runtime headers and libraries (e.g. 'stdio.h', 'msvcrt.lib')
|
. C runtime headers and libraries (e.g. 'stdio.h', 'msvcrt.lib')
|
||||||
|
|
||||||
. Windows platform headers and libraries (e.g.
|
. Windows platform headers and libraries (e.g.
|
||||||
|
@ -326,7 +324,7 @@ compiler, you'll need:
|
||||||
|
|
||||||
==== Toolchain Package Alternatives
|
==== Toolchain Package Alternatives
|
||||||
|
|
||||||
The Wireshark 1.99.x releases are compiled using Microsoft Visual $$C++$$ 2013.
|
The Wireshark 2.0.x releases are compiled using Microsoft Visual $$C++$$ 2013.
|
||||||
The official Wireshark 1.12.x and 1.10.x releases are compiled using
|
The official Wireshark 1.12.x and 1.10.x releases are compiled using
|
||||||
Microsoft Visual $$C++$$ 2010 SP1.
|
Microsoft Visual $$C++$$ 2010 SP1.
|
||||||
The official 1.8 releases were compiled using
|
The official 1.8 releases were compiled using
|
||||||
|
@ -358,7 +356,7 @@ Purchase required?:: http://www.visualstudio.com/en-us/downloads/download-visual
|
||||||
|
|
||||||
SDK required for 64-bit builds?:: No
|
SDK required for 64-bit builds?:: No
|
||||||
|
|
||||||
config.nmake MSVC_VARIANT:: MSVC2013
|
CMake Generator: `Visual Studio 12`
|
||||||
|
|
||||||
.Visual C++ 2010 Express Edition
|
.Visual C++ 2010 Express Edition
|
||||||
|
|
||||||
|
@ -368,7 +366,7 @@ Purchase required?:: http://www.microsoft.com/express/Downloads/#Visual_Studio_2
|
||||||
|
|
||||||
SDK required for 64-bit builds?:: Yes.
|
SDK required for 64-bit builds?:: Yes.
|
||||||
|
|
||||||
config.nmake MSVC_VARIANT:: MSVC2010EE
|
CMake Generator: `Visual Studio 10`
|
||||||
|
|
||||||
Remarks:: Installers created using express editions require a $$C++$$ redistributable
|
Remarks:: Installers created using express editions require a $$C++$$ redistributable
|
||||||
'$$vcredist_x86.exe$$' (3MB free
|
'$$vcredist_x86.exe$$' (3MB free
|
||||||
|
@ -387,7 +385,7 @@ Purchase required?:: Yes
|
||||||
|
|
||||||
SDK required for 64-bit builds?:: No
|
SDK required for 64-bit builds?:: No
|
||||||
|
|
||||||
config.nmake MSVC_VARIANT:: MSVC2010
|
CMake Generator: `Visual Studio 10`
|
||||||
|
|
||||||
Remarks:: Building a 64-bit installer
|
Remarks:: Building a 64-bit installer
|
||||||
requires a a $$C++$$ redistributable
|
requires a a $$C++$$ redistributable
|
||||||
|
@ -433,41 +431,6 @@ However, the version string may vary.
|
||||||
Documentation on the compiler can be found at
|
Documentation on the compiler can be found at
|
||||||
http://msdn.microsoft.com/en-us/library/wk21sfcf.aspx[Microsoft MSDN]
|
http://msdn.microsoft.com/en-us/library/wk21sfcf.aspx[Microsoft MSDN]
|
||||||
|
|
||||||
[[ChToolsNMake]]
|
|
||||||
|
|
||||||
==== nmake.exe (Make)
|
|
||||||
|
|
||||||
Nmake is part of the toolchain packages described
|
|
||||||
above.
|
|
||||||
|
|
||||||
Instead of using the workspace (.dsw) and projects (.dsp) files, the traditional
|
|
||||||
nmake makefiles are used. This has one main reason: it makes it much easier to
|
|
||||||
maintain changes simultaneously with the GCC toolchain makefile.am files as both
|
|
||||||
file formats are similar. However, as no Visual Studio workspace/project files
|
|
||||||
are available, this makes it hard to use the Visual Studio IDE e.g. for using
|
|
||||||
the integrated debugging feature.
|
|
||||||
|
|
||||||
After correct installation, typing at the Visual Studio Command line prompt (cmd.exe):
|
|
||||||
|
|
||||||
----
|
|
||||||
> nmake
|
|
||||||
----
|
|
||||||
|
|
||||||
should result in something like:
|
|
||||||
|
|
||||||
----
|
|
||||||
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
|
|
||||||
Copyright (C) Microsoft Corporation. All rights reserved.
|
|
||||||
|
|
||||||
NMAKE : fatal error U1064: MAKEFILE not found and no target specified
|
|
||||||
Stop.
|
|
||||||
----
|
|
||||||
|
|
||||||
However, the version string may vary.
|
|
||||||
|
|
||||||
Documentation on nmake can be found at
|
|
||||||
http://msdn.microsoft.com/en-us/library/dd9y37ha.aspx[Microsoft MSDN]
|
|
||||||
|
|
||||||
==== link.exe (Linker)
|
==== link.exe (Linker)
|
||||||
|
|
||||||
After correct installation, typing at the Visual Studio Command line prompt (cmd.exe):
|
After correct installation, typing at the Visual Studio Command line prompt (cmd.exe):
|
||||||
|
@ -532,9 +495,8 @@ interested reader:
|
||||||
In all cases where '$$vcredist_x86.exe$$' or '$$vcredist_x64.exe$$' is
|
In all cases where '$$vcredist_x86.exe$$' or '$$vcredist_x64.exe$$' is
|
||||||
downloaded it should be downloaded to the directory into which the support
|
downloaded it should be downloaded to the directory into which the support
|
||||||
libraries for Wireshark have been downloaded and installed. This directory is
|
libraries for Wireshark have been downloaded and installed. This directory is
|
||||||
specified by the WIRESHARK_LIB_DIR setting in the 'config.nmake'. By default it
|
specified by the WIRESHARK_BASE_DIR or WIRESHARK_LIB_DIR environment variables.
|
||||||
is 'C:\Development\wireshark-win32-libs'. It need not, and should not, be run after being
|
It need not, and should not, be run after being downloaded.
|
||||||
downloaded.
|
|
||||||
|
|
||||||
===== msvcr120.dll / vcredist_x86.exe / vcredist_x64.exe - Version 12.0 (2013)
|
===== msvcr120.dll / vcredist_x86.exe / vcredist_x64.exe - Version 12.0 (2013)
|
||||||
|
|
||||||
|
@ -609,8 +571,6 @@ be able to open .chm files from Wireshark and show the
|
||||||
online help. Both files are part of the SDK (standalone (P)SDK or MSVC
|
online help. Both files are part of the SDK (standalone (P)SDK or MSVC
|
||||||
since 2002).
|
since 2002).
|
||||||
|
|
||||||
Simply set HHC_DIR in 'config.nmake' to use it.
|
|
||||||
|
|
||||||
[[ChToolsDebugger]]
|
[[ChToolsDebugger]]
|
||||||
|
|
||||||
==== Debugger
|
==== Debugger
|
||||||
|
@ -625,19 +585,14 @@ otherwise the debugger will simply fail or you will only see a lot of garbage.
|
||||||
===== Visual Studio integrated debugger
|
===== Visual Studio integrated debugger
|
||||||
|
|
||||||
You can use the integrated debugger of Visual Studio if your toolchain includes
|
You can use the integrated debugger of Visual Studio if your toolchain includes
|
||||||
it. As described on http://msdn.microsoft.com/en-us/library/0bxe8ytt.aspx[MSDN],
|
it. Open the solution in your build directory and build and debug as normal with a
|
||||||
create an EXE project for your built copy,
|
Visual Studio solution.
|
||||||
i.e. C:\Development\Wireshark\wireshark-qt-release\Wireshark.exe, and then
|
|
||||||
start the debugger in the mormal way. To set a breakpoint, open the required
|
|
||||||
source file using the File -> Open -> File menu and set the breakpoint as normal.
|
|
||||||
|
|
||||||
The normal build is an optimised release version so debugging can be a bit
|
The normal build is an optimised release version so debugging can be a bit
|
||||||
difficult as variables are optimised out into registers and the execution
|
difficult as variables are optimised out into registers and the execution
|
||||||
order of statements can jump around.
|
order of statements can jump around.
|
||||||
|
|
||||||
If you require a non-optimised version, then edit config.nmake and replace the /O2
|
If you require a non-optimised version, then build using a debug configuration.
|
||||||
flag from LOCAL_CFLAGS with /Od, clean up the build (nmake -f Makefile.nmake clean)
|
|
||||||
and then rebuild.
|
|
||||||
|
|
||||||
[[ChToolsMSDebuggingTools]]
|
[[ChToolsMSDebuggingTools]]
|
||||||
|
|
||||||
|
@ -659,11 +614,14 @@ PS:\> choco install windbg
|
||||||
|
|
||||||
To debug Wireshark using WinDbg, open the built copy of Wireshark using
|
To debug Wireshark using WinDbg, open the built copy of Wireshark using
|
||||||
the File -> Open Executable... menu,
|
the File -> Open Executable... menu,
|
||||||
i.e. C:\Development\Wireshark\wireshark-qt-release\Wireshark.exe. To set a
|
i.e. C:\Development\wsbuild32\run\RelWithDebInfo\Wireshark.exe. To set a
|
||||||
breakpoint open the required source file using the File -> Open Source File...
|
breakpoint open the required source file using the File -> Open Source File...
|
||||||
menu and then click on the required line and press F9. To run the program,
|
menu and then click on the required line and press F9. To run the program,
|
||||||
press F5.
|
press F5.
|
||||||
|
|
||||||
|
If you require a non-optimised version, then build using a debug configuration, e.g.
|
||||||
|
`msbuild /m /p:Configuration=RelWithDebInfo Wireshark.sln`.
|
||||||
|
|
||||||
[[ChToolsBash]]
|
[[ChToolsBash]]
|
||||||
|
|
||||||
=== bash
|
=== bash
|
||||||
|
@ -1145,60 +1103,6 @@ The Windows native Git tools provide patch. A native Windows patch package can b
|
||||||
http://gnuwin32.sourceforge.net/[]. The
|
http://gnuwin32.sourceforge.net/[]. The
|
||||||
installation should be straightforward.
|
installation should be straightforward.
|
||||||
|
|
||||||
[[ChToolsWget]]
|
|
||||||
|
|
||||||
=== Windows: GNU wget (optional)
|
|
||||||
|
|
||||||
GNU wget is used by the Nmake toolchain to download files from the internet
|
|
||||||
using the command line. It is not needed when building with CMake.
|
|
||||||
|
|
||||||
GNU wget is available for most of the UNIX-like platforms and as the wget
|
|
||||||
package from the <<ChToolsCygwin,Cygwin setup>> and also using Chocolatey.
|
|
||||||
At the time of writing the native Chocolatey wget package had incomplete
|
|
||||||
CA certificate support. As a result the Cygwin package is recommended:
|
|
||||||
|
|
||||||
----
|
|
||||||
PS$> choco install wget -source cygwin
|
|
||||||
----
|
|
||||||
|
|
||||||
You will only need wget if you want to use the Windows automated library
|
|
||||||
download. See <<ChLibsSetup>>for details.
|
|
||||||
|
|
||||||
If GNU wget isn't already installed or available as a package for your platform
|
|
||||||
(well, for Windows it is available as a Cygwin package), you can get it at
|
|
||||||
http://www.gnu.org/software/wget/wget.html[].
|
|
||||||
|
|
||||||
If wget is trying to download files but fails to do so, your Internet connection
|
|
||||||
might use an HTTP proxy. Some Internet providers use such a proxy and it is
|
|
||||||
common in many company networks today. Wireshark's setup script will try to
|
|
||||||
discover your proxy settings automatically, but you may need to set the
|
|
||||||
environment variable 'HTTP_PROXY' by hand before using wget. For example, if you
|
|
||||||
are behind proxy.com which is listening on port 8080, you have to set it to
|
|
||||||
something like:
|
|
||||||
|
|
||||||
----
|
|
||||||
set HTTP_PROXY=http://proxy.com:8080/
|
|
||||||
----
|
|
||||||
|
|
||||||
If you are unsure about the settings, you might ask your system administrator.
|
|
||||||
|
|
||||||
[[ChToolsUnzip]]
|
|
||||||
|
|
||||||
=== Windows: GNU unzip (optional)
|
|
||||||
|
|
||||||
GNU unzip is used to, well, unzip the zip files downloaded using the wget tool.
|
|
||||||
As with wget it is not needed when building with CMake.
|
|
||||||
|
|
||||||
GNU unzip is available for most of the UNIX-like platforms and as the unzip
|
|
||||||
package from the <<ChToolsCygwin,Cygwin setup>>.
|
|
||||||
|
|
||||||
You will only need unzip if you want to use the Windows automated library
|
|
||||||
download. See <<ChLibsSetup>>for details.
|
|
||||||
|
|
||||||
If GNU unzip isn't already installed or available as a package for your platform
|
|
||||||
(well, for Windows it is available as a Cygwin package), you can get it at
|
|
||||||
http://gnuwin32.sourceforge.net/packages/unzip.htm[].
|
|
||||||
|
|
||||||
[[ChToolsNSIS]]
|
[[ChToolsNSIS]]
|
||||||
|
|
||||||
=== Windows: NSIS (optional)
|
=== Windows: NSIS (optional)
|
||||||
|
@ -1229,8 +1133,7 @@ files.
|
||||||
To install it, do the following:
|
To install it, do the following:
|
||||||
|
|
||||||
* Download the latest PortableApps.com Platform release from
|
* Download the latest PortableApps.com Platform release from
|
||||||
http://portableapps.com/[]. `config.nmake` uses the ``Local
|
http://portableapps.com/[].
|
||||||
All Users'' install location (`C:`) by default.
|
|
||||||
|
|
||||||
* Install the following applications in the PortableApps.com environment:
|
* Install the following applications in the PortableApps.com environment:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
++++++++++++++++++++++++++++++++++++++
|
++++++++++++++++++++++++++++++++++++++
|
||||||
<!-- WSDG Chapter Works -->
|
<!-- WSDG Chapter Works -->
|
||||||
++++++++++++++++++++++++++++++++++++++
|
++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
[[ChapterWorks]]
|
[[ChapterWorks]]
|
||||||
|
|
||||||
== How Wireshark Works
|
== How Wireshark Works
|
||||||
|
@ -29,10 +29,10 @@ the Qt UI in 'ui/qt'.
|
||||||
****
|
****
|
||||||
|
|
||||||
The function blocks in more detail:
|
The function blocks in more detail:
|
||||||
$$GTK+ 2$$:: Handling of all user input/output (all windows, dialogs and such).
|
$$GTK+ 2$$:: Handling of all user input/output (all windows, dialogs and such).
|
||||||
Source code can be found in the 'ui/gtk' directory.
|
Source code can be found in the 'ui/gtk' directory.
|
||||||
|
|
||||||
Core:: Main "glue code" that holds the other blocks together. Source
|
Core:: Main "glue code" that holds the other blocks together. Source
|
||||||
code can be found in the root directory.
|
code can be found in the root directory.
|
||||||
|
|
||||||
Epan:: Ethereal Packet ANalyzer -- the packet analyzing engine.
|
Epan:: Ethereal Packet ANalyzer -- the packet analyzing engine.
|
||||||
|
@ -41,13 +41,13 @@ the following APIs:
|
||||||
|
|
||||||
* Protocol Tree. Dissection information for an individual packet.
|
* Protocol Tree. Dissection information for an individual packet.
|
||||||
|
|
||||||
* Dissectors. The various protocol dissectors in
|
* Dissectors. The various protocol dissectors in
|
||||||
'epan/dissectors'.
|
'epan/dissectors'.
|
||||||
|
|
||||||
* Dissector Plugins - Support for implementing dissectors as separate modules.
|
* Dissector Plugins - Support for implementing dissectors as separate modules.
|
||||||
Source code can be found in 'plugins'.
|
Source code can be found in 'plugins'.
|
||||||
|
|
||||||
* Display Filters - The display filter engine at
|
* Display Filters - The display filter engine at
|
||||||
'epan/dfilter'.
|
'epan/dfilter'.
|
||||||
|
|
||||||
Wiretap:: The wiretap library is used to read and write capture files in libpcap,
|
Wiretap:: The wiretap library is used to read and write capture files in libpcap,
|
||||||
|
@ -71,8 +71,8 @@ capture filter syntaxes.
|
||||||
|
|
||||||
=== Capturing packets
|
=== Capturing packets
|
||||||
|
|
||||||
Capturing takes packets from a network adapter and saves them to a file
|
Capturing takes packets from a network adapter and saves them to a file
|
||||||
on your hard disk.
|
on your hard disk.
|
||||||
|
|
||||||
Since raw network adapter access requires elevated privileges these functions
|
Since raw network adapter access requires elevated privileges these functions
|
||||||
are isolated into the `dumpcap` program. It's only this program that needs these
|
are isolated into the `dumpcap` program. It's only this program that needs these
|
||||||
|
@ -94,7 +94,7 @@ In addition to this, as one of its strengths, Wireshark can read and write files
|
||||||
in many different file formats of other network capturing tools. The wiretap
|
in many different file formats of other network capturing tools. The wiretap
|
||||||
library, developed together with Wireshark, provides a general purpose interface
|
library, developed together with Wireshark, provides a general purpose interface
|
||||||
to read and write all the file formats. If you need to add support for another
|
to read and write all the file formats. If you need to add support for another
|
||||||
capture file format this is the place to start.
|
capture file format this is the place to start.
|
||||||
|
|
||||||
[[ChWorksDissectPackets]]
|
[[ChWorksDissectPackets]]
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ capture file format this is the place to start.
|
||||||
While Wireshark is loading packets from a file each packet is dissected.
|
While Wireshark is loading packets from a file each packet is dissected.
|
||||||
Wireshark tries to detect the packet type and gets as much information from the
|
Wireshark tries to detect the packet type and gets as much information from the
|
||||||
packet as possible. In this run though, only the information shown in the packet
|
packet as possible. In this run though, only the information shown in the packet
|
||||||
list pane is needed.
|
list pane is needed.
|
||||||
|
|
||||||
As the user selects a specific packet in the packet list pane this packet will
|
As the user selects a specific packet in the packet list pane this packet will
|
||||||
be dissected again. This time, Wireshark tries to get every single piece of
|
be dissected again. This time, Wireshark tries to get every single piece of
|
||||||
|
@ -112,4 +112,4 @@ information and put it into the packet details pane.
|
||||||
++++++++++++++++++++++++++++++++++++++
|
++++++++++++++++++++++++++++++++++++++
|
||||||
<!-- End of WSDG Chapter Works -->
|
<!-- End of WSDG Chapter Works -->
|
||||||
++++++++++++++++++++++++++++++++++++++
|
++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue