Introduction to Wireshark

The Wireshark package contains a network protocol analyzer, also known as a “sniffer”. This is useful for analyzing data captured “off the wire” from a live network connection, or data read from a capture file.

Wireshark provides both a graphical and a TTY-mode front-end for examining captured network packets from over 500 protocols, as well as the capability to read capture files from many other popular network analyzers.

This package is known to build and work properly using an LFS-7.8 platform.

Package Information

Additional Downloads

Wireshark dependencies





GnuTLS-3.4.7, libgcrypt-1.6.4, libnl-3.2.26, Lua-5.3.1, MIT Kerberos V5-1.14, OpenSSL-1.0.2d, SBC-1.3, adns, c-ares, libsmi, GeoIP, and PortAudio (for GTK+ RTP player)

Optional (for GUI front-ends)

GTK+-2.24.28, or Qt-4.8.7,



The GTK+ GUI needs one of GTK+-2.24.28 or GTK+-3.18.5. If both are installed, GTK+3 is used by default.

The Qt GUI needs one of Qt-4.8.7 or Qt-5.5.1. If both are installed, Qt5 is used by default.

Both GTK+ and Qt GUI front-ends are built, as recommended by the upstream developers. If you want to override the defaults, some configure switches have to be set (see “Command Explanations”).

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/wireshark

Kernel Configuration

The kernel must have the Packet protocol enabled for Wireshark to capture live packets from the network:

[*] Networking support --->          [CONFIG_NET]
      Networking options --->
        <*/M> Packet socket          [CONFIG_PACKET]

If built as a module, the name is af_packet.ko.

Installation of Wireshark

Wireshark is a very large and complex application. These instructions provide additional security measures to ensure that only trusted users are allowed to view network traffic. First, set up a system group for wireshark. As the root user:

groupadd -g 62 wireshark

Continue to install Wireshark by running the following commands:

patch -Np1 -i ../wireshark-2.0.0-lua_5_3_1-1.patch  &&

./configure --prefix=/usr --sysconfdir=/etc &&


This package does not come with a test suite.

Now, as the root user:

make install &&

install -v -m755 -d /usr/share/doc/wireshark-2.0.0 &&
install -v -m644    README{,.linux} doc/README.* doc/*.{pod,txt} \
                    /usr/share/doc/wireshark-2.0.0 &&

pushd /usr/share/doc/wireshark-2.0.0 &&
   for FILENAME in ../../wireshark/*.html; do
      ln -s -v -f $FILENAME .
   done &&

If you downloaded any of the documentation files from the page listed in the 'Additional Downloads', install them by issuing the following commands as the root user:

install -v -m644 <Downloaded_Files> \

Now, set ownership and permissions of sensitive applications to only allow authorized users. As the root user:

chown -v root:wireshark /usr/bin/{tshark,dumpcap} &&
chmod -v 6550 /usr/bin/{tshark,dumpcap}

Finally, add any users to the wireshark group (as root user):

usermod -a -G wireshark <username>

If you are installing wireshark for the first time, it will be necessary to leave the session and login again, thus you will now have wireshark between your groups, otherwise, it will not run properly.

Command Explanations

--with-gtk2=[yes/no]: For the Gtk+2 GUI. If both Gtk+2 and 3 are installed, default is no. Notice that the GUI for only one Gtk+ version (either 2 or 3) can be built.

--with-gtk3=[yes/no]: For the Gtk+3 GUI. If both Gtk+2 and 3 are installed, default is yes.

--with-qt=[yes/no/4/5]: For the Qt GUI. Default is yes. If both Qt4 and 5 are installed, Qt5 is chosen by default. Notice that the GUI for only one Qt version (either 4 or 5) can be built.

--disable-wireshark: Use this switch if you have GTK+ installed but do not want to build any of the GUIs.

Configuring Wireshark

Config Files

/etc/wireshark.conf and ~/.config/wireshark/* (unless there is already ~/.wireshark/* in the system)

Configuration Information

Though the default configuration parameters are very sane, reference the configuration section of the Wireshark User's Guide for configuration information. Most of Wireshark's configuration can be accomplished using the menu options of the wireshark graphical interfaces.



If you want to look at packets, make sure you don't filter them out with Iptables-1.4.21. If you want to exclude certain classes of packets, it is more efficient to do it with iptables than it is with Wireshark.


Installed Programs: androiddump, capinfos, captype, dftest, dumpcap, editcap, idl2wrs, mergecap, randpkt, rawshark, reordercap, text2pcap, tshark, wireshark, and wireshark-gtk
Installed Libraries: libwireshark.so, libwiretap.so, libwsutil.so, and numerous modules under /usr/lib/wireshark/plugins
Installed Directories: /usr/{lib,share}/wireshark and /usr/share/doc/wireshark-2.0.0

Short Descriptions


reads a saved capture file and returns any or all of several statistics about that file. It is able to detect and read any capture supported by the Wireshark package.


prints the file types of capture files.


is a display-filter-compiler test program.


is a network traffic dump tool. It lets you capture packet data from a live network and write the packets to a file.


edits and/or translates the format of capture files. It knows how to read libpcap capture files, including those of tcpdump, Wireshark and other tools that write captures in that format.


combines multiple saved capture files into a single output file.


creates random-packet capture files.


dump and analyze raw libpcap data.


reorder timestamps of input file frames into output file.


reads in an ASCII hex dump and writes the data described into a libpcap-style capture file.


is a TTY-mode network protocol analyzer. It lets you capture packet data from a live network or read packets from a previously saved capture file.


is the Qt GUI network protocol analyzer. It lets you interactively browse packet data from a live network or from a previously saved capture file.


is the Gtk+ GUI network protocol analyzer. It lets you interactively browse packet data from a live network or from a previously saved capture file.


contains functions used by the Wireshark programs to perform filtering and packet capturing.


is a library being developed as a future replacement for libpcap, the current standard Unix library for packet capturing. For more information, see the README file in the source wiretap directory.

Last updated on 2015-11-19 16:57:25 -0600