seladb / PcapPlusPlus

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. It provides C++ wrappers for the most popular packet processing engines such as libpcap, Npcap, WinPcap, DPDK, AF_XDP and PF_RING.
https://pcapplusplus.github.io/
The Unlicense
2.68k stars 654 forks source link

using DPDK in server client fashion #1398

Closed pra2ad closed 4 months ago

pra2ad commented 4 months ago

Hello ,

I would like to use dpdk to communicate between 2 servers in server client fashion, where in i bind the Server IP address on the server side and then send data from the client to the server . Is this possible using dpdkDevice::receivePackets() and sendingPackets(). Also , are there any instruction to run this as an example between server and client servers. Please point me to the right documentation if it already exists.

-Thnx

seladb commented 4 months ago

It really depends on your requirements. If you just need to send packets between 2 machines - then yes, it's possible using receive and send. However if you want to build a real client-server application, for example one that uses TCP/IP or HTTP for communication then it's much more complex because you need to build the entire TCP/IP stack yourself, meaning craft packets both in the client and the server that will emulate the network traffic between sockets. PcapPlusPlus is not the right tool for this job, its main purpose is to capture and parse packets, as well as craft new packets, not implementing complete network stacks.

Please let me know if this answers your question