Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Could anyone suggest a good packet sniffer class for c++?

class good packet sniffer
0
Posted

Could anyone suggest a good packet sniffer class for c++?

0

You will never be able to intercept network traffic just by inserting a class into your project. Packet capture functionality requires kernel mode support, hence you will at the very least need to have your application require or install libpcap/WinPcap, as Will Dean pointed out. Most modern Unix-like distributions include libpcap out of the box, in which case you could take a look at this very simple example: http://www.tcpdump.org/pcap.htm If you’re using Windows, you’re more or less on your own, although WinPcap programming is extremely similar to libpcap programming (unsurprisingly, since it’s a libpcap port to Win32.) The SDK can be found here: http://www.winpcap.org/devel.htm At any rate, no matter the operating system, you will need root / Administrator access to actually perform a capture. Just using the library to replay or analyze precaptured data doesn’t require any special privilege, of course.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123