forked from PcapPlusPlus/pcapplusplus.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
173 lines (168 loc) · 8.02 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---
title: PcapPlusPlus - a multiplatform C++ library for capturing, parsing and crafting of network packets
layout: generic-page
nav_exclude: true
---
<div class="lp-container">
<header class="lp-header">
<div class="lp-center">
<h1 style="font-weight: bold">Welcome To PcapPlusPlus!</h1>
<h2 style="padding-bottom: 30px">A multiplatform C++ library for capturing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use.</h2>
<a href="{{ site.baseurl }}/docs/" class="btn btn-blue fs-5 mb-3 mb-md-5 mr-5">Get started</a>
<a href="{{ site.baseurl }}/docs/install" class="btn btn-blue fs-5 mb-3 mb-md-5">Download</a>
</div>
</header>
<section class="lp-section">
<div class="lp-center lp-section-container">
<div class="lp-col lp-col-left">
<h2>Capture and send network traffic</h2>
<p>PcapPlusPlus enables capturing and sending network packets through easy-to-use C++ wrappers for the most popular packet
processing engines such as
<a href="https://www.tcpdump.org/">libpcap</a>,
<a href="https://www.winpcap.org/">WinPcap</a>,
<a href="https://nmap.org/npcap/">Npcap</a>,
<a href="https://www.dpdk.org/">DPDK</a> and
<a href="https://www.ntop.org/products/packet-capture/pf_ring/">PF_RING</a>
</p>
<a href="{{ site.baseurl }}/docs/features#packet-capture" class="btn btn-blue fs-5 mb-3 mb-md-5">Learn More</a>
</div>
<div class="lp-col">
<img src="{{ site.baseurl }}/resources/capture-engines.png" class="lp-image"/>
</div>
</div>
</section>
<section class="lp-section lp-section-invert">
<div class="lp-center lp-section-container">
<div class="lp-col">
<h2>Decode and forge packets</h2>
<p>PcapPlusPlus enables decoding and forging capabilities for a large variety of <a href="{{ site.baseurl }}/docs/features#supported-network-protocols">network protocols</a></p>
<a href="{{ site.baseurl }}/docs/features#packet-parsing-and-crafting" class="btn btn-blue fs-5 mb-3 mb-md-5">Learn More</a>
</div>
<div class="lp-col lp-col-left">
{% highlight cpp %}
// parse the raw packet into a parsed packet
pcpp::Packet parsedPacket(&rawPacket);
// check if it's an IPv4 packet
if (parsedPacket.isPacketOfType(pcpp::IPv4)) {
// extract source and dest IPs
pcpp::IPv4Address srcIP =
parsedPacket.getLayerOfType()->getSrcIpAddress();
pcpp::IPv4Address destIP =
parsedPacket.getLayerOfType()->getDstIpAddress();
// print source and dest IPs
printf("Source IP is '%s'; Dest IP is '%s'\n",
srcIP.toString().c_str(), destIP.toString().c_str());
}
{% endhighlight %}
</div>
</div>
</section>
<section class="lp-section">
<div class="lp-center lp-section-container">
<div class="lp-col lp-col-left">
<h2>Super Fast!</h2>
<p>PcapPlusPlus is designed to be efficient and lightweight. It enables amazingly fast packet processing with minimum overhead
</p>
<a href="{{ site.baseurl }}/docs/benchmark" class="btn btn-blue fs-5 mb-3 mb-md-5">View Benchmarks</a>
</div>
<div class="lp-col">
<img src="{{ site.baseurl }}/resources/rocket.png" class="lp-image">
</div>
</div>
</section>
<section class="lp-section lp-section-invert">
<div class="lp-center lp-section-container">
<div class="lp-col">
<h2>Multiplatform support</h2>
<p>PcapPlusPlus is fully supported on Windows, MacOS, Linux and FreeBSD. You can download pre-built binaries for each platform or
build it from source. PcapPlusPlus is available in popular package managers such as Homebrew and Conan
</p>
<a href="{{ site.baseurl }}/docs/install" class="btn btn-blue fs-5 mb-3 mb-md-5">View Installation Guide</a>
</div>
<div class="lp-col lp-col-left">
<img src="{{ site.baseurl }}/resources/supported-os.png" class="lp-image">
</div>
</div>
</section>
<section class="lp-section">
<div class="lp-center lp-section-container">
<div class="lp-col lp-col-left">
<h2>Read and write packets to files</h2>
<p>PcapPlusPlus provides an easy-to-use interface for reading and writing network packets into files.
It supports the most popular file formats which are
<a href="https://wiki.wireshark.org/Development/LibpcapFileFormat">PCAP</a> and
<a href="https://github.com/pcapng/pcapng">PCAPNG</a>
</p>
<a href="{{ site.baseurl }}/docs/features#read-and-write-packets-fromto-files" class="btn btn-blue fs-5 mb-3 mb-md-5">Learn More</a>
</div>
<div class="lp-col">
{% highlight cpp %}
// create a pcap file reader
pcpp::PcapFileReaderDevice pcapReader("input.pcap");
pcapReader.open();
// create a pcapng file writer
pcpp::PcapNgFileWriterDevice pcapNgWriter("output.pcapng");
pcapNgWriter.open();
// raw packet object
pcpp::RawPacket rawPacket;
// read packets from pcap reader and write pcapng writer
while (pcapReader->getNextPacket(rawPacket)) {
pcapNgWriter.writePacket(rawPacket);
}
{% endhighlight %}
</div>
</div>
</section>
<section class="lp-section lp-section-invert">
<div class="lp-center lp-section-container">
<div class="lp-col">
<h2>Packet reassembly</h2>
<p>PcapPlusPlus contains unique implementation of packet reassembly techniques.</p>
<p><strong>TCP Reassembly</strong> which supports TCP retransmission, out-of-order TCP packets and missing TCP data</p>
<p><strong>IP Fragmentation and Defragmentation</strong> to create and reassemble IPv4 and IPv6 fragments</p>
<a href="{{ site.baseurl }}/docs/features#packet-reassembly" class="btn btn-blue fs-5 mb-3 mb-md-5">Learn More</a>
</div>
<div class="lp-col lp-col-left">
<img src="{{ site.baseurl }}/resources/stream.png" class="lp-image">
</div>
</div>
</section>
<footer class="lp-footer">
<div class="lp-footer-section lp-footer-grid">
<div>
<h3>Docs</h3>
<ul>
<li><a href="{{ site.baseurl }}/docs/install" class="lp-footer-item">Installation</a></li>
<li><a href="{{ site.baseurl }}/docs/features" class="lp-footer-item">Features</a></li>
<li><a href="{{ site.baseurl }}/docs/tutorials" class="lp-footer-item">Tutorials</a></li>
<li><a href="{{ site.baseurl }}/docs/dpdk" class="lp-footer-item">DPDK</a></li>
<li><a href="{{ site.baseurl }}/docs/examples" class="lp-footer-item">Examples</a></li>
<li><a href="{{ site.baseurl }}/docs/api" class="lp-footer-item">API Documentation</a></li>
</ul>
</div>
<div>
<h3>Community</h3>
<ul>
<li><a target="_blank" href="https://github.com/seladb/PcapPlusPlus" class="lp-footer-item">GitHub</a></li>
<li><a target="_blank" href="https://twitter.com/seladb" class="lp-footer-item">Twitter</a></li>
<li><a target="_blank" href="https://groups.google.com/d/forum/pcapplusplus-support" class="lp-footer-item">Google Group</a></li>
<li><a href="mailto:[email protected]" class="lp-footer-item">Email</a></li>
<li><a href="{{ site.baseurl }}/docs/community#contribute" class="lp-footer-item">Contribute</a></li>
</ul>
</div>
<div>
<h3>More</h3>
<ul>
<li><a href="{{ site.baseurl }}/docs/releases" class="lp-footer-item">Releases</a></li>
<li><a href="{{ site.baseurl }}/docs/benchmark" class="lp-footer-item">Benchmarks</a></li>
<li><a href="{{ site.baseurl }}/docs/features#license" class="lp-footer-item">License</a></li>
<li><a href="https://github.com/PcapPlusPlus/pcapplusplus.github.io" class="lp-footer-item">Website Repo</a></li>
</ul>
</div>
</div>
<div class="lp-footer-section lp-footer-copyright">
<img src="{{ site.baseurl }}{{ site.logo_source }}" width="{{ site.logo_width }}" height="57">
<p>Copyright © {{ site.time | date: '%Y' }} {{ site.github_username }}</p>
</div>
</footer>
</div>