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

98 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
d582e27e3e Added missing initialisations of ipx_socket.addr.sa_family.
Field not used internally, but returned by getsockname() which can lead to
whatever we're wrapping trying to use an invalid family later.
2015-07-11 17:00:10 +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
7c19414c37 Use appropriate MTU for packet size limits. 2014-04-18 14:45:11 +01:00
Daniel Collins
c69aac3586 Don't allow creating SPX sockets when using Ethernet encapsulation. 2014-04-18 14:45:09 +01:00
Daniel Collins
ab62a68187 Implemented support for sending real (Ethernet II) IPX frames. 2014-04-18 14:44:59 +01:00
Daniel Collins
e5315890fd Use GetTickCount64() for connect timeouts where available. 2014-01-25 23:34:33 +00:00
Daniel Collins
880024b8c8 Added workarounds for Jane's Combat Simulations: WWWII Fighters 2014-01-25 23:16:47 +00:00
Daniel Collins
85edba72c4 Add extra debug output in setsockopt and closesocket. 2014-01-25 23:14:46 +00:00
Daniel Collins
3be40b6e63 Bodge asynchronous connects to almost work as they should. 2014-01-25 23:14:46 +00:00
Daniel Collins
7c83726b14 Refactored EnumProtocols and added SPX protocols. 2014-01-25 23:12:48 +00:00
Daniel Collins
018c66873f Fixed segfault in recvfrom when called with NULL addrlen. 2014-01-25 22:32:27 +00:00
Daniel Collins
34ae708491 Updated sendto to work with SPX sockets. 2014-01-25 22:32:27 +00:00
Daniel Collins
33071b40dd Initialise ptype of IPX sockets correctly. 2014-01-25 22:32:26 +00:00
Daniel Collins
d98c830877 Updated bind to work with SPX sockets. 2014-01-25 22:32:25 +00:00
Daniel Collins
ef65d64edc Updated WSARecvEx to work with SPX sockets. 2014-01-25 22:32:25 +00:00
Daniel Collins
714543fac5 Updated recvform to work with SPX sockets. 2014-01-25 22:32:25 +00:00
Daniel Collins
499bb4659c Updated recv to work with SPX sockets. 2014-01-25 22:32:24 +00:00
Daniel Collins
e31d0d51a9 Updated send to work with SPX sockets. 2014-01-25 22:32:24 +00:00
Daniel Collins
938d95a450 Implemented accept function. 2014-01-25 22:32:23 +00:00
Daniel Collins
9114f0fb88 Updated connect to work with SPX sockets. 2014-01-25 22:32:19 +00:00
Daniel Collins
b408f4e4e9 Implemented listen function. 2014-01-12 00:26:29 +00:00
Daniel Collins
0819a324c1 Refactored address table code.
- Use process+socket as key rather than local port number.

- Store socket protocol in table.

- Removed ADDR_TABLE_ENTRY_REUSE flag.
2014-01-12 00:25:10 +00:00
Daniel Collins
6c2a93e542 Updated ioctlsocket to work with SPX sockets. 2014-01-12 00:25:09 +00:00
Daniel Collins
ae2837258f Updated shutdown to work with SPX sockets. 2014-01-12 00:07:58 +00:00
Daniel Collins
94d3a6cbbd Create SPX (TCP) sockets when requested. 2014-01-12 00:07:57 +00:00
Daniel Collins
68d13baac2 Allow address sharing when the existing socket doesn't have SO_REUSEADDR.
The IPX/SPX protocol versions in 98/2000/XP only require the second socket to
have SO_REUSEADDR when attempting to bind to an already-used address. The state
of the option on the first socket is ignored.

The ADDR_TABLE_ENTRY_REUSE flag is kept and set on all sockets in the address
table to keep compatibility with previous versions.
2014-01-12 00:07:52 +00:00
Daniel Collins
8cf1f4eaa4 More detailed debug messages when sending packets. 2012-12-01 14:09:02 +00:00
Daniel Collins
b453669229 Cleaned up most of the winsock code and removed the RETURN/RETURN_WSA macros. 2012-11-11 22:21:22 +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
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
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
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
0f6c458bcc Implemented new address cache. 2012-10-20 18:06:11 +00:00
Daniel Collins
97b303822d Fixed a deadlock. 2012-07-22 19:29:39 +00:00
Daniel Collins
f000b16d03 Fixed bug causing closesocket() to crash if used on the oldest existing IPX socket when newer ones exist. 2012-07-21 23:30:22 +00:00
Daniel Collins
23c934c192 Added some debug messages 2012-05-09 23:35:21 +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
4340e3f5b2 Bugfix: Don't choke on rpacket_header in ioctlsocket/FIONREAD. 2011-11-13 02:12:39 +00:00
Daniel Collins
57131bb5ff Bugfixes: Correctly check for broadcast address and set sa_flags when dealing with extended addresses. 2011-11-13 01:45:32 +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
33b3e39a98 Added warning when unknown NSPROTO_IPX socket options are used and updated changelog. 2011-09-28 22:05:36 +00:00
Daniel Collins
5d1c56e5f1 Implemented IPX_EXTENDED_ADDRESS socket option. 2011-09-28 21:49:31 +00:00