Commit Graph

7 Commits

Author SHA1 Message Date
Kevin Shanahan
816b3e14ad net: move some common functions out of net_{udp,wins}.c files
Start moving some of the non-OS dependent bits of the net files into a
common shared file. Start with AddrCompare and Get/SetSocketPort.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-04 13:47:40 +10:30
Kevin Shanahan
4fa7d2fbc4 net: make network data buffer parameters 'void *' and remove some casts
No advantage really to declaring the data buffer to be of type 'byte *', just
clutters up the rest of the source with unnecessary casts to keep the compiler
quiet.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-04 08:54:40 +10:30
Kevin Shanahan
0a3dad078f net: make the net driver sepecify the mtu of a qsocket
Get the "net driver" to specify the qsocket mtu when it returns a new
socket.

Ideally the driver could later even incorporate probing for MTU and
try adjusting downwards if packets don't get through, etc. Unlikely
that will ever be important enough though.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-03 19:59:41 +10:30
Kevin Shanahan
e71e7cc26e net: Replace nq's qsockaddr with same netadr_t structure used in qw
The struct qsockaddr used in NQ assumes some things about the binary
comptibility with the OS struct sockaddr_in, which caused some problems
with the networking on at least OpenBSD.  Use the same netadr_t structure
that we currently have in QW.

Would have been nice to split this into smaller sub-patches, but it just
got messy each time I tried to do that.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 13:34:49 +10:30
Kevin Shanahan
c1ed8eecf4 net: remove unused StringToAddr functions
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-07 16:50:23 +10:30
Kevin Shanahan
f4b25a0d94 net: remove Connect from the landriver operations struct
All our LAN protocols (just IPv4 UDP) are connectionless, so remove the
connect operation completely from the code.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-07 16:50:23 +10:30
Tyrann
130e22195a Import v0.47 sources 2006-09-10 19:02:51 +09:30