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

PCAP can't be selected on vNext #213

Open
ruben-balea opened this issue Apr 9, 2023 · 2 comments
Open

PCAP can't be selected on vNext #213

ruben-balea opened this issue Apr 9, 2023 · 2 comments

Comments

@ruben-balea
Copy link
Contributor

Describe the bug
After compiling PCem from the latest sources you can't choose PCAP, only SLiRP appears in the host configuration dialog.

To Reproduce
Download latest sources and compile them under MSYS2 MinGW64.
I even tried to force PCAP with cmake -G Ninja -DUSE_NETWORKING=ON -DUSE_PCAP_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release . but the result was the same.

Expected behavior
Both SLiRP and PCAP should appear in the host configuration dialog

Screenshots
vNext:
pcap missing
v17:
expected

Emulator configuration
None needed to open the host configuration dialog.

Host machine
Any running Windows 10/11 x64

@JosepMaJAZ
Copy link
Contributor

I've been puzzled with this problem for some time (Ok, I haven't done much with PCem this last year), but I've finally found the reason.

The problem is that the version of libpcap provided with msys2 does not support windows packet capture and there is a workaround that requires user interaction:

Basically, when compiling PCem on msys2, it builds and links to libpcap and its libpcap.dll. libpcap.dll is one of the dlls that need to be copied to pcem.exe folder in order to run it.

To fix it, Install npcap (winpcap's successor), and then copy wpcap.dll to pcem.exe folder, and rename it to libpcap.dll, Then, all suddenly works.

I added these lines to my build scripts:

64bits:

# Replace libpcap.dll supplied with msys2 with the one supplied by npcap
rm libpcap.dll
cp /c/windows/system32/npcap/wpcap.dll ./libpcap.dll
cp /c/windows/system32/npcap/packet.dll ./

32bits:

# Replace libpcap.dll supplied with msys2 with the one supplied by npcap
rm libpcap.dll
cp /c/windows/SysWOW64/npcap/wpcap.dll ./libpcap.dll
cp /c/windows/SysWOW64/npcap/packet.dll ./

@gordon-fish
Copy link

I am also seeing this same problem on Linux, where only SLiRP can be selected (and also "Network device" is an empty list.)

OS: Debian 12.5 Bookworm

Compile line (sources from git):
cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH=/opt/Apps/VM/PCem -DCMAKE_BUILD_TYPE=Release -DPCEM_DISPLAY_ENGINE=wxWidgets -DFORCE_X11=ON -DPLUGIN_ENGINE=ON -DUSE_NETWORKING=ON -DUSE_PCAP_NETWORKING=ON .

PCAP libs:

libpcap-dev/stable,now 1.10.3-1 amd64 [installed]
libpcap0.8/stable,now 1.10.3-1 amd64 [installed,automatic]
libpcap0.8-dev/stable,now 1.10.3-1 amd64 [installed]
pcaputils/stable,now 0.8-1.1 amd64 [installed]

Has anyone else had this issue? Is there something that I may have missed? Any advice welcome.

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