-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Npcap 1.70 PacketOpenAdapter returns empty string for ADAPTER.Name #609
Comments
Thanks for bringing this up. The Packet32.h (Packet.dll) API is not intended as a public API, but rather as the interface between Npcap and libpcap. The Npcap Developer's Guide says, "The Npcap API is exported by wpcap.dll and is the Windows port of libpcap." This is not a new policy, as even WinPcap's documentation states:
User software should avoid using the Packet API, since because Packet.dll is always shipped with a compatible and tested wpcap.dll (libpcap), it is subject to incompatible changes between versions. Future versions may make data structures like In this particular case, libpcap was not using the |
For reference, here is the commit that changed this: e2f60e4#diff-fbde706694dbead2c023e9f5ba579b5d724a4a35c8831f03df023c9f0ee183c8L1385-L1391 |
Just as an update, @dmiller-nmap and I were chatting about this and it looks like we'll probably be able to add back the Name for the Npcap 1.71 release, which we're hoping to put out next week. Still, as Dan mentioned so persuasively above, it's best to avoid calling the Packet API if possible. We and the libpcap team work had to maintain the wpcap (libpcap) API, but Packet is meant to be an internal API with no compatibility guarantees. I'll re-open this so we can close it after we put Name back. |
Thanks for the information. |
Thanks for the extra details @DarkDarro. If you are bundling Npcap OEM 1.60 with your product, that means you must have an Npcap OEM redistribution license and thus are probably entitled to priority support. If you don't have your support contact details, feel free to write to sales@nmap.com and they will hook you up. What sometimes works best is to file an issue here and then provide the issue number to support so they know to mark it high priority and start work on it ASAP. |
Call Npcap API PacketOpenAdapter with a specific device string.
In our case the device is a virtual ethernet adapter if it is relevant.
The returned ADAPTER object's "Name" member is an empty string "".
In Npcap 1.60 the device string parameter of PacketOpenAdapter was the same as the member after a successful call and we reused the member later on as a parameter to API pcap_open_live.
In Npcap 1.70 this now fails with the empty string.
The text was updated successfully, but these errors were encountered: