Bill Currie
beb0b9e0fc
Fix a segfault when no interfaces are available.
2012-09-08 09:37:48 +09:00
Bill Currie
bf41851bd9
Check for ioctl availability.
...
This gets networking compiling. Now the build gets all the way to qfcc,
where it dies with waidpid/execvp errors :P
2012-08-18 22:02:02 +09:00
Bill Currie
575693e4a0
A bunch of networking compile fixes.
...
This isn't everything needed to get networking compiling, but it's pretty
close.
2012-08-18 21:49:30 +09:00
Bill Currie
bc1b483525
Nuke the rcsid stuff.
...
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie
cef004fc15
Fix a type mismatch on android.
2012-02-05 14:28:23 +09:00
Bill Currie
1c82956dd7
net_udp.c FIONREAD fix from Ozkan Sezer.
...
net_udp.c: Fixed FIONREAD ioctl to take an int* argument instead of an
unsigned long*.
2011-12-08 21:50:55 +09:00
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
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
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
76f894a29f
Add some debug prints for nq networking.
2011-08-02 15:22:57 +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
1d57477101
Document the "public" functions of NQ's networking code.
2011-07-26 14:15:41 +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
b14fcccd8f
get qf compiling with gcc 4.4
2009-12-19 10:54:23 +00:00
Bill Currie
2b81eaea6c
console.h include cleanup
2007-11-06 12:40:38 +00:00
Bill Currie
d66934942d
nuke Con_Printf and Con_DPrintf and use Sys_* instead
2007-11-06 10:17:14 +00:00
Bill Currie
87cc09233c
"long" audit. can't use long when we want 32 bits. May be a few more cases.
2005-10-23 13:19:21 +00:00
Bill Currie
3fb03fc2be
hah, should have been using __attribute__((used)) all that time (rather
...
than __attribute__((unused))). fixes the missing console in -x11
2005-08-04 15:27:09 +00:00
Bill Currie
e10e2be1e3
get the len types right rather than guessing
2005-06-08 08:49:54 +00:00
Bill Currie
501180aaac
gcc-4.0 fixes. even found some bugs :) (names /not/ mangled this time)
2005-06-08 06:35:48 +00:00
Bill Currie
c4feb0e0d6
attempt to get the external ip address from the system rather than relying
...
on hostname as hostname might resolve to 127.0.0.1, which isn't good for
trying to play networked games. if the attempt fails, fall back to the
hostname method
2005-04-27 03:34:38 +00:00
Bill Currie
4f66e1e9da
fix a bunch of the previous FIXMEs. needs a bit more work for win32
...
compiling
2003-07-08 22:39:45 +00:00
Bill Currie
dddf045221
put "FIXME: overflow" on all the char arrays I could find that weren't
...
obviously safe
2003-07-08 20:11:10 +00:00
Ragnvald Maartmann-Moe IV
2630ed1adf
More informative UDP setup failure messages.
2003-06-26 20:24:47 +00:00
Bill Currie
21d8b4f8dc
link in hw, move the qw and nq networking code into libs/net and make
...
hw-master use libnetchan. there are evil include hacks that will need to be
taken care of in net*.[ch]
2003-02-11 22:48:57 +00:00