PCem is different from other emulators in that when it starts up, reboots it’ll tear itself apart, and re-kick all the components. Â Normally other emulators do this once, and as a result I never noticed that slirp_exit doesn’t actually purge the socket state. Â And calling the socket teardown call causes a mbuf explosion in the code. Â Sadly GDB is pretty useless trying to debug it, since it’s claiming all the structure members don’t exist. Â Very strange.
Luckily I could duplicate the debug feature to go though current socket redirects, and close the sockets on the Windows side with a simple closesocket.
In this version I’ve setup the following TCP port redirects:
ExternalPORTÂ Â Internal Port
42322Â Â Â Â Â Â Â Â Â 22
42323Â Â Â Â Â Â Â Â Â 23
42380Â Â Â Â Â Â Â Â Â 80
42443Â Â Â Â Â Â Â Â Â 443
I still haven’t messed with the rc file, so there is no GUI config, instead you have to do it in the text files. Â I have some notes on the whole thing on the pcem forum here.
Download the executables and source here:
And for those interested, the diff against mainline 328 is here.