AsciiDoc: Create an include file for attributes.
[metze/wireshark/wip.git] / docbook / wsdg_src / WSDG_chapter_libraries.asciidoc
1 ++++++++++++++++++++++++++++++++++++++
2 <!-- WSDG Chapter Libraries -->
3 ++++++++++++++++++++++++++++++++++++++
4
5 [[ChapterLibraries]]
6
7 == Library Reference
8
9 [[ChLibIntro]]
10
11 === Introduction
12
13 Several libraries are needed to build and run Wireshark. Most of them
14 are split into three packages:
15
16 . 'Runtime'. System and third party libraries such as 'MSVCR110.dll' and 'libglib-2.0-0.dll'.
17
18 . 'Developer'. Documentation, header files, import libraries, and other files needed for compilation.
19
20 . 'Source'. Library sources, which are usually not required to
21 build Wireshark.
22
23 [TIP]
24 .Our libraries are freely available
25 ====
26 All libraries required to build Wireshark on Windows are available for download at
27 https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[] and
28 https://anonsvn.wireshark.org/wireshark-win64-libs/trunk/packages/[].
29 See <<ChLibsSetup>> for an easier way to install them.
30 ====
31
32 [[ChLibsFormat]]
33
34 === Binary library formats
35
36 Binary libraries are available in different formats, depending on the C
37 compiler used to build it and of course the platform they were built for.
38
39
40 [[ChLibsFormatUnix]]
41
42
43 ==== Unix
44
45 If you have installed unix binary libraries on your system, they will
46 match the C compiler. If not already installed, the libraries should be
47 available as a package from the platform installer, or you can download
48 and compile the source and then install the binaries.
49
50
51 [[ChLibsFormatWin32]]
52
53
54 ==== Win32: MSVC
55
56 Most of the Win32 binary libraries you will find on the web are in this
57 format. You will recognize MSVC libraries by the .lib/.dll file extension.
58
59
60 [[ChLibsFormatWin32Cygwin]]
61
62
63 ==== Win32: cygwin gcc
64
65 Cygwin provides most of the required libraries (with file extension .a or .lib)
66 for Wireshark suitable for cygwin's gcc compiler.
67
68
69 [[ChLibsSetup]]
70
71
72 === Win32: Automated library download
73
74 The required libraries (apart from Qt) are automatically downloaded as part of
75 the CMake generation step, and subsequently as required when libraries are updated.
76
77 The libraries are downloaded into the directory indicated by the environment
78 variable WIRESHARK_BASE_DIR, this must be set appropriately for your environment.
79 The libraries are downloaded and extracted into WIRESHARK_BASE_DIR\wireshark-win32-libs
80 and WIRESHARK_BASE_DIR\wireshark-win64-libs for 32 and 64 bit builds respectively.
81
82 You may also directly set the library directory with the environment variable
83 WIRESHARK_LIB_DIR, but if you switch between 32 bit and 64 bit builds, the value of this
84 must be set appropriately.
85
86 [[ChLibsQt]]
87
88 === Qt
89
90 The Qt library is used to build the UI for Wireshark and is used to provide a
91 platform independent UI. Wireshark can be built with Qt 4.7.0 or later, but we
92 recommend using Qt5.
93
94 For more information on the Qt libraries, see <<ChUIQt>>.
95
96 [[ChLibsUnixQt]]
97
98 ==== Unix
99
100 Most Linux distributions provide Qt and its development libraries as standard packages.
101 The required libraries and tools will likely be split across several packages. For example,
102 building on Ubuntu requires 'qttools5-dev', 'qttools5-dev-tools', 'libqt5svg5-dev,
103 'qtmultimedia5-dev', and possibly others.
104
105 The Qt Project provides an installation tool for macOS, similar to Windows.
106 It is available at https://www.qt.io/download-open-source/#section-2[].
107
108 [[ChLibsWin32Qt]]
109
110 ==== Win32 MSVC
111
112 Qt5 must be installed manually, from the Qt installers page
113 https://www.qt.io/download-open-source/#section-2[], using the version of Qt
114 appropriate for your compiler.  Note that separate installations (into different directories) of Qt
115 are required for 32 bit and 64 bit builds.  The environment variable QT5_BASE_DIR should be
116 set as appropriate for your environment and should point to the Qt directory that contains the
117 bin directory, e.g. C:\Qt\Qt5.6.2\5.6\msvc2013
118
119 [[ChLibsGtk]]
120
121 === GTK+ / GLib / GDK / Pango / ATK / GNU gettext / GNU libiconv
122
123 The Glib library is used as a basic platform abstraction library, it's
124 not related to graphical user interface (GUI) things. For a detailed
125 description about GLib, see <<ChCodeGLib>>.
126
127 The GTK and its dependent libraries are used to build the older, deprecated, Wireshark GUI.
128 For a detailed description of the GTK libraries, see <<ChUIGTK>>.
129
130 All other libraries are dependent on the two libraries mentioned above,
131 you will typically not come in touch with these while doing Wireshark
132 development.
133
134 As the requirements for the GLib/GTK libraries have increased in the past,
135 the required additional libraries depend on the GLib/GTK versions you have.
136 The 2.x versions require all mentioned libs.
137
138 [[ChLibsUnixGTK]]
139
140 ==== Unix
141
142 The GLib/GTK+ libraries are available for many unix-like platforms and
143 Cygwin.
144
145 If these libraries aren't already installed and also aren't available as a
146 package for your platform, you can get them at
147 http://www.gtk.org/download.html[].
148
149 [[ChLibsWin32GTK]]
150
151 ==== Win32 MSVC
152
153 You can get the latest version at http://www.gtk.org/download.html[].
154
155 [[ChLibsSMI]]
156
157 === SMI (optional)
158
159 LibSMI is used for MIB and PIB parsing and for OID resolution.
160
161 [[ChLibsUnixSMI]]
162
163 ==== Unix
164
165 If this library isn't already installed or available as a
166 package for your platform, you can get it at
167 http://www.ibr.cs.tu-bs.de/projects/libsmi/[].
168
169 [[ChLibsWin32SMI]]
170
171 ==== Win32 MSVC
172
173 Wireshark uses the source libSMI distribution at
174 http://www.ibr.cs.tu-bs.de/projects/libsmi/[].
175 LibSMI is cross-compiled using MinGW32. It's stored in the libsmi zip archive at
176 https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[].
177
178 [[ChLibsCares]]
179
180 === c-ares (optional)
181
182 C-Ares is used for asynchronous DNS resolution. This is the primary name
183 resolution library in Wireshark.
184
185 [[ChLibsUnixCares]]
186
187 ==== Unix
188
189 If this library isn't already installed or available as a package for your
190 platform, you can get it at http://c-ares.haxx.se/[].
191
192 [[ChLibsWin32Cares]]
193
194 ==== Win32 MSVC
195
196 C-Ares is cross-compiled using MinGW32 and is available at
197 https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[].
198
199 [[ChLibsZlib]]
200
201 === zlib (optional)
202
203 [quote, The zlib web site, http://www.zlib.net/]
204 ____
205 zlib is designed to be a
206 http://www.gzip.org/zlib/zlib_license.html[free],
207 general-purpose, legally unencumbered -- that is, not covered by any
208 patents -- lossless data-compression library for use on virtually any computer
209 hardware and operating system.
210 ____
211
212 [[ChLibsUnixZlib]]
213
214 ==== Unix
215
216 This library is almost certain to be installed on your system. If it isn't or
217 you don't want to use the default library you can download it from
218 http://www.zlib.net/[].
219
220 [[ChLibsWin32Zlib]]
221
222 ==== Win32 MSVC
223
224 The zlib sources are downloaded from
225 https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[] and compiled
226 locally.
227
228 [[ChLibsPcap]]
229
230 === libpcap/WinPcap (optional)
231
232 Libpcap and WinPcap provide that packet capture capabilities that are central
233 to Wireshark's core functionality.
234
235 [[ChLibsLibpcap]]
236
237 ==== Unix: libpcap
238
239 If this library isn't already installed or available as a package for your
240 platform, you can get it at {tcpdump-main-url}.
241
242 [[ChLibsWinpPcap]]
243
244 ==== Win32 MSVC: WinPcap
245
246 You can get the "Windows packet capture library" at:
247 https://www.winpcap.org/install/[]
248
249 [[ChLibsGNUTLS]]
250
251 === GnuTLS (optional)
252
253 The GNU Transport Layer Security Library is used to dissect SSL and TLS
254 protocols (aka: HTTPS).
255
256 [[ChLibsUnixGNUTLS]]
257
258 ==== Unix
259
260 If this library isn't already installed or available as a
261 package for your platform, you can get it at
262 https://www.gnu.org/software/gnutls/download.html[].
263
264 [[ChLibsWin32GNUTLS]]
265
266 ==== Win32 MSVC
267
268 We provide a package cross-compiled using MinGW32 at
269 https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[].
270
271 [[ChLibsGcrypt]]
272
273 === Gcrypt (optional)
274
275 The Gcrypt Library is a low-level encryption library that provides
276 support for many ciphers, such as DES, 3DES, AES, Blowfish, and others..
277
278 [[ChLibsUnixGcrypt]]
279
280 ==== Unix
281
282 If this library isn't already installed or available as a
283 package for your platform, you can get it at
284 https://directory.fsf.org/wiki/Libgcrypt[].
285
286 [[ChLibsWin32Gcrypt]]
287
288 ==== Win32 MSVC
289
290 Part of our GnuTLS package.
291
292 [[ChLibsKerberos]]
293
294 === Kerberos (optional)
295
296 The Kerberos library is used to dissect Kerberos, sealed DCERPC and
297 secureLDAP protocols.
298
299 [[ChLibsUnixKerberos]]
300
301 ==== Unix
302
303 If this library isn't already installed or available as a
304 package for your platform, you can get it at
305 http://web.mit.edu/Kerberos/dist/[].
306
307 [[ChLibsWin32Kerberos]]
308
309 ==== Win32 MSVC
310
311 We provide a package at
312 https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[].
313
314 [[ChLibsLua]]
315
316 === LUA (optional)
317
318 The LUA library is used to add scripting support to Wireshark.
319
320 [[ChLibsUnixLua]]
321
322 ==== Unix
323
324 If this library isn't already installed or available as a
325 package for your platform, you can get it at
326 http://www.lua.org/download.html[].
327
328 [[ChLibsWin32Lua]]
329
330 ==== Win32 MSVC
331
332 We provide a copy of the official package at
333 https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[].
334
335 [[ChLibsPortAudio]]
336
337 === PortAudio (optional)
338
339 The PortAudio library enables audio output for RTP streams.
340
341 [[ChLibsUnixPortAudio]]
342
343 ==== Unix
344
345 If this library isn't already installed or available as a
346 package for your platform, you can get it at
347 http://www.portaudio.com/download.html[].
348
349 [[ChLibsWin32PortAudio]]
350
351 ==== Win32 MSVC
352
353 The PortAudio sources are downloaded from
354 https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[] and compiled
355 locally.
356
357 [[ChLibsGeoIP]]
358
359 === GeoIP (optional)
360
361 MaxMind Inc. publishes a GeoIP database for use in open source software.
362 It can be used to map IP addresses to geographical locations.
363
364 [[ChLibsUnixGeoIP]]
365
366 ==== Unix
367
368 If this library isn't already installed or available as a
369 package for your platform, you can get it at
370 http://www.maxmind.com/app/c[].
371
372 [[ChLibsWin32GeoIP]]
373
374 ==== Win32 MSVC
375
376 We provide a package cross-compiled using MinGW32 at
377 https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[].
378
379 [[ChLibsWinSparkle]]
380
381 === WinSparkle (optional)
382
383 WinSparkle is an easy-to-use software update library for Windows developers.
384
385 [[ChLibsWin32WinSparkle]]
386
387 ==== Win32 MSVC
388
389 We provide a copy of the WinSparkle package at
390 https://anonsvn.wireshark.org/wireshark-win32-libs/trunk/packages/[].
391
392 ++++++++++++++++++++++++++++++++++++++
393 <!-- End of WSDG Chapter Libraries -->
394 ++++++++++++++++++++++++++++++++++++++