Bill Currie
5c9ab2832f
Fix win32 cross-building.
...
No idea if the code actually works :(
2011-09-04 09:48:16 +09:00
Bill Currie
e50f0e18ba
Make netmain use netadr_t, same as netchan.
...
Having sockaddr and friends in a header file was bad news for portability
(especially windows).
2011-09-04 09:45:19 +09:00
Bill Currie
5ee01879ec
Missed a spot for net_family.
2011-09-03 16:28:00 +09:00
Bill Currie
80b2b82092
Add a cvar to control the address family.
...
OpenBSD doesn't allow mixed binding of ipv4 and ipv6, but being able to use
ipv6 enabled qf with ipv4 addresses would be nice...
2011-09-03 13:04:47 +09:00
Bill Currie
29a52a8cc8
FIx it for IPv4, too.
...
Oops, I forgot about that :P
2011-08-31 18:32:47 +09:00
Bill Currie
bfcdc5ed17
Fix qw networking on OpenBSD.
...
OpenBSD is very picky about the address size, but does provide sa_len and
friends to make life easier. Use them as appropriate :)
2011-08-31 18:07:41 +09:00
Bill Currie
0d5bebabe2
Replace qsockaddr with AF_address_t.
...
It seems qsockaddr's assumptions aren't necessarily portable, as OpenBSD
seems to be doing weird things with qsa_family. Even if that's not the
case, this is cleaner.
2011-08-24 09:14:02 +09:00
Jeff Teunissen
1cc2b1b178
whitespace
2011-08-23 01:39:40 -04:00
Jeff Teunissen
d2fa1e2479
QW IPv6: lose a pointless assign
...
We already assign a->family earlier, no need to do it again.
2011-08-23 01:39:40 -04:00
Bill Currie
87ad73f146
Add even more info to the address comparison failure.
...
It turns out the family check is failing. Why?
2011-08-22 18:34:52 +09:00
Bill Currie
ce07000054
Make the address comparison a little more informative.
...
Still hunting the openbsd connection issues. It seems the address
comparision isn't working.
2011-08-22 10:30:35 +09:00
Bill Currie
53049e33eb
Make the interface code more portable.
...
It turns out SIOCGIFINDEX isn't (readily?) available in BSD, but
if_nametoindex() is defined by posix, so use that instead.
2011-08-16 10:03:43 +09:00
Bill Currie
4cec4b9f96
Rewrite the interface detection code.
...
Turns out SIOCGIFCONF is rather painful to get working cross-platform. This
should work better, and can be used even with ipv6 :)
2011-08-11 18:32:39 +09:00
Bill Currie
805256ff65
Use the last used interface address for the socket address.
...
This allows the correct address to be put in the server info packet
allowing nq to work on multi-homed hosts. More testing needs to be done to
ensure nothing is broken, or better yet, a rewrite of the networking code
to properly associate the information with the packets.
2011-08-06 21:47:57 +09:00
Bill Currie
ae9404cc27
Obtain the interface on which the packet arrived.
...
Once I sort out just how to get the information to the right place, this
should fix a lot of the problems with nq on multi-homed nodes.
2011-08-06 20:33:20 +09:00
Bill Currie
3088566502
Replace get_address() with get_iface_list().
2011-08-06 18:57:53 +09:00
Bill Currie
6f0ab844ea
Some more nq networking debug prints.
2011-08-06 16:54:01 +09:00
Bill Currie
eba66b1dde
Doc tweaks and some whitespace.
2011-08-02 17:32:36 +09:00
Bill Currie
76f894a29f
Add some debug prints for nq networking.
2011-08-02 15:22:57 +09:00
Bill Currie
e5876752f3
Document the datagram net driver interface.
2011-08-02 15:22:33 +09:00
Bill Currie
8e140bc97e
Use SYS_NET instead of SYS_DEV for networking debug prints.
2011-07-30 17:44:03 +09:00
Bill Currie
77dcd07b37
Remove a dead function.
2011-07-29 14:30:54 +09:00
Bill Currie
50341d0972
Whitespace.
2011-07-29 13:51:58 +09:00
Bill Currie
07d5b114bc
Clean out some dead code and variables.
...
We haven't had serial or ipx support for a long time.
2011-07-29 10:11:14 +09:00
Bill Currie
1d57477101
Document the "public" functions of NQ's networking code.
2011-07-26 14:15:41 +09:00
Bill Currie
64881d2eca
Finish the docs for netchan.
...
Also clean out some unnecessary declarations.
2011-07-26 11:30:02 +09:00
Bill Currie
688e5c7e24
Use ncqport_e on the right field.
...
Well, now, that was incredibly silly, wasn't it? :P
2011-07-23 21:39:13 +09:00
Bill Currie
3678b610eb
Make a start on documenting netchan.
2011-07-23 17:53:06 +09:00
Bill Currie
2035e65bad
Make the qport flags a little more doc friendly.
2011-07-23 17:51:07 +09:00
Bill Currie
e15771f4a4
Nuke a dead function.
2011-07-23 15:58:45 +09:00
Bill Currie
b17e37f802
Remove uneccessary differences between ip4 and ip6 code
2011-07-23 15:58:45 +09:00
Bill Currie
0f7390dd60
Clean up all the "set but not used" warnings.
...
gcc on my system is failing to treat this specific warning as an error :/
2011-06-19 10:48:02 +09:00
Bill Currie
74a7e07dfc
Use AM_CFLAGS instead of CFLAGS.
...
CFLAGS is meant to be reserved for the user.
2011-05-10 12:44:44 +09:00
Jeff Teunissen
999252c07a
Fix the same (ancient!) bug in ipv4 code...
...
Don't read the address of the peer until we know we've actually read
a packet.
2010-12-30 07:15:22 -05:00
Jeff Teunissen
1b23c470cb
Fix unknown family msgs
...
Found the source of all the bogus "unknown address family" messages --
reading the returned address of an errored read. D'oh!
2010-12-30 06:38:20 -05:00
Jeff Teunissen
9e0575313e
Net debugging
...
Add a SYS_NET developer mask for debugging network, and use it.
2010-12-30 05:01:58 -05:00
Jeff Teunissen
e96cbbdbd9
Captain Whitespace(tm) is back.
...
Don't judge me... :)
2010-12-30 04:58:49 -05:00
Jeff Teunissen
5cfce584c9
ipv4 formatting changes
...
IPv4 addresses should be formatted identically to how we're used to seeing
them, without the brackets that denote an IPv6 address and separate it from
the port specification.
2010-12-30 04:46:44 -05:00
Jeff Teunissen
e7462d025f
Call freeaddrinfo() when done with the address info.
2010-12-30 04:34:15 -05:00
Jeff Teunissen
e89fb3a868
Nuke a structure I didn't need.
2010-12-30 04:30:16 -05:00
Jeff Teunissen
0a21f6a6df
Move a comment where it belongs
2010-12-30 03:43:46 -05:00
Jeff Teunissen
87dd61a6f8
Fix IPv4 interaction
...
Can now talk to IPv4 hosts again.
2010-12-30 03:42:22 -05:00
Jeff Teunissen
878a9cfb6a
ipv6: builds and works now, still can't interact with ipv4 clients/servers
2010-12-29 07:47:15 -05:00
Jeff Teunissen
fdb4d885ae
ipv6: start cleaning up strict-aliasing problems.
2010-12-29 06:58:14 -05:00
Jeff Teunissen
cdf5ef2565
ipv6: Fix glibc defines
2010-12-29 06:36:43 -05:00
Bill Currie
de04e1b602
Lots of win32 (mingw cross) build fixes.
...
HTTP (curl) support is missing, but everything else builds.
2010-12-23 11:40:16 +09:00
Bill Currie
8c4fe2f844
Rename Sys_DPrintf to Sys_MaskPrintf.
...
We now have finer runtime control over what gets printed. Need to do a
SYS_DEV audit, creating new masks as apropriate.
2010-11-26 16:19:26 +09:00
Bill Currie
d4ae231f34
sezero's NET_SendToAll fix
...
Here's a patch to NET_SendToAll() which was always
broken: it never skipped non-connected clients.
Depending on the compiler, it would wait the whole
5 seconds of its blocktime before it gave up.
While there, changed its blocktime argument to
double (the comparison is against a double.)
2010-11-21 14:27:43 +09:00
Bill Currie
0dfff8fd58
ignore stuff
2010-08-07 10:42:09 +00:00
Bill Currie
eb636ea16f
win32 fixes and vc2008 build files from phrosty
2010-03-12 10:51:07 +00:00