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

[DRAFT] Test if tcpdump.exe works #1130

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

fxlb
Copy link
Member

@fxlb fxlb commented Feb 7, 2024

[skip ci]

@fxlb fxlb force-pushed the windows2 branch 3 times, most recently from 39c7fbf to 96385b8 Compare February 7, 2024 16:11
@fxlb fxlb changed the title [DRAFT] Just try doing checks on Windows to view any error messages... [DRAFT] Test if tcpdump.exe works Feb 7, 2024
@fxlb
Copy link
Member Author

fxlb commented Feb 7, 2024

The tcpdump.exe don't run:

Release\tcpdump.exe --version
Command exited with code -1073741515

(Same when using "Debug".)

@infrastation
Copy link
Member

-1073741515 == 0xffffffffc0000135, both values yield search results discussing location of Windows libraries and setting of PATH.

@fxlb
Copy link
Member Author

fxlb commented Feb 7, 2024

Thanks, and missing DLLs also.

@fxlb
Copy link
Member Author

fxlb commented Feb 7, 2024

Investigation with Dependencies (https://github.com/lucasg/Dependencies)
SDK=WpdPack --> wpcap.dll (NOT_FOUND). But no unattended installation possible with WinPcap_4_1_3.exe.
SDK=npcap-sdk-1.12 --> wpcap.dll (NOT_FOUND). It seems that npcap-1.79.exe in silent mode needs a Npcap OEM version.

@guyharris
Copy link
Member

-1073741515 == 0xffffffffc0000135, both values yield search results discussing location of Windows libraries and setting of PATH.

And as a 32-bit value, it's 0xc0000135, which is, according to the list of NT status values, STATUS_DLL_NOT_FOUND.

@guyharris
Copy link
Member

SDK=WpdPack --> wpcap.dll (NOT_FOUND). But no unattended installation possible with WinPcap_4_1_3.exe.
SDK=npcap-sdk-1.12 --> wpcap.dll (NOT_FOUND). It seems that npcap-1.79.exe in silent mode needs a Npcap OEM version.

Yes - in both cases, I think the intent is to have commercial applications using WinPcap or Npcap pay for the ability to silently install the driver and libraries as part of their installer, to help support the project. That's definitely the case for Npcap.

Note that, in order to do capture tests, the WinPcap/Npcap driver would also have to be installed. For reading capture files, that might not be necessary, so that may be OK for tcpdump tests.

@fxlb
Copy link
Member Author

fxlb commented Feb 7, 2024

so that may be OK for tcpdump tests.

Any way to build without the capture function ? (Because currently tcpdump.exe needs wpcap.dll)

@guyharris
Copy link
Member

Any way to build without the capture function ?

"Build" as in "build libpcap" or "build" as in "build tcpdump"?

Libpcap can be built without capture support - if using CMake, passing -DPCAP_TYPE=none to CMake should be sufficient.

Then you'd want to build tcpdump to link with the libpcap that you built.

(Because currently tcpdump.exe needs wpcap.dll)

Tcpdump's going to need some libpcap library, even if you're only building it to run the tests.

@fxlb
Copy link
Member Author

fxlb commented Feb 7, 2024

Next test: extract wpcap.dll from installer, copy it in \Windows\system32 and see...

@infrastation
Copy link
Member

If (please check that first) the licence does not forbid it, you could extract the required files once on a Windows PC, put them here and let the CI script download them from there into the correct place of the CI filesystem instead of the installers.

@fxlb
Copy link
Member Author

fxlb commented Feb 8, 2024

extract wpcap.dll from installer, copy it in \Windows\system32 and see...

Copying is not enough. Installation required.

@fxlb
Copy link
Member Author

fxlb commented Feb 9, 2024

Libpcap can be built without capture support - if using CMake, passing -DPCAP_TYPE=none to CMake should be sufficient.

-DPCAP_TYPE=null ?

Tcpdump's going to need some libpcap library, even if you're only building it to run the tests.

Yes, sure.

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

Successfully merging this pull request may close these issues.

3 participants