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

51 Commits

Author SHA1 Message Date
Daniel Collins
20a636b933 Implemented support for Novell "raw" Ethernet frames.
Manual selection of frame type (defaults to Ethernet II) only, don't want to
mess with trying to guess/detect the frame type right now.
2017-03-27 23:51:54 +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
3c13aab8e5 Accept IPX packets with a destination network of 00:00:00:00.
Unless configured otherwise, the Windows IPX driver defaults to misusing this on
the wire until it sees a packet with a different network number, at which point
it switches to using that until reboot.
2014-05-29 23:35:25 +01:00
Daniel Collins
098cb76ff4 Fix dropping of broadcast packets in some situations.
...by which I mean make it drop the packets depending on the socket options of
the receiving socket.
2014-05-29 23:32:24 +01:00
Daniel Collins
ecda2ba0a4 Fix testing of source address in UDP-encapsulated unicast packets. 2014-04-20 17:26:23 +01:00
Daniel Collins
79d41c0001 Don't open unnecessary UDP sockets when using Ethernet encapsulation.
Don't need the shared UDP socket at all and the private is only used for sending
packets to the local emulated sockets.
2014-04-20 17:24:51 +01:00
Daniel Collins
5d9a3cb143 Allocate the UDP socket recv buffer on the stack.
Default (per-thread) stack limit on Windows is 1MB, this buffer may shrink in
the future but will never grow.
2014-04-20 14:05:21 +01:00
Daniel Collins
35d853ae54 Implemented support for receiving real (Ethernet II) IPX frames. 2014-04-18 14:45:07 +01:00
Daniel Collins
41637269fb Refactored IPX packet delivery. 2014-04-18 14:45:06 +01:00
Daniel Collins
8786088252 Implemented SPX address resolution in router.
The router will search the socket table of the process for a listening SPX
socket with the correct address when a special packet is received.
2014-01-12 00:34:26 +00:00
Daniel Collins
2ad2707f89 Filter out SPX sockets when relaying IPX packets. 2014-01-12 00:25:09 +00:00
Daniel Collins
3558f2196e Periodically update the address table and correctly remove entries. 2012-11-18 18:29:05 +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
1f77b0f90e Removed bcast_all, src_filter and iface_mode options. The former two are now
implemented by the wildcard interface.
2012-11-10 22:24:47 +00:00
Daniel Collins
076792d94b Removed IP address fields from router_addr structure. 2012-11-03 23:13:53 +00:00
Daniel Collins
2dd19ce6d7 Perform source address filtering using the IPs registered with the IPX interface
of the target address rather than the one in the router_addr structure.

Bugfix: Don't overwrite packet IP address on first relay.
2012-11-03 23:07:42 +00:00
Daniel Collins
f72e88ea34 Iterate over interface broadcast addresses in sendto rather than storing a
single address in ipx_socket during router bind.
2012-11-03 12:57:34 +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
ebcf1673e2 REFACTOR ALL THE THINGS. 2012-10-21 10:26:52 +00:00
Daniel Collins
c836c55ee4 Implemented function for formatting complete IPX addresses as strings.
Bugfix: mkstubs.pl used wrong DLL number for calls to log_call.
2012-10-20 19:21:59 +00:00
Daniel Collins
97b303822d Fixed a deadlock. 2012-07-22 19:29:39 +00:00
Daniel Collins
e7c6358044 Updated logging API. 2011-11-16 21:32:59 +00:00
Daniel Collins
225f46948b Added some extra log messages for debugging. 2011-11-13 18:31:22 +00:00
Daniel Collins
7c822c97b6 Tweaked some code and updated changelog. 2011-09-21 21:57:28 +00:00
Daniel Collins
8820b7d478 Correctly initialise router_addr.remote_addr, use correct width for rpacket_header.src_ip and correctly set router copy of socket flags. 2011-09-19 23:49:16 +00:00
Daniel Collins
93ce7e3ea7 Fix segfault. 2011-09-19 22:14:19 +00:00
Daniel Collins
a8a700b6f2 Added option to change router control port. 2011-09-19 00:43:16 +00:00
Daniel Collins
fd555ce7c2 Implemented IPX_RECEIVE_BROADCAST option, updated router/rclient API and added proper checks when receiving broadcast packets to the router main loop. 2011-09-17 23:47:31 +00:00
Daniel Collins
646ab3b011 Reduced packet data limit to 8192 bytes, the standard driver included with XP only supports 1467 anyway. 2011-09-17 19:54:53 +00:00
Daniel Collins
f560fae7ad Added header to packets sent from router to loopback sockets. 2011-09-17 19:17:13 +00:00
Daniel Collins
390663ba83 Implemented connect function. 2011-09-15 18:47:31 +00:00
Daniel Collins
9ac1da252a Store IP address and netmask in router_addr structure and check each packet originates from the bound interface rather than testing against all IPX interfaces. 2011-09-11 16:58:04 +00:00
Daniel Collins
e91121bf02 Bugfix: router_bind() didn't set ->next properly, lost any existing binds. 2011-09-11 14:38:12 +00:00
Daniel Collins
ee30a6200f Some bugfixes in the DirectPlay service provider code. 2011-09-11 12:03:38 +00:00
Daniel Collins
616859cc13 Treat connection reset in router code as proper disconnect. 2011-09-10 11:46:09 +00:00
Daniel Collins
b8c366a5ed Code cleanup 2011-09-09 22:29:38 +00:00
Daniel Collins
5b77e23815 Bugfixes and cleanup in router code. 2011-09-09 22:10:32 +00:00
Daniel Collins
8e06150325 Completed changes to allow for separate router processes. 2011-09-09 18:36:52 +00:00
Daniel Collins
11af1ba5d5 Added call handling to router code 2011-09-09 17:38:57 +00:00
Daniel Collins
6d6ac5f2c3 Listen for and accept/close client connections in router code. 2011-09-09 15:50:55 +00:00
Daniel Collins
81ebe2191d Added standalone router executable, currently useless since the router code doesn't support running in another process. 2011-09-08 23:28:36 +00:00
Daniel Collins
b1828e0958 Implemented proper SO_REUSEADDR support and fixed getsockopt to return proper value when SOL_SOCKET/SO_BROADCAST is requested. 2011-09-08 18:28:01 +00:00
Daniel Collins
0b73241fe8 Check packet size and cache source IP in recv_packet. Destination network number is replaced with the source IP of the packet by the router thread. 2011-09-07 20:37:18 +00:00
Daniel Collins
d046b6522d Switchover to new router code 2011-09-07 20:03:16 +00:00
Daniel Collins
37e9db8fba New router code on verge of completion 2011-08-29 13:58:45 +00:00
Daniel Collins
bcbaea33c4 New router code nearing completion. 2011-08-29 13:41:10 +00:00
Daniel Collins
1a54e5208d More work on new router code. 2011-08-29 10:57:19 +00:00