PcapPlusPlus: Can not work with Npcap

OS: Windows 11 22621.1265 Compiler: VS 2022 (17.5.1) CMake Version: 3.25.2

For reproductions, just clone this (Use FetchContent for all deps): https://github.com/traversebitree/PcapPlusPlus-example.

The C++ code is just from https://github.com/seladb/PcapPlusPlus#getting-started.

When using PcapPlusPlus + WinPcap, the program runs ok. gif1

But when using PcapPlusPlus + Npcap, the program runs failed without any prompt (Can build but run failed). gif2

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (20 by maintainers)

Most upvoted comments

Awesome!! Maybe we should mention it in PcapPlusPlus documentation:

https://pcapplusplus.github.io/docs/next/install/vs https://pcapplusplus.github.io/docs/next/install/mingw

I’ll make sure to do that

Maybe you should install Npcap in WinPcap API-compatible mode (I think that’s what I did)

@seladb Yes my brother, I checked this option (Install Npcap in WinPcap API-compatible Mode), and it works. Thank you so much for such a detailed and hard-to-find problem. Thank you very much for your efforts.

Yes, this is probably something with Npcap, but I’m trying to figure out what 🤔