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>
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>
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>
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>
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>