Questions tagged [pcapplusplus]
PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets. Use the "pcapplusplus" tag for any question related to this project.
34
questions
0
votes
0
answers
42
views
how to add packet comment in enhanced packet block in pcapng file
Packet with Comment
i have to add packet comment using c++ code.
i am using Enhanced Packet Block to store packet data.
strucure: SHB---IPB----EPB---EPB----EPB ......
i have used PCAPPlusPlus Library ...
0
votes
0
answers
51
views
Why did I get a Null/Loopback after I send a packet with pcpp?
I have a nginx instance running on localhost:80 and I want to send it a raw TCP SYN packet.
So I generate a dummy packet and send it to lo interface via pcapplusplus. However, when the Wireshark is ...
0
votes
0
answers
14
views
getting Segmentation fault on PcapNgFileReaderDevice::close()
**#0 0x000000000049344c in light_pcapng_close ()
#1 0x0000000000480cbe in pcpp::PcapNgFileReaderDevice::close() ()
**
i am getting this error on my setup.
how can i resolve this error .
0
votes
0
answers
84
views
Entry Point Not Found wpcap.dll not found by starting the PcapPrinter
I test actually with PcapPlusPlus. It is checked out and added to my Visual Studio Pro 2022. The batch files in ci are executed and the npcap sdk is installed. In parallel Wireshark and Winpcap are ...
0
votes
0
answers
23
views
Which rpm i need to download for pcapplusplus library?
getting error
fatal error: SystemUtils.h: No such file or directory
#include "SystemUtils.h"
^~~~~~~~~~~~~~~
Packet.h: No such file or directory
#include "Packet.h"
^~~~~~~~~~
...
0
votes
0
answers
40
views
how to get sctp layer from the packet using pcapplusplus library?
// let's get the TCP layer
pcpp::TcpLayer* tcpLayer = parsedPacket.getLayerOfType<pcpp::TcpLayer>();
if (tcpLayer == NULL) {
cout << "NO TCP LAYER" << endl;
}
else {
...
0
votes
0
answers
191
views
I get an empty device list when using PcapPlusPlus
At the moment, I am interested in networking and in order to learn more, I decided to use the PcapPlusPlus library to capture packets on my local network. My goal is to understand how packets are ...
0
votes
0
answers
43
views
How can I get the E2AP packet details and printed it using PcapPlusPlus?
I am trying to implement PcapPlusPlus and print E2AP packet details.
0
votes
0
answers
114
views
PcapPlusPlus Example- DPDKFilterTraffic not performing like I would expect, do I have something misconfigured?
I am working on an application that uses DPDK to write packet payloads to file and am investigating whether or not PcapPlusPlus could be used for this purpose. My setup is as follows:
I am using a ...
0
votes
0
answers
55
views
Parse L2TP in PCAP++
I need to parse difficult traffic with Layer 2 Tunneling Protocol:
Eth->IP->UDP->L2TP->PTPP->IP->TCP->...
.. and get inner and outer IP addresses.
I use loop over layer->...
0
votes
1
answer
363
views
Including Pcap++ in a CMake project
I am building a Qt application (with CMake) that will capture and analyze some network packets. Since I am using C++ all over the project, it would be convenient for me to use Pcap++ in my application ...
0
votes
1
answer
58
views
pcapplusplus port filter fails to find packets in trace files
I have an application that displays stats about packets in a pcap file. Here is a partial output from a run I did without filters:
192.168.42.4:5082-17.253.27.205:20480 88:66:5a:04:e0:76 00:80:ae:b2:...
1
vote
2
answers
831
views
Inclusion pcapplusplus in project via CMake
I installed pcapplusplus on Ubuntu (Downloaded package from here: https://github.com/seladb/PcapPlusPlus/releases/tag/v21.11). The example that was in the archive compiles and works, everything is ...
1
vote
2
answers
617
views
the BPF filter dit not work with vlan packets
I captured some packets with pcapplusplus on our Ubuntu server, and wrote to .pcap files, then I read the .pcap files, it just worked fine; but when I set the filter with BPF Syntax,it could not ...
0
votes
1
answer
165
views
Pcapplusplus equivalent for listening to all interfaces/devices
In libpcap, we're able to listen to all devices by simply doing
pcap_t * handle = pcap_open_live(NULL , INT_MAX , 0 , 500 , errbuf);
if (handle == NULL)
{
...
0
votes
1
answer
258
views
LINK2019 when using PCAP++
I am trying to use the pcap++ library. I have downloaded the libraries for the VS2017, I linked the libraries and also the header files.
The libraries are:
Common++.lib
Packet++.lib
Pcap++.lib
and I ...
0
votes
1
answer
303
views
How to configure pcapplusplus so it doesn't ignore packets which are greater than MTU size on PcapLiveDevice?
I am using pcapplusplus library for tcp packet processing in c++. When i am receiving packets greater than MTU size, which is 1500 bytes, my program stops further processing as TcpReassembly is not ...
1
vote
1
answer
448
views
Issue linking and compiling C++ lib (Pcapplusplus) in SwiftUI project
I'm trying to utilize the C++ lib Pcapplusplus in my SwiftUI application through the use of objective C bridge classes. I've compiled a standalone C++ executable that makes very basic use of the pcpp ...
2
votes
2
answers
739
views
How to get the payload from TCP packet?
I want to extract the tcp payload data from tcp packet using pcapplusplus library, or other similar libraries as well. I search documentation but not able to find how to get the tcp payload, but i can ...
0
votes
1
answer
414
views
Example how to use TCPReassembly in pcapplusplus?
I have to write TCP Reassembly code in c++. Can somebody please suggest me what is the most suitable library I can use with enough documentation. I tried [pcapplusplus][1] but in this library, I can't ...
0
votes
1
answer
118
views
PfRingDevice for lo interface
I'm using PF_RING and PCAP++ to capture and analyze net traffic.
Sometimes usefull to use lo interface (loopback): for tests and regression analyze.
By the way, there is constant silence in the ...
0
votes
1
answer
480
views
Can you index a PCAP file without loading it all into memory?
I have to look at PCAPs that are quite large, around 40GB. What I'm doing right now is using PCAP++ to parse the PCAPs one at a time and process the data inside them. That data is placed into a buffer ...
2
votes
1
answer
235
views
CMake - undefined symbols encountered when building application depends on PcapPlusPlus
I programmed a simple application using PcapPlusPlus library with CLion on MacOS.
The code is really simple:
#include "../include/PCPP/PcapFileDevice.h"
int main(int argc, char* argv[])
{
...
1
vote
0
answers
524
views
Unable to compile an example app using PcapPlusPlus
I wish to learn the PcapPlusPlus library in order to manipulate packets. I am using a Cygwin terminal on Windows 10 with all the development tools installed in Cygwin. So, i downloaded the ...
0
votes
1
answer
56
views
set 'don't fragment flag" in PcapPlusPlus lib
I create IP packets using PcapPlusPlus lib. On IP Level I want to set a “Don't fragment” flag. There is a define PCPP_IP_DONT_FRAGMENT in IPv4Layer.h in the lib, but I don't see any ways to use it.
...
1
vote
1
answer
545
views
Configure Qt project (.pro file) to use PcapPlusPlus
I want to use Pcap++ inside my Qt project.
I've followed steps in the installation & introduction guide of PcapPlusPlus, but there are still unknowns:
How do I implement that in my .pro file : ...
1
vote
2
answers
578
views
How to parse/check an HTTP message in PCapPlusPlus?
In PCap++, I want to detect if a payload is an HTTP request or not. For this, I am trying to parse the string and expect the library to allows me to check if this was done successfully.
Unfortunately, ...
3
votes
2
answers
2k
views
Use Pcap++ library in cmake
im currently converting a Qt Creator project to a cmake project and can't compile my program anymore. Im using the Library PcapPlusPlus as a submodule because we did some major changes to the original ...
1
vote
2
answers
83
views
For lib pcapplusplus, why there is no matchSubnet() for ipv6 address
For ipv4 address, I can use matchSubnet() checks whether the address matches a subnet.
But for ipv6, how can I do this?
1
vote
1
answer
1k
views
Packet sent to port on localhost is never received
I'm working on an Linux application using PcapPlusPlus that will send a SIP packet to a port on the local host. Basically it is sending a UDP message:
Source: 127.0.0.1 port 5061
Dest: 127.0.0.1 ...
2
votes
0
answers
3k
views
what cmake command should I use to include a .mk file in a cmakelists.txt file
I've installed the c++ library pcapplusplus on my linux machine.
Its build system is makefiles and not cmake.
It describes how to compile and an app and provides this makefile about half way down this ...
3
votes
3
answers
2k
views
cmake linking against static libraries - do you have to tell cmake where to look?
I've installed the c++ library pcapplusplus on my linux machine and the .a files have been put in /usr/local/lib. I am now trying to link my project with it in cmake using target_link_libraries(${...
0
votes
1
answer
277
views
Connecting pthreadgc2.dll to qt project
I need help with installation pthreads to qt.
the thing is I'm making project with winpcap and pcapplusplus wrapper for it. but it still needs pthreads. I have pthreadgc2.dll missing, and I cant ...
0
votes
2
answers
421
views
Namespace Conflict libcrafter/Pcap++
I'm trying to make an homemade system for exchanging packets, especially on layer 2 without anything above, on CentOS...
I use
libcrafter to build packets
pcap++ to sniff packets
(crypto++ to ensure ...