Skip to content
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

Resolve issue of compiling software with Npcap SDK 1.10+ using Visual Studio editions previous to VS 2015 #518

Closed
fyodor opened this issue Jul 7, 2021 · 4 comments

Comments

@fyodor
Copy link
Member

@fyodor fyodor commented Jul 7, 2021

The Npcap SDK is the first to use Libpcap 1.10 headers. Those headers impose a requirement on Visual Studio 2015 or later. It appears this was done to Libpcap in 2019 to ensure %zu format string support. We've opened an upstream issue the-tcpdump-group/libpcap#1034 to determine whether this can be moved to an internal libpcap header just to ensure that people compiling Npcap itself have a recent VS (which we do for our Npcap builds of course) or whether it really needs to be imposed on people compiling code which simply links to the libpcap packet.dll included with Npcap. Until we get this resolved, people who MUST use such old versions of Visual Studio can use the Npcap SDK version 1.07 instead. It is available here.

@guyharris
Copy link

@guyharris guyharris commented Jul 7, 2021

Does this mean that applications using Npcap will be built with older compilers and possibly deployed on systems without the Universal CRT? If so, is Npcap being statically linked with the C runtime? If not, then it probably needs to be.

Note that libpcap depends on having a C99-compliant snprintf(); I'm not sure when that was introduced in the C library.

This also indicates that libpcap might have to avoid using some C99 features in its API declarations. What's the oldest version of Visual Studio for which you support building applications with Npcap?

@fyodor
Copy link
Member Author

@fyodor fyodor commented Jul 8, 2021

Hi @guyharris. Good questions. Most of our customers haven't updated to Npcap SDK 1.10 yet since we only released it 2 weeks ago, but already one customer told us that they weren't able to upgrade because they use Visual Studio 2012 to compile their application and got 'error C1189: #error : "Building libpcap requires VS 2015 or later"'. They "solved" the issue by downgrading back to Npcap SDK 1.07, but it would be great if 1.10 could work for VS 2012. Obviously it would be better if the users would all upgrade to VS 2019, but that's not under our control. And Microsoft has committed to supporting VS 2012 (just extended support) until January 2023.

@dmiller-nmap
Copy link
Contributor

@dmiller-nmap dmiller-nmap commented Jul 8, 2021

We can't say libpcap sprang this on us: @guyharris filed #67 over 2 years ago.

Depending on how libpcap decides to go on that upstream issue, we will probably have to declare that certain SDK versions (and therefore access to certain features) will require a mainstream-supported VS. I am reasonably sure that regardless of compiler version, any software will be able to use any Npcap installation. Even ancient Wireshark versions still run fine which were built with the WinPcap SDK (libpcap 1.0.0).

@dmiller-nmap
Copy link
Contributor

@dmiller-nmap dmiller-nmap commented Sep 24, 2021

Was not aware of it at the time, but pulling in latest libpcap-1.10 branch changes for Npcap 1.55 resulted in the upstream fix for this issue being included in Npcap SDK 1.11. I will clarify the changelog for that release to note that it resolves this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants