Reputation: 61
The portable version of wireshark from: https://www.wireshark.org/download.html works fine on my windows 10, but doesn't include portable capturing triber Libpcap or WinPcap.
On the Npcap page https://nmap.org/npcap/ it is written: "Libpcap API: Npcap uses the excellent Libpcap library, enabling Windows applications to use a portable packet capturing API and so indeed on the Libpcap library page https://www.tcpdump.org/ there is the portable C/C++ Libpcap library available.
How can I use the C/C++ Libpcap library within Wireshark or with Java (pcap4j)? I downloaded it and it consists mainly of *.h files.
Thanks for any advices.
Upvotes: 6
Views: 12768
Reputation: 116
How can I use the C/C++ Libpcap library within Wireshark
If you're on a UN*X, libpcap is usually shipped as part of the operating system, so it should Just Work.
If you're on Windows, you need a version of libpcap that's made to work on Windows. That's what Npcap is.
If you want to capture traffic on Windows, you will have to install Npcap; you can't just run a Wireshark from a flash drive or other medium containing a portable version of Wireshark without installing anything, you will have to install Npcap on your computer.
I downloaded it and it consists mainly of *.h files.
You downloaded the source code, which isn't directly usable. It has to be compiled - and installed.
Upvotes: 6