Skip to content

Commit

Permalink
Some doc fixes and additions
Browse files Browse the repository at this point in the history
  • Loading branch information
seladb committed Feb 15, 2017
1 parent 42a5e67 commit 74c6b0f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 42 deletions.
59 changes: 22 additions & 37 deletions download.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ <h2>Package content</h2>
<p>The PcapPlusPlus package contains several libraries, unit-tests and example utilities:</p>
<ul>
<li><strong><i>Packet++</i></strong> - a library for parsing, creating and editing packets of various <a href="index.html#supoorted-protocols">supported protocols</a>. This library can be used stand-alone and doesn't depend on Pcap++, libpcap/WinPcap, etc.</li>
<li><strong><i>Pcap++</i></strong> - a library for packet interpception and sending, provides network and NIC info and stats, etc. This library is actually a C++ wrapper for packet capturing engines such as libPcap, WinPcap, DPDK and PF_RING</li>
<li><strong><i>Common++</i></strong> - a library containing common code utilities used both by Packet++ and Pcap++</li>
<li><strong><i>Pcap++</i></strong> - a library for intercepting and sending packets, providing network and NIC info, stats, etc. This library is actually a C++ wrapper for packet capturing engines such as libpcap, WinPcap, DPDK and PF_RING</li>
<li><strong><i>Common++</i></strong> - a library containing common code utilities used by both Packet++ and Pcap++</li>
<li><strong><i>Example applications:</i></strong> see <a href="examples.html">Examples</a> page</li>
<li><strong><i>Unit-tests:</i></strong>
<ul>
Expand All @@ -98,12 +98,12 @@ <h6><strong>Prerequisutes</strong></h6>
</ol>
<h6><strong>Configuration and compilation</strong></h6>
<ol>
<li>run the <strong>configure-windows-visual-studio.bat</strong> batch file from PcapPlusPlus main directory. The script will ask you for the locations of WinPcap developer's packet and pthreads-win32. The script will modify mk\vs2015\PcapPlusPlusPropertySheet.props file with these locations</li>
<li>run the <strong>configure-windows-visual-studio.bat</strong> batch file from PcapPlusPlus main directory. The script will ask you for the locations of WinPcap developer's pack and pthreads-win32. The script will modify mk\vs2015\PcapPlusPlusPropertySheet.props file with these locations</li>
<li>PcapPlusPlus contains 3 Visual Studio solutions:</li>
<ul>
<li><strong>mk\vs2015\PcapPlusPlus.sln</strong> - contains PcapPlusPlus libraries (Common++, Packet++ and Pcap++) and unit-tests projects</li>
<li><strong>mk\vs2015\PcapPlusPlus-Examples.sln</strong> - contains all PcapPlusPlus examples. Reuquires PcapPlusPlus.sln to be built</li>
<li><strong>mk\vs2015\ExampleProject\ExampleProject.sln</strong> - a fully configured project for working with PcapPlusPlus. You can use this project to write your own code using PcapPlusPlus. It already has all the include paths, libaray paths etc. configured and also an empty main() function. Just write your code and build. This solution is also relocatable so you can move it to wherever you want and it will still build successfully. Reuquires PcapPlusPlus.sln to be built</li>
<li><strong>Examples\ArpSpoofing-VS2015-Project\ArpSpoofing.sln</strong> - a fully configured project for working with PcapPlusPlus. You can use this project to write your own code using PcapPlusPlus. It already has all the include paths, libaray paths configured and also the ArpSpoofing utility code. You can build and run this code or delete it and write your own code. This solution is also relocatable so you can move it to wherever you want and it will still build successfully. Reuquires PcapPlusPlus.sln to be built</li>
</ul>
<li>All solutions support both 32-bit <strong>(x86)</strong> and 64-bit <strong>(x64)</strong> configurations as well as <strong>Debug</strong> and <strong>Release</strong> modes. So actually 4 modes are supported: x86|Debug, x86|Release, x64|Debug, x64|Release</li>
</ol>
Expand All @@ -119,7 +119,7 @@ <h6><strong>Prerequisutes</strong></h6>
<li>The fastest way I found for installing mingw32 was through this link: <a href="http://www.mingw.org/wiki/Getting_Started">http://www.mingw.org/wiki/Getting_Started</a></li>
<li>Download "mingw-get-setup.exe", run it and follow the instructions</li>
<li>By default the pthreads library is not installed so you need to ask to install it. It can be done during the installation process or afterwards with "mingw-get.exe" (MinGW installation manager)</li>
<li>In the MinGW installation manager search for all packages named "mingw32-pthreads-w32" and select them</li>
<li>In the MinGW installation manager search for all packages containing "pthreads" and mark them for installation</li>
<li>Choose Installation->Update Catalogue</li>
<li>If you prefer to install pthreads manually please follow these steps:
<ul>
Expand All @@ -135,7 +135,7 @@ <h6><strong>Prerequisutes</strong></h6>
<ul>
<li>Download and run mingw-w64 installer from here: <a href="https://sourceforge.net/projects/mingw-w64/">https://sourceforge.net/projects/mingw-w64/</a></li>
<li>Follow the instruction in the installation wizard. Make sure you choose POSIX threads and not win32 threads</li>
<li>Make sure you also install MSYS or MSYS2. MSYS2 installer can be downloaded from here: <a href="http://msys2.github.io/">http://msys2.github.io/</a></li>
<li>Also make sure you install MSYS or MSYS2. MSYS2 installer can be downloaded from here: <a href="http://msys2.github.io/">http://msys2.github.io/</a></li>
</ul>
</li>
</ul>
Expand All @@ -145,7 +145,7 @@ <h6><strong>Prerequisutes</strong></h6>
<h6><strong>Configuration and compilation</strong></h6>
<ol>
<li>Run the <strong>configure-windows-mingw.bat</strong> batch file from PcapPlusPlus main directory. The script will ask you for WinPcap developer's pack location and MinGW location</li>
<li>Run <strong>mingw32-make.exe</strong> all from PcapPlusPlus main directory</li>
<li>Run <strong>mingw32-make.exe all</strong> from PcapPlusPlus main directory</li>
<li>This should compile all libraries, unit-tests and examples</li>
<li>After compilation you can find the libraries, examples, header files and helpful makefiles under the <strong>Dist\</strong> directory</li>
</ol>
Expand All @@ -154,7 +154,7 @@ <h2>Compiling PcapPlusPlus - Linux</h2>
<h6><strong>Prerequisutes</strong></h6>
<p>In order to compile PcapPlusPlus on Linux you need the following components:</p>
<ol>
<li><strong>libpcap</strong> developers pack - containing the libpcap library PcapPlusPlus is linking with plus relevant header files. You can download it from <a href="http://www.tcpdump.org/#latest-release">http://www.tcpdump.org/#latest-release</a> or through package management engines such as apt-get/yum: <pre><code class="cpp">sudo apt-get install libpcap-dev</code></pre> or: <pre><code class="cpp">sudo yum install libpcap-devel</code></pre></li>
<li><strong>libpcap developers pack</strong> - containing the libpcap library PcapPlusPlus is linking with plus relevant header files. You can download it from <a href="http://www.tcpdump.org/#latest-release">http://www.tcpdump.org/#latest-release</a> or through package management engines such as apt-get/yum: <pre><code class="cpp">sudo apt-get install libpcap-dev</code></pre> or: <pre><code class="cpp">sudo yum install libpcap-devel</code></pre></li>
<li>Make sure you have the libstdc++-static package. If not, you can install it via <i>yum</i> or <i>apt-get</i></li>
</ol>
<h6><strong>Configuration and compilation</strong></h6>
Expand Down Expand Up @@ -185,19 +185,21 @@ <h6><strong>Configuration and compilation</strong></h6>
<h2>Simple testing</h2>
<p>To ensure configuration and compilation went smoothly, you can run the unit-test applications for both Packet++ and Pcap++:</p>
<pre>
<code class="cpp">seladb@seladb:~/home/PcapPlusPlus/Packet++Test$ Bin/Packet++Test
<code class="cpp">seladb@seladb:~/home/PcapPlusPlus/Tests/Packet++Test$ Bin/Packet++Test
EthPacketCreation : PASSED
EthAndArpPacketParsing : PASSED
ArpPacketCreation : PASSED
VlanParseAndCreation : PASSED
Ipv4PacketCreation : PASSED
Ipv4PacketParsing : PASSED
Ipv4FragmentationTest : PASSED
Ipv4UdpChecksum : PASSED
Ipv6UdpPacketParseAndCreate : PASSED
TcpPacketNoOptionsParsing : PASSED
TcpPacketWithOptionsParsing : PASSED
TcpPacketWithOptionsParsing2 : PASSED
TcpPacketCreation : PASSED
TcpPacketCreation2 : PASSED
InsertDataToPacket : PASSED
InsertVlanToPacket : PASSED
RemoveLayerTest : PASSED
Expand All @@ -212,54 +214,37 @@ <h2>Simple testing</h2>
PPPoEDiscoveryLayerParsingTest: PASSED
PPPoEDiscoveryLayerCreateTest : PASSED
DnsLayerParsingTest : PASSED
DnsLayerQueryCreationTest : PASSED
DnsLayerResourceCreationTest : PASSED
DnsLayerEditTest : PASSED
DnsLayerRemoveResourceTest : PASSED
MplsLayerTest : PASSED
CopyLayerAndPacketTest : PASSED
IcmpParsingTest : PASSED
IcmpCreationTest : PASSED
IcmpEditTest : PASSED
GreParsingTest : PASSED
GreCreationTest : PASSED
GreEditTest : PASSED
...
...
ALL TESTS PASSED!!</code>
</pre>
<pre>
<code class="cpp">seladb@seladb:~/PcapPlusPlus/Pcap++Test$ sudo Bin/Pcap++Test -i 10.0.0.1
<code class="cpp">seladb@seladb:~/PcapPlusPlus/Tests/Pcap++Test$ sudo Bin/Pcap++Test -i 10.0.0.1
Using ip: 10.0.0.1
Debug mode: off
Starting tests...
TestIPAddress : PASSED
TestMacAddress : PASSED
TestPcapFileReadWrite : PASSED
TestPcapSllFileReadWrite : PASSED
TestPcapFileAppend : PASSED
TestPcapNgFileReadWrite : PASSED
TestPcapNgFileReadWriteAdv : PASSED
TestPcapLiveDeviceList : PASSED
TestPcapLiveDeviceListSearch : PASSED
TestPcapLiveDevice : PASSED
TestPcapLiveDeviceNoNetworking: PASSED
TestPcapLiveDeviceStatsMode : PASSED
TestPcapLiveDeviceBlockingMode: PASSED
TestWinPcapLiveDevice : PASSED
TestPcapFilters : PASSED
TestSendPacket : PASSED
TestSendPackets : PASSED
TestRemoteCapture : PASSED
TestHttpRequestParsing : PASSED
TestHttpResponseParsing : PASSED
TestPrintPacketAndLayers : PASSED
TestPfRingDevice : PASSED
TestPfRingDeviceSingleChannel : PASSED
TestPfRingMultiThreadAllCores : PASSED
TestPfRingMultiThreadSomeCores: PASSED
TestPfRingSendPacket : PASSED
TestPfRingSendPackets : PASSED
TestPfRingFilters : PASSED
TestDnsParsing : PASSED
TestDpdkDevice : PASSED
TestDpdkMultiThread : PASSED
TestDpdkDeviceSendPackets : PASSED
TestDpdkMbufRawPacket : PASSED
TestDpdkDeviceWorkerThreads : PASSED
TestGetMacAddress : PASSED
...
...
ALL TESTS PASSED!!</code>
</pre>
</div>
Expand Down
7 changes: 6 additions & 1 deletion examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h4>Email:</h4>
<h1>Using PcapPlusPlus</h1>

<h2>Example applications</h2>
<p>PcapPlusPlus package already contains several example applications that make use of most PcapPlusPlus APIs and capabilities. Although some of them may useful on their own (like arping or arp-spoofing), their main objective is to show how to use PcapPlusPlus. All examples are well documented and contain code which is easy to understand. After compiling PcapPlusPlus all compiled applications are under <strong>Dist/examples</strong>. Here is the list of example applications:</p>
<p>PcapPlusPlus package already contains various example applications that make use of most PcapPlusPlus APIs and features. Although some of them may be useful on their own (like arping or arp-spoofing), their main objective is to show how to use PcapPlusPlus. All examples are well documented and contain code which is easy to understand. After compiling PcapPlusPlus all compiled applications are under <strong>Dist/examples</strong>. Here is the list of example applications:</p>
<ul>
<li>
<h4>Pcap++Examples.PacketParsing</h4>
Expand All @@ -79,6 +79,10 @@ <h4>ArpSpoofing</h4>
<li>
<h4>ArpSpoofing-SimpleMakefile-Windows</h4>
<p>same code as ARP spoofing but with simple Windows makefile that demonstrates how to write a working Windows makefile that uses PcapPlusPlus(see <a href="examples.html#simple-application">Writing a simple application</a>)</p>
</li>
<li>
<h4>ArpSpoofing-VS2015-Project</h4>
<p>same code as ARP spoofing but with fully configured Visual Studio 2015 solution that demonstrates how to write code that uses PcapPlusPlus with Visual Studio 2015</p>
</li>
<li>
<h4>ArpSpoofing-SimpleMakefile-Linux</h4>
Expand Down Expand Up @@ -231,6 +235,7 @@ <h6><strong>Linux makefile</strong></h6>
</pre>
<li>That's it! rather easy ha? Code, makefiles (Windows and Linux) and the pcap file I used are <a href="resources/HelloWorld.zip">here</a>. Go ahead and try it yourself</li>
<li><strong>Note:</strong> You can also experience some code with the following simple examples: <a href="https://github.com/seladb/PcapPlusPlus/tree/master/Examples/ArpSpoofing-SimpleMakefile-Windows">ArpSpoofing-SimpleMakefile-Windows</a> (on Windows) or <a href="https://github.com/seladb/PcapPlusPlus/tree/master/Examples/ArpSpoofing-SimpleMakefile-Linux">ArpSpoofing-SimpleMakefile-Linux</a> (on Linux or Mac OS X)</li>
<li><strong>Note 2:</strong> This guide isn't relevant for writing code over Visual Studio 2015. If you want to write code over Visual Studio, just use the <strong>ArpSpoofing-VS2015-Project</strong> solution, delete the code and write you own</li>
</ol>
</div>
</div>
Expand Down
6 changes: 2 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ <h2>What makes PcapPlusPlus different from similar C++ wrappers for libpcap/WinP
<li>Designed to be lightweight and efficient (see <a href="benchmark.html">benchmark results</a>)</li>
<li>Support for <strong>DPDK</strong> fast packet processing engine which enables packet capturing and transmition in line rate using kernel bypass</li>
<li>Support for ntop's <strong>PF_RING</strong> packet capturing engine that dramatically improves the packet capture speed</li>
<li>Support for many protocols, including HTTP protocol parsing and editing</li>
<li>Support for parsing and editing of many protocols, including L7 protocols like HTTP and SSL/TLS</li>
<li>Support for Remote Capture capabilities on Windows (using RPCAP protocol supported in WinPcap)</li>
<li>Support for reading and writing <strong>PCAPNG</strong> files (a lot more more than currently supported in WinPcap/libpcap)</li>
<li>Vast object-oriented filtering mechanism that makes libpcap filters a lot more user-friendly (no need to know the exact filter string to use)</li>
Expand All @@ -94,9 +94,7 @@ <h6><strong>Windows</strong></h6>
</ul>
<h6><strong>Linux</strong></h6>
<ul>
<li>Ubuntu 12.04 LTS</li>
<li>Ubuntu 14.04 LTS</li>
<li>Ubuntu 14.10</li>
<li>Ubuntu (12.04 LTS, 14.04 LTS, 16.04 LTS, 14.10)</li>
<li>Fedora</li>
<li>CentOS</li>
<li>It should work on other Linux distributions as well</li>
Expand Down

0 comments on commit 74c6b0f

Please sign in to comment.