nmap / nmap/npcap

Better detect and report DLL and driver version inconsistencies

Open
#623 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
3.6k
Forks
592
PR merge metrics
No merged PRs in 30d

Description

Npcap installs its DLL's in a systemwide Windows folder and we strongly recommend that applications use those common DLL's rather than shipping Npcap DLLs in their application directory. This is because the Npcap device driver is shared systemwide anyway, and should be paired with the DLL's corresponding to that driver version. We don't do any testing of mismatched DLL's+drivers because they are meant to be installed and used as a set.

That being said, shipping library DLL's in Windows application directories is very common and often makes sense where the library can be used independently. So some applications probably make that mistake with Npcap. We probably don't want Npcap to abort on mismatch, but we do want to make it easy for mismatches to be detected and reported.

pcap_lib_version will normally show something like "Npcap version 1.71, based on libpcap 1.10.1", but in the case of mismatch will show "Npcap version 1.71 (packet.dll version 0.99), based on libpcap 1.10.1".

PacketGetVersion() has always returned a version string like "1.71" or "0.99-r3", but we could make it check for differing driver version and extend it like "1.71 (npcap.sys 0.9985)".

I'm not sure of the right answer, but wanted to add this issue so we at least remember the problem and can think of possible improvements. We would hate to spend a great deal of issue debugging a problem just to find out it was caused by a version mismatch.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementations of pcap_lib_version and PacketGetVersion and reviewing how DLL and driver versions are currently obtained. Compare the possible mismatch cases described in the issue and determine a reporting behavior that avoids aborting. Done means the selected behavior is documented and covered for mismatched Npcap DLL and driver versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.