• Home
Name Date Size #Lines LOC

..--

README.NetBSD.mdD04-Jul-2025693 2315

README.aix.mdD04-Jul-2025364 1811

README.haiku.mdD04-Jul-2025844 3425

README.solaris.mdD04-Jul-20251.1 KiB4735

README.windows.mdD04-Jul-20257.4 KiB230160

README.NetBSD.md

1# Compiling tcpdump on NetBSD
2
3NetBSD has two libpcap libraries: one that is always installed as a part of the
4OS and another that can be installed as a package from pkgsrc.  Also the usual
5method of compiling with the upstream libpcap in `../libpcap` is available.
6
7GCC, Clang, Autoconf and CMake are presumed to work, if this is not the case,
8please report a bug as explained in the
9[guidelines for contributing](../CONTRIBUTING.md).
10
11## NetBSD 9.3
12
13* Upstream libpcap works.
14* OS libpcap works.
15* pkgsrc libpcap works.
16
17## NetBSD 9.2, 9.1 and 9.0
18
19* Upstream libpcap works.
20* OS libpcap cannot be used due to
21  [this bug](https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=55901).
22
23

README.aix.md

1# Compiling tcpdump on AIX
2
3* Autoconf works everywhere.
4
5## AIX 7.1/POWER7
6
7* Only local libpcap is suitable.
8* CMake 3.16.0 does not work.
9* GCC 8.3.0 and XL C 12.1.0.0 work.
10* System m4 does not work, GNU m4 1.4.17 works.
11
12## AIX 7.2/POWER8
13
14* Only local libpcap is suitable.
15* GCC 7.2.0 and XL C 13.1.3.6 work.
16* System m4 does not work, GNU m4 1.4.17 works.
17
18

README.haiku.md

1# Compiling tcpdump on Haiku
2
3## 64-bit x86 R1/beta4
4
5* Both system and local libpcap are suitable.
6* Autoconf 2.71 works.
7* CMake 3.24.2 works.
8* GCC 11.2.0 works.
9* Clang 12.0.1 works with the latest llvm12_clang-12.0.1-5 version.
10
11The following command will install respective non-default packages:
12```
13pkgman install libpcap_devel cmake llvm12_clang
14```
15
16For reference, the tests were done using a system installed from
17`haiku-r1beta4-x86_64-anyboot.iso`.
18
19## 32-bit x86 R1/beta4
20
21* Both system and local libpcap are suitable.
22* Autoconf 2.71 works.
23* CMake 3.24.2 works.
24* GCC 11.2.0 works.
25* Clang does not work.
26
27The following command will install respective non-default packages:
28```
29pkgman install libpcap_x86_devel cmake_x86
30```
31
32For reference, the tests were done using a system installed from
33`haiku-r1beta4-x86_gcc2h-anyboot.iso`.
34

README.solaris.md

1# Compiling tcpdump on Solaris and related OSes
2
3* Autoconf works everywhere.
4
5## OmniOS r151042/AMD64
6
7* Both system and local libpcap are suitable.
8* CMake 3.23.1 works.
9* GCC 11.2.0 and Clang 14.0.3 work.
10
11## OpenIndiana 2021.04/AMD64
12
13* Both system and local libpcap are suitable.
14* CMake 3.21.1 works.
15* GCC 7.5.0 and GCC 10.3.0 work, Clang 9.0.1 works.
16
17For reference, the tests were done using a system installed from
18`OI-hipster-text-20210430.iso` plus the following packages:
19```shell
20xargs -L1 pkg install <<ENDOFTEXT
21developer/build/autoconf
22developer/build/cmake
23developer/gcc-10
24developer/clang-90
25ENDOFTEXT
26```
27
28## Oracle Solaris 11.4.42/AMD64
29
30* Both system and local libpcap are suitable.
31* GCC 11.2 and Clang 11.0 work.
32
33For reference, the tests were done on a VM booted from `sol-11_4-vbox.ova`
34and updated to 11.4.42.111.0 plus the following packages:
35```shell
36xargs -L1 pkg install <<ENDOFTEXT
37developer/build/autoconf
38developer/gcc
39developer/llvm/clang
40ENDOFTEXT
41```
42
43## Solaris 9
44
45This version of this OS is not supported because the snprintf(3) implementation
46in its libc is not suitable.
47

README.windows.md

1Building tcpdump on Windows with Visual Studio
2==============================================
3
4Unlike the UN*Xes on which libpcap can capture network traffic, Windows
5has no network traffic capture mechanism that libpcap can use.
6Therefore, libpcap requires a driver, and a library to access the
7driver, provided by the Npcap or WinPcap projects.
8
9Those projects include versions of libpcap built to use that driver and
10library; these instructions are for people who want to build libpcap
11source releases, or libpcap from the Git repository, as a replacement
12for the version provided with Npcap or WinPcap.
13
14Npcap and WinPcap SDK
15---------------------
16
17In order to build tcpdump, you will need to download Npcap and its
18software development kit (SDK) or WinPcap and its software development
19kit.
20
21Npcap is currently being developed and maintained, and offers many
22additional capabilities that WinPcap does not.
23
24WinPcap is no longer being developed or maintained; it should be used
25only if there is some other requirement to use it rather than Npcap,
26such as a requirement to support versions of Windows earlier than
27Windows Vista, which is the earliest version supported by Npcap.
28
29Npcap and its SDK can be downloaded from its [home page](https://npcap.com).
30The SDK is a ZIP archive; create a folder on your `C:` drive, e.g.
31`C:\npcap-sdk`, and put the contents of the ZIP archive into that folder.
32
33The WinPcap installer can be downloaded from
34[here](https://www.winpcap.org/install/default.htm)
35and the WinPcap Developer's Kit can be downloaded from
36[here](https://www.winpcap.org/devel.htm).
37
38Required build tools
39--------------------
40
41The Developer's Kit is a ZIP archive; it contains a folder named
42`WpdPack`, which you should place on your `C:` drive, e.g. `C:\WpdPack`.
43
44Building tcpdump on Windows requires Visual Studio 2015 or later.  The
45Community Edition of Visual Studio can be downloaded at no cost from
46[here](https://visualstudio.microsoft.com).
47
48Additional tools are also required.  Chocolatey is a package manager for
49Windows with which those tools, and other tools, can be installed; it
50can be downloaded from [here](https://chocolatey.org).
51
52It is a command-line tool; a GUI tool, Chocolatey GUI, is provided as a
53Chocolatey package, which can be installed from the command line:
54
55```
56choco install chocolateygui
57```
58
59For convenience, the `choco install` command can be run with the `-y`
60flag, forcing it to automatically answer all questions asked of the user
61with "yes":
62
63```
64choco install -y chocolateygui
65```
66
67The required tools are:
68
69### CMake ###
70
71libpcap does not provide supported project files for Visual Studio
72(there are currently unsupported project files provided, but we do not
73guarantee that they will work or that we will continue to provide them).
74It does provide files for CMake, which is a cross-platform tool that
75runs on UN\*Xes and on Windows and that can generate project files for
76UN\*X Make, the Ninja build system, and Visual Studio, among other build
77systems.
78
79Visual Studio 2015 does not provide CMake; an installer can be
80downloaded from [here](https://cmake.org/download/).
81
82When you run the installer, you should choose to add CMake to the system
83`PATH` for all users and to create the desktop icon.
84
85CMake can also be installed as the Chocolatey package `cmake`:
86
87```
88choco install -y cmake
89```
90
91Visual Studio 2017 and later provide CMake, so you will not need to
92install CMake if you have installed Visual Studio 2017 or later.  They
93include built-in support for CMake-based projects as described
94[here](https://devblogs.microsoft.com/cppblog/cmake-support-in-visual-studio/).
95
96For Visual Studio 2017, make sure "Visual C++ tools for CMake" is
97installed; for Visual Studio 2019, make sure "C++ CMake tools for
98Windows" is installed.
99
100Git
101---
102
103An optional tool, required only if you will be building from a Git
104repository rather than from a release source tarball, is Git.  Git is
105provided as an optional installation component, "Git for Windows", with
106Visual Studio 2017 and later.
107
108Building from the Visual Studio GUI
109-----------------------------------
110
111### Visual Studio 2017 ###
112
113Open the folder containing the libpcap source with Open > Folder.
114Visual Studio will run CMake; however, you will need to indicate where
115the Npcap or WinPcap SDK is installed.
116
117To do this, go to Project > "Change CMake Settings" > tcpdump and:
118
119Choose which configuration type to build, if you don't want the default
120Debug build.
121
122In the CMakeSettings.json tab, change cmakeCommandArgs to include
123
124```
125-DPCAP_ROOT={path-to-sdk}
126```
127
128where `{path-to-sdk}` is the path of the directory containing the Npcap or
129WinPcap SDK.  Note that backslashes in the path must be specified as two
130backslashes.
131
132Save the configuration changes with File > "Save CMakeSettings.json" or
133with Control-S.
134
135Visual Studio will then re-run CMake.  If that completes without errors,
136you can build with CMake > "Build All".
137
138### Visual Studio 2019 ###
139
140Open the folder containing the libpcap source with Open > Folder.
141Visual Studio will run CMake; however, you will need to indicate where
142the Npcap or WinPcap SDK is installed.
143
144To do this, go to Project > "CMake Settings for tcpdump" and:
145
146Choose which configuration type to build, if you don't want the default
147Debug build.
148
149Scroll down to "Cmake variables and cache", scroll through the list
150looking for the entry for PCAP_ROOT, and either type in the path of
151the directory containing the Npcap or WinPcap SDK or use the "Browse..."
152button to browse for that directory.
153
154Save the configuration changes with File > "Save CMakeSettings.json" or
155with Control-S.
156
157Visual Studio will then re-run CMake.  If that completes without errors,
158you can build with Build > "Build All".
159
160Building from the command line
161------------------------------
162
163### Visual Studio 2017 ###
164
165Start the appropriate Native Tools command line prompt.
166
167Change to the directory into which you want to build tcpdump, possibly
168after creating it first.  One choice is to create it as a subdirectory
169of the tcpdump source directory.
170
171Run the command
172
173```
174cmake "-DPCAP_ROOT={path-to-sdk}" -G {generator} {path-to-tcpdump-source}
175```
176
177`{path-to-sdk}` is the path of the directory containing the Npcap or
178WinPcap SDK.
179
180`{generator}` is the string "Visual Studio 15 2017" to build a 32-bit
181version of tcpdump or the string "Visual Studio 15 2017 Win64" to build
182a 64-bit version of tcpdump.
183
184`{path-to-tcpdump-source}` is the pathname of the top-level source
185directory for tcpdump.
186
187Run the command
188
189```
190msbuild /m /nologo /p:Configuration={configuration} tcpdump.sln
191```
192
193where `{configuration}` can be "Release", "Debug", or "RelWithDebInfo".
194
195### Visual Studio 2019 ###
196
197Start the appropriate Native Tools command line prompt.
198
199Change to the directory into which you want to build tcpdump, possibly
200after creating it first.  One choice is to create it as a subdirectory
201of the tcpdump source directory.
202
203Run the command
204
205```
206cmake "-DPCAP_ROOT={path-to-sdk}" -G "Visual Studio 16 2019" {platform} {path-to-tcpdump-source}
207```
208
209`{path-to-sdk}` is the path of the directory containing the Npcap or
210WinPcap SDK.
211
212`{platform}` is `-A Win32` to build a 32-bit version of tcpdump or `-A
213x64` to build a 64-bit version of tcpdump.
214
215`{path-to-tcpdump-source}` is the pathname of the top-level source
216directory for tcpdump.
217
218Run the command
219
220```
221msbuild /m /nologo /p:Configuration={configuration} tcpdump.sln
222```
223
224where `{configuration}` can be "Release", "Debug", or "RelWithDebInfo".
225
226Building with MinGW
227-------------------
228
229(XXX - this should be added)
230