source: networking/netutils/wireshark.xml@ dd44d9e1

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 dd44d9e1 was 80d6d7d5, checked in by Bruce Dubbs <bdubbs@…>, 9 years ago

Finish tagging networking and pst sections

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

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