Open hirenpatel1207 opened 2 months ago
Moving pcl to libpcap might also be a solution ... if it works.
In #21789, I changed the libtins dependencies from winpcap to libpcap. AFAICS winpcap is still available for download, but no longer maintained. In addition, it is excluded from vcpkg CI.
But libpcap seems to depend on winpcap or the newer Npcap, for Windows. https://github.com/the-tcpdump-group/libpcap/blob/master/doc/README.windows.md I'm not sure if Npcap can be ported. Source code is available, but licensing is restrictive, and dependencies must be checked.
This issue could be reproduced with vcpkg 2024-08-01-fd884a0d390d12783076341bd43d77c3a6a15658
IIUC libpcap doesn't need all of winpcap, only the packet lib. Would it help to factor out the winpcap packet lib into a separate port which does not conflict with libpcap? (It does not resolve the fact that winpcap is unmaintained.)
Is npcap sdk enough?
Is npcap sdk enough?
libpcap 1.10.5 configuration prints:
In order to build a version of libpcap that supports packet capture on Windows, you will need to install Npcap and the Npcap SDK, or WinPcap and the WinPcap SDK, and run cmake with -DPacket_ROOT={path of SDK}, where {path of SDK} is the path name of the top-level directory of the SDK.
I don't know exactly why they write "Npcap and the Npcap SDK". But AFAIU a suitable packet capture lib should come with the SDK.
Unfortunately the SDK's licensing and distribution doesn't seem to make it an attractive candidate for a vcpkg port. So we cannot build with any of the packet capture libs in vcpkg CI at the moment. The new version of the port prints a hint a build time. But I can't test it any further. No local MSVC.
Problem: Cannot use the library pcl (with feature pcap) alongside with the library "libtins". System: x64 Windows The vcpkg.json file:
{ "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "dependencies": [ { "name":"pcl", "default-features": false, "features": [ "visualization", "pcap" ] }, "libtins" ], "builtin-baseline": "29b2ea2d4b6197e66ef346e62ccbba35b55b7de5" }
On building, I get the following error:Reason: On digging a bit, I found that pcl port for pcap feature check for the system, if it is a windows system, then it uses "winpcap" else "libpcap" which is correct behviour. But the "libtins" library port only builds with "libpcap" i.e. the linux version and is not platform aware. On checking the website for libtins: https://libtins.github.io/download/ , I saw that for building on windows, we can point out to winpcap instead of libpcap. Is this somehow possible via ports too?