Daniel Collins
4cdca80c4b
Don't do any cleanup in DllMain() during process termination.
...
Subtle crashes are fun. I found this to cause a deadlock, but only
after adding lots of extra debug logging to diagnose a DIFFERENT bug
and only when running it on a particular machine.
But once both of those criteria are met? It crashes pretty reliably.
2017-06-18 03:12:13 +01:00
Daniel Collins
dcd484702e
Build with newer toolchain.
...
Various fixups to build under win-builds.org toolchain rather than MinGW. No
longer builds under MinGW as I have removed headers/definitions that it lacks.
2014-06-26 13:22:10 +01:00
Daniel Collins
043ce1495e
Refactor address conflict detection.
...
Detect multiple sockets bound to the same address within a session by creating
a named mutex. Multiple handles to a mutex may exist and closing the last one
destroys it.
2014-06-19 19:42:09 +01:00
Daniel Collins
4fd24354a5
Refactored ipxconfig, allow enabling Ethernet encapsulation.
2014-04-18 14:45:09 +01:00
Daniel Collins
4cf1ec88aa
Implemented support for loading interfaces from WinPcap.
2014-04-18 00:31:59 +01:00
Daniel Collins
e5315890fd
Use GetTickCount64() for connect timeouts where available.
2014-01-25 23:34:33 +00:00
Daniel Collins
223bfeb35a
Automatically add exceptions to Windows Firewall
...
If enabled (default is off) and running as an admin, add the running executable
to the Windows Firewall exception list during DLL initialisation.
2013-12-11 20:23:48 +00:00
Daniel Collins
0faeb985d2
Properly initialise address table.
2012-11-18 17:00:36 +00:00
Daniel Collins
2a06601f53
Use a hash table instead of a linked list for storing the IPX sockets.
2012-11-11 20:54:43 +00:00
Daniel Collins
920b5ee2c3
Implemented new "address table" code for maintaining address uniqueness between
...
multiple IPXWrapper processes without needing a shared router thread.
Replaced router/rclient code with a single, per-process router thread.
Add addresses to the cache in the router main loop rather than winsock recv
functions.
Packets are no longer preceeded by an rpacket_header structure when relayed to
the local UDP sockets.
Each IPXWrapper instance creates a "private" UDP socket bound to a random port
on INADDR_ANY which is used for sending all packets and receiving unicast.
Bugfix: Check source socket number before relaying to a connected socket.
2012-11-11 20:26:50 +00:00
Daniel Collins
d8a0dcf5c8
Removed ip_is_local and associated code. Test for packets originating from us by
...
attempting to fetch an interface using the IPX source address instead.
2012-11-03 02:03:46 +00:00
Daniel Collins
57e4f27bb8
Implemented (virtual) interface address cache and ipx_interface utility functions.
2012-11-03 01:21:25 +00:00
Daniel Collins
bee68d52b9
Store zero or more IPs in ipx_interface structures rather than one.
2012-11-02 20:45:10 +00:00
Daniel Collins
7fe8d74f22
Implemented config saving functions and added log_level to main_config.
2012-10-28 15:53:54 +00:00
Daniel Collins
e96c9db3e2
Moved address cache and interface TTL values into main_config.
2012-10-21 10:33:20 +00:00
Daniel Collins
ebcf1673e2
REFACTOR ALL THE THINGS.
2012-10-21 10:26:52 +00:00
Daniel Collins
0f6c458bcc
Implemented new address cache.
2012-10-20 18:06:11 +00:00
Daniel Collins
a5837f0fdc
Added workaround for games that break WinSock IP support by clearing the environment (Carmageddon II).
2012-05-10 01:18:25 +00:00
Daniel Collins
e7c6358044
Updated logging API.
2011-11-16 21:32:59 +00:00
Daniel Collins
406b4710bc
Log version/revision and compile time while initializing ipxwrapper.dll.
2011-11-14 02:21:29 +00:00
Daniel Collins
705ba9a71f
Code cleanup.
2011-10-03 11:17:05 +00:00
Daniel Collins
8fd710578d
Set 0x02 in sa_flags when packet is from a local (IPX) IP and free the hosts list while cleaning up.
2011-10-03 11:13:45 +00:00
Daniel Collins
322b2fe97d
Added tray icon and menu with exit option to ipxrouter. Added filename argument to log_open.
2011-09-18 14:36:24 +00:00
Daniel Collins
a40d3da084
Updated getsockopt to call get_interfaces for each IPX_ADDRESS/IPX_MAX_ADAPTER_NUM call.
...
Deleted global interface list.
Set ipxwrapper.dll EnumProtocolsA/EnumProtocolsW stubs to load from wsock32.dll as they don't exist in ws2_32.dll.
2011-09-11 17:09:57 +00:00
Daniel Collins
b888762538
Rewrote DLL loading code to avoid corrupting the system error code.
2011-09-11 13:28:41 +00:00
Daniel Collins
f1a6cf40a2
Bugfix: Setup socket for sending packets with new router code properly.
2011-09-09 19:03:19 +00:00
Daniel Collins
8e06150325
Completed changes to allow for separate router processes.
2011-09-09 18:36:52 +00:00
Daniel Collins
8e5b68ab49
Fixed typo, tried to use NULL pointer.
2011-09-09 00:45:16 +00:00
Daniel Collins
6e94ae1a6b
Fixed bugs in thread termination code.
2011-09-08 23:00:52 +00:00
Daniel Collins
b3d911abea
Partial cleanup of locking code.
2011-09-08 00:20:34 +00:00
Daniel Collins
d046b6522d
Switchover to new router code
2011-09-07 20:03:16 +00:00
Daniel Collins
bcbaea33c4
New router code nearing completion.
2011-08-29 13:41:10 +00:00
Daniel Collins
2674e3356f
More code cleanup and a couple of files I forgot to add last commit.
2011-08-29 13:21:18 +00:00
Daniel Collins
8b1c53e0bd
More code cleanup
2011-08-29 13:15:10 +00:00
Daniel Collins
bbfbcb79cd
Lots of code cleanup.
2011-08-28 21:27:06 +00:00
Daniel Collins
e5271a3df6
Added (very) experimental DirectPlay support.
2011-08-28 15:56:05 +00:00
Daniel Collins
5f06b2250c
Correctly order interfaces when first interface has the force primary flag set.
2011-08-06 16:18:44 +00:00
Daniel Collins
fb68a9a593
Cleaned up logging code, added log timestamps (using GetTickCount) and changed calls in router code to prevent it from generating extra log messages.
2011-07-13 22:56:19 +00:00
Daniel Collins
c3f2dc352c
Changed Makefile to build stripped DLLs and fixed typo in ipxwrapper.c
2011-04-30 13:56:52 +00:00
Daniel Collins
9f14ffce42
Free receive buffer used by router thread in DllMain() rather than leaving 64KiB floating about every time ipxwrapper.dll is unloaded...
2011-04-24 23:49:58 +00:00
Daniel Collins
6167cdcb7e
Added code to filter out packets not received from the subnet of an enabled interface and a checkbox to enable/disable it.
2011-04-24 23:32:10 +00:00
Daniel Collins
3d72ad087d
Send broadcasts only to the bound subnet unless option is set in registry, then use INADDR_BROADCAST. Store subnet mask in ipx_nic in load_nics().
2011-04-24 21:55:57 +00:00
Daniel Collins
c2e26c7cab
Updated sendto() to only broadcast on enabled interfaces
2011-04-24 21:01:59 +00:00
Daniel Collins
7ba8d989a3
Load UDP port number from registry and only require SO_BROADCAST to be set for receiving packets when the win95 broadcast bug is enabled. (Currently enabled by default)
2011-04-24 18:44:31 +00:00
Daniel Collins
53346c2536
Updated how router thread checks packet sizes, cleaned up code
2011-04-24 16:59:21 +00:00
Daniel Collins
033c7b0752
Rewrote most of the bind() function, it (should) now match the winsock API and IPX standards better.
2011-04-24 01:23:10 +00:00
Daniel Collins
a4e0add8c7
Small amount of code cleanup
2011-04-24 00:24:10 +00:00
Daniel Collins
b11036bc14
Store IPX net/node numbers in ipx_net structure during startup.
2011-04-24 00:01:38 +00:00
Daniel Collins
4afad85e3c
Host list entries are now identified by both network AND node numbers and expire after TTL (60) seconds of not receiving any packets.
2011-04-23 23:42:14 +00:00
Daniel Collins
983265ffc0
Removed redundant values from ipx_nic structure and fixed bug in NIC list code.
2011-04-23 20:13:21 +00:00