Because of the need to test an HTTP protocol in Linux, use the Wireshark grab software--tcpdump under Linux. The specific installation process is as follows:
1. Download online for Libpcap and tcpdump
http://www.tcpdump.org/
2. Installation of C-compiler required package: Apt-get Install Build-essential
3. Pre-installation of Libpcap: Apt-get install flex,apt-get Install Bison
4. Install Libpcap.
The use of tcpdump must have this library.
Tar XVFZ libpcap-1.2.1.tar.gz/Decompression
Run into the file directory after decompression./configure//Generate Makefile File
Make//Compile
Make install//installation library files are installed by default in the directory/usr/lib, and header files are installed by default in/usr/include
3. Install Tcpdump
Tar XVFZ tcpdump.4.2.1.tar.gz/Decompression
Run into the file directory after decompression./configure//Generate Makefile File
Make//Compile
Make install//installation library files are installed by default in the directory/usr/lib, and header files are installed by default in/usr/include
Test for successful Installation: command line input tcpdump has network information displayed.
Problems that you may encounter:
1. #tcpdump
#tcpdump: no suitable device found
Reason: Network monitoring requires root permission, switch to root user can be used normally