source: networking/netutils/wireshark.xml@ 28370fe

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 28370fe was 6d772cc, checked in by Fernando de Oliveira <fernando@…>, 9 years ago
  • Update to wireshark-1.12.7.
  • Update to mpg123-1.22.4.
  • more short descriptions.
  • sddm-0.11.0: reformat.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@16344 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 21.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY wireshark-download-http "https://www.wireshark.org/download/src/all-versions/wireshark-&wireshark-version;.tar.bz2">
8 <!ENTITY wireshark-download-ftp "ftp://ftp.uni-kl.de/pub/wireshark/src/wireshark-&wireshark-version;.tar.bz2">
9 <!ENTITY wireshark-md5sum "c8ae53f648b1dcbf6e74495401a0f1ab">
10 <!ENTITY wireshark-size "28 MB">
11 <!ENTITY wireshark-buildsize "1.6 GB, with the Qt GUI">
12 <!ENTITY wireshark-time "6.2 SBU, with the Qt GUI">
13]>
14
15<sect1 id="wireshark" xreflabel="Wireshark-&wireshark-version;">
16 <?dbhtml filename="wireshark.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Wireshark-&wireshark-version;</title>
24
25 <indexterm zone="wireshark">
26 <primary sortas="a-Wireshark">Wireshark</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Wireshark</title>
31
32 <para>
33 The <application>Wireshark</application> package contains a network
34 protocol analyzer, also known as a <quote>sniffer</quote>. This is useful
35 for analyzing data captured <quote>off the wire</quote> from a live
36 network connection, or data read from a capture file.
37 </para>
38
39 <para>
40 <application>Wireshark</application> provides both a graphical and a
41 TTY-mode front-end for examining captured network packets from over 500
42 protocols, as well as the capability to read capture files from many
43 other popular network analyzers.
44 </para>
45
46 &lfs77_checked; &gcc5_checked;
47
48 <bridgehead renderas="sect3">Package Information</bridgehead>
49 <itemizedlist spacing="compact">
50 <listitem>
51 <para>Download (HTTP): <ulink url="&wireshark-download-http;"/></para>
52 </listitem>
53 <listitem>
54 <para>Download (FTP): <ulink url="&wireshark-download-ftp;"/></para>
55 </listitem>
56 <listitem>
57 <para>Download MD5 sum: &wireshark-md5sum;</para>
58 </listitem>
59 <listitem>
60 <para>Download size: &wireshark-size;</para>
61 </listitem>
62 <listitem>
63 <para>Estimated disk space required: &wireshark-buildsize;</para>
64 </listitem>
65 <listitem>
66 <para>Estimated build time: &wireshark-time;</para>
67 </listitem>
68 </itemizedlist>
69
70 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
71 <itemizedlist spacing="compact">
72 <listitem>
73 <para>
74 Optional patch:
75 <ulink url=
76 "&patch-root;/wireshark-&wireshark-version;-lua_5_3_0-1.patch"/>
77 (allows building the LUA bindings if <xref linkend="lua"/> is
78 installed and LUA is not disabled by passing <option>--without-lua
79 </option> to <command>configure</command>)
80 </para>
81 </listitem>
82 <listitem>
83 <para>
84 Additional Documentation:
85 <ulink url="https://www.wireshark.org/download/docs/"/>
86 (contains links to several different docs in a variety of formats)
87 </para>
88 </listitem>
89 </itemizedlist>
90
91 <bridgehead renderas="sect3">Wireshark dependencies</bridgehead>
92
93 <bridgehead renderas="sect4">Required</bridgehead>
94 <para role="required">
95 <xref linkend="glib2"/>
96 </para>
97
98 <bridgehead renderas="sect4">Recommended</bridgehead>
99 <para role="recommended">
100 <xref linkend="gtk3"/> (to build the <application>Gtk+3</application>
101 GUI) and
102 <xref linkend="libpcap"/> (required to capture data)
103 </para>
104
105 <bridgehead renderas="sect4">Optional</bridgehead>
106 <para role="optional">
107 <xref linkend="gnutls"/>,
108 <xref linkend="libgcrypt"/>,
109 <xref linkend="lua"/>,
110 <xref linkend="mitkrb"/>,
111 <xref linkend="openssl"/>,
112 <ulink url="http://www.gnu.org/software/adns/adns.html">adns</ulink>,
113 <ulink url="http://www.maxmind.com/app/c">GeoIP</ulink>, and
114 <ulink url="http://www.portaudio.com/download.html">PortAudio</ulink>
115 </para>
116
117 <bridgehead renderas="sect4">Optional (to build more GUI front-ends)
118 </bridgehead>
119 <para role="optional">
120 <xref linkend="gtk2"/>,
121 <xref linkend="qt4"/>, or
122 <xref linkend="qt5"/>
123 </para>
124
125 <note>
126 <para>
127 The <application>GTK+</application> GUI needs one of <xref linkend=
128 "gtk2"/> or <xref linkend="gtk3"/>. If both are installed, GTK+3
129 is used by default.
130 </para>
131
132 <para>
133 The <application>Qt</application> GUI needs one of <xref linkend=
134 "qt4"/> or <xref linkend="qt5"/>. If both are installed, Qt5
135 is used by default.
136 </para>
137
138 <para>
139 Both GTK+ and Qt GUI can be built at the same time. If you want to
140 override the defaults, some configure switches have to be set
141 (see <quote>Command Explanations</quote>) or some special instructions
142 have to be issued (see below) when both Qt4 and Qt5 are installed and
143 you want to use Qt4. SBU and disk space required are larger for the
144 Qt GUI. The instructions below suppose you only want to build the
145 GTK+3 GUI.
146 </para>
147 </note>
148
149 <para condition="html" role="usernotes">
150 User Notes: <ulink url="&blfs-wiki;/wireshark"/>
151 </para>
152
153 </sect2>
154
155 <sect2 role="kernel" id="wireshark-kernel">
156 <title>Kernel Configuration</title>
157
158 <para>
159 The kernel must have the Packet protocol enabled for <application>
160 Wireshark</application> to capture live packets from the network:
161 </para>
162
163<screen><literal>[*] Networking support ---&gt; [CONFIG_NET]
164 Networking options ---&gt;
165 &lt;*/M&gt; Packet socket [CONFIG_PACKET]</literal></screen>
166
167 <para>
168 If built as a module, the name is <filename>af_packet.ko</filename>.
169 </para>
170
171 <indexterm zone="wireshark wireshark-kernel">
172 <primary sortas="d-Capturing-network-packets">
173 Capturing network packets
174 </primary>
175 </indexterm>
176
177 </sect2>
178
179 <sect2 role="installation">
180 <title>Installation of Wireshark</title>
181
182 <para>
183 Optionally, fix the description of the program in the title.
184 The first change overwrites the default <quote>SVN Unknown</quote> in
185 the title and the second overwrites a utility script that resets the
186 version to <quote>unknown</quote>.
187 </para>
188
189<screen><userinput>cat > svnversion.h &lt;&lt; "EOF" &amp;&amp;
190#define SVNVERSION "BLFS"
191#define SVNPATH "source"
192EOF
193
194cat > make-version.pl &lt;&lt; "EOF"
195<literal>#!/usr/bin/perl</literal>
196EOF</userinput></screen>
197
198 <para>
199 <application>Wireshark</application> is a very large and complex
200 application. These instructions provide additional security measures to
201 ensure that only trusted users are allowed to view network traffic. First,
202 set up a system group for wireshark. As the <systemitem
203 class="username">root</systemitem> user:
204 </para>
205
206<screen role="root"><userinput>groupadd -g 62 wireshark</userinput></screen>
207
208 <para>
209 If you want to build the Qt GUI (see <quote>Command Explanations</quote>),
210 for the <application>Qt5</application> GUI, issue:
211 </para>
212
213<screen><userinput>source setqt5 &amp;&amp;
214
215sed -e 's/"-fPIE"/""/' \
216 -e 's/"-pie"/""/' \
217 -i configure</userinput></screen>
218
219 <para>
220 and add <envar>CXXFLAGS="-fPIC"</envar> to the configure line, or, for the <application>Qt4</application> GUI, issue:
221 </para>
222
223<screen><userinput>source setqt4 &amp;&amp;
224sed -i 's/Qt5 Qt/Qt/' configure</userinput></screen>
225
226 <para>
227 Continue to install <application>Wireshark</application> by running
228 the following commands:
229 </para>
230
231<screen><userinput>patch -Np1 -i ../wireshark-&wireshark-version;-lua_5_3_0-1.patch &amp;&amp;
232
233./configure --prefix=/usr \
234 --with-gtk3 \
235 --without-qt \
236 --sysconfdir=/etc &amp;&amp;
237make</userinput></screen>
238
239 <para>
240 This package does not come with a test suite.
241 </para>
242
243 <para>
244 Now, as the <systemitem class="username">root</systemitem> user:
245 </para>
246
247<screen role="root"><userinput>make install &amp;&amp;
248
249install -v -m755 -d /usr/share/doc/wireshark-&wireshark-version; &amp;&amp;
250install -v -m755 -d /usr/share/pixmaps/wireshark &amp;&amp;
251
252install -v -m644 README{,.linux} doc/README.* doc/*.{pod,txt} \
253 /usr/share/doc/wireshark-&wireshark-version; &amp;&amp;
254
255pushd /usr/share/doc/wireshark-&wireshark-version; &amp;&amp;
256 for FILENAME in ../../wireshark/*.html; do
257 ln -s -v -f $FILENAME .
258 done &amp;&amp;
259popd &amp;&amp;
260unset FILENAME
261
262install -v -m644 -D wireshark.desktop \
263 /usr/share/applications/wireshark.desktop &amp;&amp;
264
265install -v -m644 -D image/wsicon48.png \
266 /usr/share/pixmaps/wireshark.png &amp;&amp;
267
268install -v -m644 image/*.{png,ico,xpm,bmp} \
269 /usr/share/pixmaps/wireshark</userinput></screen>
270
271 <para>
272 If you downloaded any of the documentation files from the page
273 listed in the 'Additional Downloads', install them by issuing the
274 following commands as the <systemitem class="username">root</systemitem>
275 user:
276 </para>
277
278<screen role="root"><userinput>install -v -m644 <replaceable>&lt;Downloaded_Files&gt;</replaceable> \
279 /usr/share/doc/wireshark-&wireshark-version;</userinput></screen>
280
281 <para>
282 Now, set ownership and permissions of sensitive applications to only
283 allow authorized users. As the <systemitem class="username">root
284 </systemitem> user:
285 </para>
286
287<screen role="root"><userinput>chown -v root:wireshark /usr/bin/{tshark,dumpcap} &amp;&amp;
288chmod -v 6550 /usr/bin/{tshark,dumpcap}</userinput></screen>
289
290 <para>
291 Finally, add any users to the wireshark group (as <systemitem class=
292 "username">root</systemitem> user):
293 </para>
294
295<screen role="root"><userinput>usermod -a -G wireshark &lt;username&gt;</userinput></screen>
296
297 </sect2>
298
299 <sect2 role="commands">
300 <title>Command Explanations</title>
301
302 <para>
303 <command>sed -e 's/"-fPIE"/""/' ... configure</command>: This command is
304 required for Qt-5.5, because it is necessary to compile with
305 <envar>CXXFLAGS="-fPIC"</envar>.
306 </para>
307
308 <para>
309 <command>sed -i 's/Qt5 Qt/Qt/' ...</command>: This command is required
310 because, without it, libraries and includes from
311 <application>Qt5</application> are found and used first, if both versions
312 are installed, when trying to build with <application>Qt4</application>,
313 and <command>make</command> does not complete.
314 </para>
315
316 <para>
317 <parameter>--with-gtk3</parameter>: By default, the build machinery
318 will build a GUI for both Qt and GTK+, if those libraries are found.
319 If Qt is installed and you do not want the GUI for it to be built,
320 you need to pass <parameter>--without-qt</parameter> to the configure
321 script. That overrides the default, so that you must specify
322 <parameter>--with-gtk3</parameter> or <parameter>--with-gtk2</parameter>
323 in order to have the GTK+ GUI built.
324 </para>
325
326 <para>
327 <parameter>--without-qt</parameter>: disables building of the Qt GUI.
328 </para>
329
330 <para>
331 <option>--disable-wireshark</option>: Use this switch if you
332 have <application>GTK+</application> installed but do not want to build
333 any of the GUIs.
334 </para>
335
336 <para>
337 <option>--with-gtk2</option>: Use this option if you want
338 the <application>GTK+2</application> GUI.
339 Notice that the GUI for only one GTK+ version (either 2 or 3) can be
340 built.
341 </para>
342
343 </sect2>
344
345 <sect2 role="configuration">
346 <title>Configuring Wireshark</title>
347
348 <sect3 id="wireshark-config">
349 <title>Config Files</title>
350
351 <para><filename>/etc/wireshark.conf</filename> and
352 <filename>~/.wireshark/*</filename></para>
353
354 <indexterm zone="wireshark wireshark-config">
355 <primary sortas="e-AA.wireshark-star">~/.wireshark/*</primary>
356 </indexterm>
357
358 <indexterm zone="wireshark wireshark-config">
359 <primary sortas="e-etc-wireshark.conf">/etc/wireshark.conf</primary>
360 </indexterm>
361
362 </sect3>
363
364 <sect3>
365 <title>Configuration Information</title>
366
367 <para>Though the default configuration parameters are very sane,
368 reference the configuration section of the
369 <ulink url="http://www.wireshark.org/docs/wsug_html/">Wireshark User's
370 Guide</ulink> for configuration information. Most of
371 <application>Wireshark</application>'s configuration can be accomplished
372 using the menu options of the <command>wireshark</command>
373 graphical interfaces.</para>
374
375 </sect3>
376
377 <sect3>
378 <title>Desktop file for the Qt GUI</title>
379
380 <para>If Qt GUI was built and you wish an entry in the desktop menu,
381 there are two possibilities (instructions must be run as root).</para>
382
383 <para>If only the Qt GUI was built:</para>
384
385<screen role="root"><userinput>mv -v /usr/share/applications/wireshark.desktop \
386 /usr/share/applications/wireshark-qt.desktop</userinput></screen>
387
388 <para>If both, GTK+ and Qt GUIs were built:</para>
389
390<screen role="root"><userinput>cp -v /usr/share/applications/wireshark.desktop \
391 /usr/share/applications/wireshark-qt.desktop</userinput></screen>
392
393 <para>Now, fix it for <command>wireshark-qt</command>:</para>
394
395<screen role="root"><userinput>sed -e 's/ireshark/&amp;-qt/' \
396 -e 's/^\(Icon=wireshark\)-qt/\1/' \
397 -i /usr/share/applications/wireshark-qt.desktop</userinput></screen>
398
399 <note>
400 <para>If you want to look at packets, make sure you don't filter
401 them out with <xref linkend="iptables"/>. If you want to exclude
402 certain classes of packets, it is more efficient to do it with
403 <application>iptables</application> than it is with
404 <application>Wireshark</application>.</para>
405 </note>
406
407 </sect3>
408
409 </sect2>
410
411 <sect2 role="content">
412 <title>Contents</title>
413
414 <segmentedlist>
415 <segtitle>Installed Programs</segtitle>
416 <segtitle>Installed Libraries</segtitle>
417 <segtitle>Installed Directories</segtitle>
418
419 <seglistitem>
420 <seg>capinfos, captype, dftest, dumpcap, editcap, mergecap, randpkt,
421 rawshark, reordercap, text2pcap, tshark,
422 wireshark, and optionally wireshark-qt</seg>
423 <seg>libfiletap.so, libwireshark.so, libwiretap.so, libwsutil.so, and
424 numerous modules under /usr/lib/wireshark/plugins</seg>
425 <seg>/usr/lib/wireshark, /usr/share/doc/wireshark-&wireshark-version;,
426 /usr/share/pixmaps/wireshark, and /usr/share/wireshark</seg>
427 </seglistitem>
428 </segmentedlist>
429
430 <variablelist>
431 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
432 <?dbfo list-presentation="list"?>
433 <?dbhtml list-presentation="table"?>
434
435 <varlistentry id="capinfos">
436 <term><command>capinfos</command></term>
437 <listitem>
438 <para>reads a saved capture file and returns any or all of several
439 statistics about that file. It is able to detect and read any capture
440 supported by the <application>Wireshark</application> package.</para>
441 <indexterm zone="wireshark capinfos">
442 <primary sortas="b-capinfos">capinfos</primary>
443 </indexterm>
444 </listitem>
445 </varlistentry>
446
447 <varlistentry id="captype">
448 <term><command>captype</command></term>
449 <listitem>
450 <para>prints the file types of capture files.</para>
451 <indexterm zone="wireshark captype">
452 <primary sortas="b-captype">captype</primary>
453 </indexterm>
454 </listitem>
455 </varlistentry>
456
457 <varlistentry id="dftest">
458 <term><command>dftest</command></term>
459 <listitem>
460 <para>is a display-filter-compiler test program.</para>
461 <indexterm zone="wireshark dftest">
462 <primary sortas="b-dftest">dftest</primary>
463 </indexterm>
464 </listitem>
465 </varlistentry>
466
467 <varlistentry id="dumpcap">
468 <term><command>dumpcap</command></term>
469 <listitem>
470 <para>is a network traffic dump tool. It lets you capture packet data
471 from a live network and write the packets to a file.</para>
472 <indexterm zone="wireshark dumpcap">
473 <primary sortas="b-dumpcap">dumpcap</primary>
474 </indexterm>
475 </listitem>
476 </varlistentry>
477
478 <varlistentry id="editcap">
479 <term><command>editcap</command></term>
480 <listitem>
481 <para>edits and/or translates the format of capture files. It knows
482 how to read <application>libpcap</application> capture files,
483 including those of <command>tcpdump</command>,
484 <application>Wireshark</application> and other tools that write
485 captures in that format.</para>
486 <indexterm zone="wireshark editcap">
487 <primary sortas="b-editcap">editcap</primary>
488 </indexterm>
489 </listitem>
490 </varlistentry>
491
492 <varlistentry id="mergecap">
493 <term><command>mergecap</command></term>
494 <listitem>
495 <para>combines multiple saved capture files into a single output
496 file.</para>
497 <indexterm zone="wireshark mergecap">
498 <primary sortas="b-mergecap">mergecap</primary>
499 </indexterm>
500 </listitem>
501 </varlistentry>
502
503 <varlistentry id="randpkt">
504 <term><command>randpkt</command></term>
505 <listitem>
506 <para>creates random-packet capture files.</para>
507 <indexterm zone="wireshark randpkt">
508 <primary sortas="b-randpkt">randpkt</primary>
509 </indexterm>
510 </listitem>
511 </varlistentry>
512
513 <varlistentry id="rawshark">
514 <term><command>rawshark</command></term>
515 <listitem>
516 <para>dump and analyze raw libpcap data.</para>
517 <indexterm zone="wireshark rawshark">
518 <primary sortas="b-rawshark">rawshark</primary>
519 </indexterm>
520 </listitem>
521 </varlistentry>
522
523 <varlistentry id="reordercap">
524 <term><command>reordercap</command></term>
525 <listitem>
526 <para>reorder timestamps of input file frames into output file.</para>
527 <indexterm zone="wireshark reordercap">
528 <primary sortas="b-reordercap">reordercap</primary>
529 </indexterm>
530 </listitem>
531 </varlistentry>
532
533 <varlistentry id="text2pcap">
534 <term><command>text2pcap</command></term>
535 <listitem>
536 <para>reads in an ASCII hex dump and writes the
537 data described into a <application>libpcap</application>-style
538 capture file.</para>
539 <indexterm zone="wireshark text2pcap">
540 <primary sortas="b-text2pcap">text2pcap</primary>
541 </indexterm>
542 </listitem>
543 </varlistentry>
544
545 <varlistentry id="tshark">
546 <term><command>tshark</command></term>
547 <listitem>
548 <para>is a TTY-mode network protocol analyzer. It lets you capture
549 packet data from a live network or read packets from a
550 previously saved capture file.</para>
551 <indexterm zone="wireshark tshark">
552 <primary sortas="b-tshark">tshark</primary>
553 </indexterm>
554 </listitem>
555 </varlistentry>
556
557 <varlistentry id="wireshark-prog">
558 <term><command>wireshark</command></term>
559 <listitem>
560 <para>is the GTK+ GUI network protocol analyzer. It lets you
561 interactively browse packet data from a live network or from a
562 previously saved capture file.</para>
563 <indexterm zone="wireshark wireshark-prog">
564 <primary sortas="b-wireshark">wireshark</primary>
565 </indexterm>
566 </listitem>
567 </varlistentry>
568
569 <varlistentry id="wireshark-qt-prog">
570 <term><command>wireshark-qt</command></term>
571 <listitem>
572 <para>is the Qt GUI network protocol analyzer. It lets you
573 interactively browse packet data from a live network or from a
574 previously saved capture file.</para>
575 <indexterm zone="wireshark wireshark-qt-prog">
576 <primary sortas="b-wireshark-qt">wireshark-qt</primary>
577 </indexterm>
578 </listitem>
579 </varlistentry>
580
581 <varlistentry id="libwireshark">
582 <term><filename class='libraryfile'>libwireshark.so</filename></term>
583 <listitem>
584 <para>contains functions used by the
585 <application>Wireshark</application> programs to perform filtering and
586 packet capturing.</para>
587 <indexterm zone="wireshark libwireshark">
588 <primary sortas="c-libwireshark">libwireshark.so</primary>
589 </indexterm>
590 </listitem>
591 </varlistentry>
592
593 <varlistentry id="libwiretap">
594 <term><filename class='libraryfile'>libwiretap.so</filename></term>
595 <listitem>
596 <para>is a library being developed as a future replacement for
597 <filename class='libraryfile'>libpcap</filename>, the current
598 standard Unix library for packet capturing. For more information,
599 see the <filename>README</filename> file in the source
600 <filename class='directory'>wiretap</filename> directory.</para>
601 <indexterm zone="wireshark libwiretap">
602 <primary sortas="c-libwiretap">libwiretap.so</primary>
603 </indexterm>
604 </listitem>
605 </varlistentry>
606
607 </variablelist>
608
609 </sect2>
610
611</sect1>
Note: See TracBrowser for help on using the repository browser.