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
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
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
412a4c3932
Implemented getpeername function.
2011-09-15 18:59:23 +00:00
Daniel Collins
3924db36b8
Implemented send function.
2011-09-15 18:53:31 +00:00
Daniel Collins
390663ba83
Implemented connect function.
2011-09-15 18:47:31 +00:00
Daniel Collins
18fda2a86c
Correctly store protocol names at the end of the EnumProtocols buffer.
...
Added Windows 98 WSHEnumProtocols function.
2011-09-15 15:21:57 +00:00
Daniel Collins
6fff1e839c
Only call rclient_ functions on bound sockets and handle IPX_RECV/IPX_FILTER flags when binding.
2011-09-15 01:02:20 +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
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
431d0b8047
Began cleanup/overhaul of DirectPlay service provider. Removed last of the "extended bind" kludge implemented for previous code.
2011-09-08 18:42:27 +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
b3d911abea
Partial cleanup of locking code.
2011-09-08 00:20:34 +00:00
Daniel Collins
3c9d1870c8
Merged EnumProtocolsA and EnumProtocolsW into a single function.
2011-09-07 23:29:14 +00:00
Daniel Collins
dd1a6d3b02
Cleaned up some winsock includes, changed EnumProtocolsW to use correct PROTOCOL_INFO structure.
2011-09-07 23:03:14 +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
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
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
6a288558b0
Fixed undefined behaviour warning from typo.
2011-07-12 13:28:57 +00:00
Daniel Collins
81c54ce285
Changed debug messages in socket/closesocket.
2011-07-09 02:20:46 +00:00
Daniel Collins
4646bfd6c8
Updated recv_packet to be usable in WSARecvEx.
2011-05-30 03:33:39 +00:00
Daniel Collins
cbf1dad417
Moved most of code from recv and recvfrom into recv_packet to save on duplicate code, remove potential deadlock from recv in the process.
2011-05-30 02:44:17 +00:00