Docbook: Use cyg-get for download Packages
[metze/wireshark/wip.git] / docbook / wsdg_src / WSDG_chapter_env_intro.asciidoc
1 ++++++++++++++++++++++++++++++++++++++
2 <!-- WSDG Chapter Introduction -->
3 ++++++++++++++++++++++++++++++++++++++
4
5 [[ChapterIntroduction]]
6
7 == Introduction
8
9 [[ChIntroIntro]]
10
11 === Introduction
12
13 This chapter will provide you with information about Wireshark
14 development in general.
15
16 [[ChIntroWhatIs]]
17
18 === What is Wireshark?
19
20 Well, if you want to start Wireshark development, you might already
21 know what Wireshark is doing. If not, please have a look at the
22 wireshark-users-guide-url:[][Wireshark User's Guide],
23 which will provide a lot of general information about it.
24
25 [[ChIntroPlatforms]]
26
27 === Supported Platforms
28
29 Wireshark currently runs on most UNIX platforms and various Windows
30 platforms. It requires Qt, GLib, libpcap and some other libraries in
31 order to run.
32
33 As Wireshark is developed in a platform independent way and uses libraries (such
34 as the Qt GUI library) which are available for many different platforms,
35 it's thus available on a wide variety of platforms.
36
37 If a binary package is not available for your platform, you should
38 download the source and try to build it. Please report your experiences
39 to mailto:wireshark-dev-list-email:[][wireshark-dev-list-email:[]].
40
41 Binary packages are available for the following platforms along with many
42 others:
43
44 ==== Unix
45
46 * Apple OS X
47
48 * FreeBSD
49
50 * HP-UX
51
52 * IBM AIX
53
54 * NetBSD
55
56 * OpenBSD
57
58 * Oracle Solaris
59
60 ==== Linux
61
62 * Debian GNU/Linux
63
64 * Ubuntu
65
66 * Gentoo Linux
67
68 * IBM S/390 Linux (Red Hat)
69
70 * Mandrake Linux
71
72 * PLD Linux
73
74 * Red Hat Linux
75
76 * Rock Linux
77
78 * Slackware Linux
79
80 * Suse Linux
81
82 ==== Microsoft Windows
83
84 Wireshark supports Windows natively via the
85 https://en.wikipedia.org/wiki/Windows_API[Windows API]. Note that in
86 this documentation and elsewhere we tend to use the terms
87 ``Win32'', ``Win'', and ``Windows'' interchangeably to refer to the
88 Windows API. Wireshark runs on and can be compiled on the following
89 platforms:
90
91 * Windows 10 / Windows Server 2016
92
93 * Windows 8.1 / Windows Server 2012 R2
94
95 * Windows 8 / Windows Server 2012
96
97 * Windows 7 / Windows Server 2008 R2
98
99 * Windows Vista / Windows Server 2008
100
101 Development on Windows XP, Server 2003, and older versions may be possible but
102 is not supported.
103
104 [[ChIntroDevelopment]]
105
106 ===  Development and maintenance of Wireshark
107
108 Wireshark was initially developed by Gerald Combs. Ongoing development
109 and maintenance of Wireshark is handled by the Wireshark core developers,
110 a loose group of individuals who fix bugs and provide new functionality.
111
112 There have also been a large number of people who have contributed protocol
113 dissectors and other improvements to Wireshark, and it is expected that this
114 will continue. You can find a list of the people who have contributed code to
115 Wireshark by checking the About dialog box of Wireshark, or have a look at the
116 wireshark-authors-url:[] page on the Wireshark web site.
117
118 The communication between the developers is usually done through the developer
119 mailing list, which can be joined by anyone interested in the development
120 activities. At the time this document was written, more than 500 persons were
121 subscribed to this mailing list!
122
123 It is strongly recommended to join the developer mailing list, if you are going
124 to do any Wireshark development. See <<ChIntroMailingLists>> about the different
125 Wireshark mailing lists available.
126
127 ==== Programming languages used
128
129 Most of Wireshark is implemented in plain ANSI C. A notable exception is
130 the code in 'ui/qt', which is written in $$C++$$.
131
132 The typical task for a new Wireshark developer is to extend an existing,
133 or write a new dissector for a specific network protocol. As (almost) any
134 dissector is written in plain old ANSI C, a good knowledge about ANSI C
135 will be sufficient for Wireshark development in almost any case.
136
137 So unless you are going to change the build process of Wireshark
138 itself, you won't come in touch with any other programming language than
139 ANSI C (such as Perl or Python, which are used only in the Wireshark build
140 process).
141
142 Beside the usual tools for developing a program in C (compiler, make, ...),
143 the build process uses some additional helper tools (Perl, Python, Sed,
144 ...), which are needed for the build process when Wireshark
145 is to be build and installed from the released source packages. If Wireshark
146 is installed from a binary package, none of these helper tools are needed on
147 the target system.
148
149 ==== Open Source Software
150
151 Wireshark is an open source software (OSS) project, and is released under
152 the gpl-url:[][GNU General Public License] (GPL).
153 You can freely use Wireshark on any number of computers you like, without
154 worrying about license keys or fees or such. In addition, all source
155 code is freely available under the GPL. Because of that, it is very easy
156 for people to add new protocols to Wireshark, either as plugins, or built
157 into the source, and they often do!
158
159 You are welcome to modify Wireshark to suit your own needs, and it would be
160 appreciated if you contribute your improvements back to the Wireshark community.
161
162
163 You gain three benefits by contributing your improvements back to the
164 community:
165
166 * Other people who find your contributions useful will appreciate them, and you
167   will know that you have helped people in the same way that the developers of
168   Wireshark have helped you and other people.
169
170 * The developers of Wireshark might improve your changes even more, as there's
171   always room for improvement. Or they may implement some advanced things on top
172   of your code, which can be useful for yourself too.
173
174 * The maintainers and developers of Wireshark will maintain your code as well,
175   fixing it when API changes or other changes are made, and generally keeping it
176   in tune with what is happening with Wireshark. So if Wireshark is updated
177   (which is done often), you can get a new Wireshark version from the website
178   and your changes will already be included without any effort for you.
179
180
181 The Wireshark source code and binary packages for some platforms are all
182 available on the download page of the Wireshark website:
183 wireshark-download-page:[].
184
185
186 [[ChIntroReleases]]
187
188 === Releases and distributions
189
190 The officially released files can be found at: wireshark-download-page:[]. A new
191 Wireshark version is released after significant changes compared to the last
192 release are completed or a serious security issue is encountered. The typical
193 release schedule is about every 4-8 weeks (although this may vary).
194 There are two kinds of distributions: binary and source; both have their
195 advantages and disadvantages.
196
197 [[ChIntroReleaseBinary]]
198
199 ==== Binary distributions
200
201 Binary distributions are usually easy to install (as simply starting
202 the appropriate file is usually the only thing to do). They are available
203 for the following systems:
204
205 * Windows (.exe file). The typical Windows end user is used to getting
206   a setup.exe file which will install all the required things for him.
207
208 * Win32 PAF (.paf.exe file). Another Windows end user method is to get a
209   portable application file which will install all the required things for him.
210
211 * Debian (.deb file). A user of a Debian Package Manager (DPKG) based system
212   obtains a .deb file from which the package manager checks the dependencies and
213   installs the software.
214
215 * Red Hat (.rpm file). A user of a RPM Package Manager (RPM) based system
216   obtains an .rpm file from which the package manager checks the dependencies
217   and installs the software.
218
219 * OS X (.dmg file). The typical OS X end user is used to getting a .dmg file
220   which will install all the required things for him.
221
222 * Solaris. A Solaris user obtains a file from which the package manager (PKG)
223   checks the dependencies and installs the software.
224
225 However, if you want to start developing with Wireshark, the binary
226 distributions won't be too helpful, as you need the source files, of
227 course.
228
229 For details about how to build these binary distributions yourself,
230 e.g. if you need a distribution for a special audience, see
231 <<ChSrcBinary>>.
232
233 [[ChIntroReleaseSource]]
234
235 ==== Source code distributions
236
237 It's still common for UNIX developers to give the end user a source
238 tarball and let the user compile it on their target machine (configure,
239 make, make install). However, for different UNIX (Linux) distributions
240 it's becoming more common to release binary packages (e.g. .deb or .rpm
241 files) these days.
242
243 You should use the released sources if you want to build Wireshark from
244 source on your platform for productive use. However, if you going to
245 develop changes to the Wireshark sources, it might be better to use the
246 latest GIT sources. For details about the different ways to get the
247 Wireshark source code see <<ChSrcObtain>>.
248
249 Before building Wireshark from a source distribution, make sure you have
250 all the tools and libraries required to build. The following chapters will
251 describe the required tools and libraries in detail.
252
253 [[ChIntroAutomated]]
254
255 === Automated Builds (Buildbot)
256
257 The Wireshark Buildbot automatically rebuilds Wireshark on every
258 change of the source code repository and indicates problematic changes.
259 This frees the developers from repeating (and annoying) work, so time can
260 be spent on more interesting tasks.
261
262 ==== Advantages
263
264 * Recognizing (cross platform) build problems - early. Compilation problems can
265   be narrowed down to a few commits, making a fix much easier.
266
267 * "Health status" overview of the sources. A quick look at:
268   https://buildbot.wireshark.org/wireshark-master/[] gives a good "feeling" if the sources
269   are currently "well". On the other hand, if all is "red", an update of a
270   personal source tree might better be done later ...
271
272 * "Up to date" binary packages are available. After a change was committed to
273   the repository, a binary package / installer is usually available within a few
274   hours at: https://www.wireshark.org/download/automated/[]. This can be quite
275   helpful, e.g. a bug reporter can easily verify a bugfix by installing a recent
276   build.
277
278 * Automated regression tests. In particular, the fuzz tests often indicate "real
279   life" problems that are otherwise hard to find.
280
281 ==== What does the Buildbot do?
282
283 The Buildbot will do the following (to a different degree on the different
284 platforms):
285
286 * Check out from the source repository
287
288 * Build
289
290 * Create binary packages and installers
291
292 * Create source packages and run distribution checks
293
294 * Run regression tests
295
296 Each step is represented at the status page by a rectangle, green if it
297 succeeded or red if it failed. Most steps provide a link to the corresponding
298 console logfile, to get additional information.
299
300 The Buildbot runs on a platform collection that represents the different
301 "platform specialties" quite well:
302
303 * Windows 8.1 x86 (Win32, little endian, Visual Studio 2013)
304
305 * Windows 7 x86-64 (Win64, little endian, Visual Studio 2013)
306
307 * Ubuntu x86-64 (Linux, little endian, gcc, Clang)
308
309 * Solaris SPARC (Solaris, big endian, gcc)
310
311 * OS X x86 (BSD, little endian, Clang)
312
313 * OS X x86-64 (BSD, little endian, Clang)
314
315 and two buildslaves that run static code analysis to help spot coding issues:
316
317 * Visual Studio Code Analysis (Win64, little endian, VS 2013)
318
319 * Clang Code Analysis (Linux, little endian, Clang)
320
321 Each platform is represented at the status page by a single column, the
322 most recent entries are at the top.
323
324 [[ChIntroHelp]]
325
326
327 === Reporting problems and getting help
328
329 If you have problems, or need help with Wireshark, there are several
330 places that may be of interest to you (well, beside this guide of
331 course).
332
333 [[ChIntroHomepage]]
334
335 ==== Website
336
337 You will find lots of useful information on the Wireshark homepage at
338 wireshark-web-site:[].
339
340 [[ChIntroWiki]]
341
342 ==== Wiki
343
344 The Wireshark Wiki at wireshark-wiki-site:[] provides a wide range
345 of information related to Wireshark and packet capturing in general.
346 You will find a lot of information not part of this developer's guide. For
347 example, there is an explanation how to capture on a switched network,
348 an ongoing effort to build a protocol reference and a lot more.
349
350 And best of all, if you would like to contribute your knowledge on a
351 specific topic (maybe a network protocol you know well), you can edit the
352 Wiki pages by simply using your webbrowser.
353
354 [[ChIntroFAQ]]
355
356
357 ==== FAQ
358
359 The "Frequently Asked Questions" will list often asked questions and
360 the corresponding answers.
361
362 Before sending any mail to the mailing lists below, be sure to read the
363 FAQ, as it will often answer any questions you might have. This will save
364 yourself and others a lot of time. Keep in mind that a lot of people are
365 subscribed to the mailing lists.
366
367 You will find the FAQ inside Wireshark by clicking the menu item
368 Help/Contents and selecting the FAQ page in the upcoming dialog.
369
370 An online version is available at the Wireshark website: wireshark-faq-url:[].
371 You might prefer this online version as it's typically more up to date and the
372 HTML format is easier to use.
373
374 [[ChIntroOtherSources]]
375
376 ==== Other sources
377
378 If you don't find the information you need inside this book, there are
379 various other sources of information:
380
381 * The file 'doc/README.developer' and all the other README.xxx files in the
382   source code. These are various documentation files on different topics
383
384 [NOTE]
385 .Read the README
386 ====
387 'README.developer' is packed full with all kinds of details relevant
388 to the developer of Wireshark source code. Its companion file
389 'README.dissector' advises you around common
390 pitfalls, shows you basic layout of dissector code, shows details of the
391 APIs available to the dissector developer, etc.
392 ====
393
394 * The Wireshark source code
395
396 * Tool documentation of the various tools used
397 (e.g. manpages of sed, gcc, etc.)
398
399 * The different mailing lists. See <<ChIntroMailingLists>>
400
401 [[ChIntroMailingLists]]
402
403 ==== Mailing Lists
404
405 There are several mailing lists available on specific Wireshark topics:
406
407 wireshark-announce:: This mailing list will inform you about new program
408 releases, which usually appear about every 4-8 weeks.
409
410 wireshark-users:: This list is for users of Wireshark. People post
411 questions about building and using Wireshark, others (hopefully)
412 provide answers.
413
414 wireshark-dev:: This list is for Wireshark developers. People post questions about
415 the development of Wireshark, others (hopefully) provide answers.
416 If you want to start developing a protocol dissector, join this list.
417
418 wireshark-bugs:: This list is for Wireshark developers. Every time a change to the bug
419 database occurs, a mail to this mailing list is generated.
420 If you want to be notified about all the changes to the bug
421 database, join this list. Details about the bug database can be
422 found in <<ChIntroBugDatabase>>.
423
424 wireshark-commits:: This list is for Wireshark developers. Every time a change to the GIT
425 repository is checked in, a mail to this mailing list is generated.
426 If you want to be notified about all the changes to the GIT
427 repository, join this list. Details about the GIT repository can be
428 found in <<ChSrcGitRepository>>.
429
430 You can subscribe to each of these lists from the Wireshark web site:
431 wireshark-mailing-lists-url:[]. From there, you can choose which mailing list you
432 want to subscribe to by clicking on the Subscribe/Unsubscribe/Options button
433 under the title of the relevant list. The links to the archives are included on
434 that page as well.
435
436 [TIP]
437 .The archives are searchable
438 ====
439 You can search in the list archives to see if someone previously asked the same
440 question and maybe already got an answer. That way you don't have to wait until
441 someone answers your question.
442 ====
443
444 [[ChIntroBugDatabase]]
445
446 ==== Bug database (Bugzilla)
447
448 The Wireshark community collects bug reports in a Bugzilla database at
449 wireshark-bugs-site:[]. This database is filled with manually filed bug reports,
450 usually after some discussion on wireshark-dev, and automatic bug reports from
451 the Buildbot tools.
452
453 [[ChIntroQA]]
454
455 ==== Q&amp;A Site
456
457 The Wireshark Q and A site at wireshark-qa-url:[] offers a resource where
458 questions and answers come together. You have the option to search what
459 questions were asked before and what answers were given by people who knew about
460 the issue. Answers are graded, so you can pick out the best ones easily. If your
461 issue isn't discussed before you can post one yourself.
462
463 [[ChIntroReportProblems]]
464
465 ==== Reporting Problems
466
467 [NOTE]
468 .Test with the latest version
469 ====
470 Before reporting any problems, please make sure you have installed the
471 latest version of Wireshark. Reports on older maintenance releases are
472 usually met with an upgrade request.
473 ====
474
475 If you report problems, provide as much information as possible. In general,
476 just think about what you would need to find that problem, if someone else sends
477 you such a problem report. Also keep in mind that people compile/run Wireshark
478 on a lot of different platforms.
479
480 When reporting problems with Wireshark, it is helpful if you supply the
481 following information:
482
483 . The version number of Wireshark and the dependent libraries linked with
484 it, e.g. Qt, GTK+, etc. You can obtain this with the command
485 `wireshark -v`.
486
487 . Information about the platform you run Wireshark on.
488
489 . A detailed description of your problem.
490
491 . If you get an error/warning message, copy the text of that message (and
492 also a few lines before and after it, if there are some), so others may
493 find the build step where things go wrong.
494 Please don't give something like: "I get a warning when compiling x"
495 as this won't give any direction to look at.
496
497 [NOTE]
498 .Don't send large files
499 ====
500 Do not send large files (&gt;100KB) to the mailing lists, just place a note
501 that further data is available on request. Large files will only annoy a
502 lot of people on the list who are not interested in your specific problem.
503 If required, you will be asked for further data by the persons who really
504 can help you.
505 ====
506
507 [WARNING]
508 .Don't send confidential information
509 ====
510 If you send captured data to the mailing lists, or add it to your bug report,
511 be sure it doesn't contain any sensitive or confidential information,
512 such as passwords.  Visibility of such files can be limited to certain
513 groups in the Bugzilla database though.
514 ====
515
516 ==== Reporting Crashes on UNIX/Linux platforms
517
518 When reporting crashes with Wireshark, it is helpful if you supply the
519 traceback information (besides the information mentioned in
520 <<ChIntroReportProblems>>).
521
522 You can obtain this traceback information with the following commands:
523
524 ----
525 $ gdb `whereis wireshark | cut -f2 -d: | cut -d' ' -f2` core >& bt.txt
526 backtrace
527 ^D
528 $
529 ----
530
531 [NOTE]
532 .Using GDB
533 ====
534 Type the characters in the first line verbatim. Those are
535 back-tics there.
536
537 `backtrace` is a `gdb` command. You should
538 enter it verbatim after the first line shown above, but it will not be
539 echoed. The ^D
540 (Control-D, that is, press the Control key and the D key
541 together) will cause `gdb` to exit. This will
542 leave you with a file called
543 'bt.txt' in the current directory.
544 Include the file with your bug report.
545
546 If you do not have `gdb` available, you
547 will have to check out your operating system's debugger.
548 ====
549
550 You should mail the traceback to the
551 mailto:wireshark-dev-list-email:[][wireshark-dev mailing list], or attach it to your bug report.
552
553 ==== Reporting Crashes on Windows platforms
554
555 You can download Windows debugging symbol files (.pdb) from the following locations:
556
557 * 32-bit Windows: https://www.wireshark.org/download/win32/all-versions/
558
559 * 64-bit Windows: https://www.wireshark.org/download/win64/all-versions/
560
561 Files are named "Wireshark-pdb-win__bits__-_x_._y_._z_.zip" to match their
562 corresponding "Wireshark-win__bits__-_x_._y_._z_.exe" installer packages.
563
564 // XXX Show how to use the Visual Studio debugger
565
566 ++++++++++++++++++++++++++++++++++++++
567 <!-- End of WSDG Chapter Introduction -->
568 ++++++++++++++++++++++++++++++++++++++