nmap / npcap

Nmap Project's Windows packet capture and transmission library
https://npcap.com
Other
2.96k stars 511 forks source link

[npcap] pcap_get_servicename missing entrypoint #466

Closed markpizz closed 3 years ago

markpizz commented 8 years ago

Hi Yang,

I've got a Win 10 test system running Win 10 Pro Version 1511.

This system has WinPcap 4.1.3 installed.

I just installed npcap 0.08 r4 AND took all defaults during the install (thus not specifying WinPcap compatibility mode).

My App prefers npcap if it is installed (changing the library search path before dynamically loading wpcap.dll).

After wpcap.dll is dynamically loaded, it finds the entry points to pcap_lib_version and pcap_getservicename. With recent npcap versions it seems that pcap_getservicename is no longer available.

Maybe this is OK (since you've been working through things), BUT if it isn't going to be there, then npcap-guide-wrapper.html#npcap-detect-version shouldn't mention pcap_getservicename.... I think you originally introduced the pcap_getservicename API to provide a way for programmers to dynamically determine what service to start with "net start npf" or "net start npcap".....

hsluoyz commented 8 years ago

Hi Mark,

Thanks for this error in docs!

In fact, I gave up the pcap_getservicename() function when Npcap updated to libpcap 1.8.0, because it's not cross-platform and needs dynamic loading. And, most our user software just doesn't distinguish the service names. They just try net start npcap first, if fails, then try net start npf. So it's easier than importing a function.

I have updated the docs to show this change: https://github.com/nmap/npcap/commit/19f56a3be8a3833389c64e3af6130fb2be62e258