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.

PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use.

PcapPlusPlus enables decoding and forging capabilities for a large variety of network protocols. It also provides easy to use C++ wrappers for the most popular packet processing engines such as libpcap, WinPcap, Npcap (WinPcap’s successor), DPDK and PF_RING.

35 questions
3
votes
2 answers

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 library. I use the buildchain suggested in their…
bemerged
  • 31
  • 5
3
votes
3 answers

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(${PROJECT_NAME} libCommon++.a libPacket++.a…
netleap tom
  • 143
  • 4
  • 10
2
votes
2 answers

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 get almost anything in the tcp header by using…
rdx
  • 101
  • 1
  • 7
2
votes
1 answer

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[]) { std::string path; pcpp::PcapFileReaderDevice…
2ir0
  • 41
  • 3
2
votes
0 answers

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 page. include /usr/local/etc/PcapPlusPlus.mk #…
netleap tom
  • 143
  • 4
  • 10
1
vote
2 answers

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 fine with it! But when I try to include the library…
1
vote
2 answers

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 read from the .pcap files, the filter is just a tcp…
1
vote
1 answer

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 library, but I'm lost on how to link and compile…
1
vote
0 answers

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 pcapplusplus-20.08-windows-mingw-w64-gcc-8.1.0.zip package…
capolir843
  • 53
  • 4
1
vote
1 answer

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 : include ../../../Dist/mk/PcapPlusPlus.mk And…
Felix
  • 13
  • 3
1
vote
2 answers

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, I was unable to achieve this: I can create a…
Adrian Maire
  • 14,354
  • 9
  • 45
  • 85
1
vote
2 answers

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?
DinoStray
  • 696
  • 1
  • 6
  • 20
1
vote
1 answer

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 port 5060 My question is why doesn't port 5060…
jmq
  • 1,559
  • 9
  • 21
0
votes
0 answers

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 to add comment for every packet. my code to add…
0
votes
0 answers

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 monitoring the lo, it says this packet is…
Junhui Zhu
  • 93
  • 5
1
2 3