1
0
mirror of https://github.com/solemnwarning/ipxwrapper synced 2024-12-30 16:45:37 +01:00

383 Commits

Author SHA1 Message Date
Daniel Collins
623d2c3df4 Work around some bugs on Windows 98
- Call CreateThread() with non-NULL lpThreadId pointers.

- Ignore InitializeCriticalSectionAndSpinCount() return values.

- Skip log file locking when unimplemented.

- Add missing wsock32.dll entry points.
2024-07-04 21:45:04 +01:00
Daniel Collins
26f6511dee Replace snprintf() implementation used within DLLs.
It appears that some of the mswsock.dll functions get called on
Windows 98 in a context where calling any of the printf functions
provided by the CRT causes subtle memory corruption which doesn't
manifest until the process exits, triggering a page fault in
KERNEL32.DLL and making the system unusable.

1990s Windows makes me miss the sophistication of 1970s UNIX.
2024-07-04 21:31:17 +01:00
Daniel Collins
379f3d6eb6 Fix recursion in WSHEnumProtocols() function. 2024-06-27 23:57:34 +01:00
Daniel Collins
b4e4480d75 Skip profiling when disabled in stubs with unknown arguments.
The profiling code normally harmlessly no-ops in this case, but
it can crash when the profiling code hasn't bee initialised.
2024-06-27 23:57:10 +01:00
Daniel Collins
f503415a30 Fix out-of-bounds array access. 2024-06-27 23:55:27 +01:00
Daniel Collins
35892e0ec0 Update readme. 2024-06-25 12:05:59 +01:00
Daniel Collins
6f468a2316 Load main configuration from ipxwrapper.ini (#15). 2024-06-25 12:05:06 +01:00
Daniel Collins
cb6e314c39 Update changelog. 2024-06-23 22:05:03 +01:00
Daniel Collins
b13821c29a Update manifest. 2024-06-23 13:22:12 +01:00
Daniel Collins
5062920b1d Allow disabling logging entirely (#18). 2024-06-18 00:06:07 +01:00
Daniel Collins
7c31b89929 Merge branch 'coalesce' 2023-12-10 13:00:43 +00:00
Daniel Collins
5e6430ea8b Add option to enable/disable packet coalescing. 2023-12-10 13:00:16 +00:00
Daniel Collins
0dd7f08993 Receive multiple packets in the same router loop iteration. 2023-12-10 13:00:16 +00:00
Daniel Collins
d50a12a186 Use FIONREAD ioctl to check for available data in recv_pump()
This is a bit faster than using select()
2023-12-10 13:00:16 +00:00
Daniel Collins
2a3bbd06c4 Collect more profiling stats. 2023-12-10 13:00:16 +00:00
Daniel Collins
b9d25e54d3 Record more profiling data. 2023-12-10 13:00:16 +00:00
Daniel Collins
c16b73bce4 Initial packet coalescing prototype.
This introduces "packet coalescing" for the DOSBox transport - when an
application is sending an absurd number of tiny IPX packets in rapid
succession we try to batch them up into a container packet to be sent
through the DOSBox server.

This will hopefully improve how certain games behave when using the
DOSBox transport option, but will break compatibility with anything not
specifically supporting this special message framing.
2023-12-10 13:00:16 +00:00
Daniel Collins
bbe0dbd4e1 Merge branch 'profiling' 2023-12-10 12:59:39 +00:00
Daniel Collins
822b307dec Record more profiling info. 2023-11-21 20:18:19 +00:00
Daniel Collins
53bfadc0e5 Add option to enable/disable profiling. 2023-11-19 21:49:52 +00:00
Daniel Collins
09b235024d Reinstate stub function logging hooks. 2023-11-19 21:12:06 +00:00
Daniel Collins
30c7556ef1 Merge branch 'master' into profiling 2023-11-19 16:00:50 +00:00
Daniel Collins
55b9793123 Log socket() and ioctlsocket() at the correct level. 2023-11-19 15:46:31 +00:00
Daniel Collins
3eda6148c3 Update readme. 2023-10-19 09:27:34 +01:00
Daniel Collins
e4dc937e44 Merge branch 'master' into profiling 2023-10-18 23:12:12 +01:00
Daniel Collins
2f76f9177d Merge branch 'fionread' 2023-10-18 21:36:03 +01:00
Daniel Collins
0a2bc5f629 Updated readme, changelog, manifest. 2023-10-18 21:30:11 +01:00
Daniel Collins
e9c45b8ac5 Fix select(), add some tests. 2023-10-18 20:24:05 +01:00
Daniel Collins
15b53ae001 Fix handling of FIONREAD socket ioctl.
When there are no packets waiting, ioctlsocket() should return success
and set *argp to zero.

When there are multiple packets waiting, ioctlsocket() should set *argp
to the accumulated size of all received payloads.

As far as I can tell, there's no way to inspect beyond the first packet
queued on a socket, so we must receive and queue all packets from the
socket to be able to know how much is available.

The recv pipeline has been reworked to queue packets in this manner,
and select() will try to emulate the normal behaviour we previously got
for free by passing the socket fd straight through in readfds.

I don't *think* WSAAsyncSelect() needs any changes since the socket
will still raise window messages as appropriate before we have any
opportunity to shunt the packet into the receive queue.
2023-10-17 17:38:13 +01:00
Daniel Collins
8c5752520e Ignore DNS/DHCP traffic in tests. 2023-10-17 17:37:13 +01:00
Daniel Collins
5d49ee60cb Update readme. 2023-10-17 12:17:30 +01:00
Daniel Collins
66a6510542 Merge branch 'dosbox' 2023-10-17 12:16:07 +01:00
Daniel Collins
056ec4b115 Split interface.[ch] into two files to fix ipxconfig link error. 2023-09-14 00:30:03 +01:00
Daniel Collins
59d2bbd2b7 Retry starting DOSBox during tests. 2023-09-13 00:24:50 +01:00
Daniel Collins
435df05496 Support DOSBox servers using DNS names. 2023-09-13 00:24:08 +01:00
Daniel Collins
a91e05c11b Add more DOXBox encapsulation tests. 2023-09-10 22:33:54 +01:00
Daniel Collins
ad1023b376 Fix potential blocking of the router thread when waiting for ready. 2023-09-10 08:47:48 +01:00
Daniel Collins
4dfe195d7e Set test suite packet captures to non-blocking mode. 2023-09-09 10:14:03 +01:00
Daniel Collins
8db4fb0872 Retransmit DOSBox registration request until a response is received. 2023-09-09 10:12:54 +01:00
Daniel Collins
36693ee9e0 Block certain calls momentarily when connecting to a DOSBox server.
Normally calls like bind() will immediately succeed or fail depending
on what address was requested and what addresses are assigned to the
machine, but when using a DOSBox IPX server we don't know our address
until it gets assigned to us, so block functions impacted by that to
avoid spurious errors when starting up.

If the server is down or slow then the calls will fail after a few
seconds rather than hanging indefinitely.
2023-09-05 22:43:10 +01:00
Daniel Collins
61cfcf7730 Add some initial tests for DOSBox encapsulation. 2023-09-05 22:43:10 +01:00
Daniel Collins
c72ef8a83a Use correct packet size limit for DOSBox encapsulation. 2023-09-05 18:21:52 +01:00
Daniel Collins
dde08ae3a9 Fix local packet delivery when using DOSBox encapsulation. 2023-09-05 18:21:52 +01:00
Daniel Collins
b987f7abc1 Fix test suite build issues. 2023-09-02 15:07:28 +01:00
Daniel Collins
46fc990971 Fix registration with DOSBox IPX server. 2023-09-02 15:04:21 +01:00
Daniel Collins
a6e56f76ce Provide WinPcap headers rather than expecting them on the host. 2023-09-02 15:02:52 +01:00
Daniel Collins
ff14b520cc Remove DOSBox net/node number settings.
The local address is assigned by the server when using a DOSBox
IPX server.
2021-08-21 22:09:17 +01:00
Daniel Collins
a0234c7459 Initial implementation of DOSBox encapsulation support.
Incomplete and completely untested at this point, beyond "it compiles".
2021-08-21 14:42:49 +01:00
Daniel Collins
0bee989d8a Fix memory leak. 2021-08-21 12:10:23 +01:00
Daniel Collins
5c65628fca Add options for DOSBox encapsulation to ipxconfig.
Been sitting on this for a while, the code to actually support
interacting with a DOSBox IPX server isn't done yet.
2021-08-19 22:28:22 +01:00