Message Type
	253	sendlogon()
	254	sendlogon() acknowledgement
	255	sendlogoff()


int initmultiplayers(char damultioption, char dacomrateoption, char dapriority)

void uninitmultiplayers(void)

void sendpacket(long other, char *bufptr, long messleng)
   other - who to send the packet to
   	<0  = broadcast
   	>=0 = a specific connection #
   bufptr - pointer to message to send
   messleng - length of message

short getpacket (short *other, char *bufptr)
   returns the number of bytes of the packet received, 0 if no packet
   other - who the packet was received from
   bufptr - pointer to message that was received

void sendlogon(void)

void sendlogoff(void)

int getoutputcirclesize(void)

void flushpackets(void)





struct sockaddr_in playeraddress[MAXPLAYERS];
short connecthead, connectpoint2[MAXPLAYERS];




The way Build works now, a connecting player broadcasts a logon message
across the entire LAN. Everybody sees this and sends back a response to the
player, and also broadcasts it to the LAN as well.

Broadcasts don't work on the Internet. To counteract this I propose this
method of workaround:

1) The connecting player connects to any of the currently joined players.
   Until the game actually gets started there is no master while everyone
   is building their player lists.
2) NAT will make for some serious pain in determining the IP of the gateway.
   The game port will have to be forwarded through the gateway anyway, but
   this doesn't eliminate the problem of not knowing the world-visible
   address. So, if a player connects to an already joined player, and sends an
   address in the logon packet of 0xFFFFFFFF, then the player being
   connected to should rewrite the 0xFFFFFFFF with the true address it sees
   of that player and then forward the connect message onwards to everyone in
   its player list. Since the 0xFFFFFFFF is now gone, the rest of the games
   can set up their player lists accordingly and send their responses to the
   NATted host.
3) Once the game gets underway, Internet play should force networking mode 0.
   In a LAN environment mode 1 can be used where appropriate.

If the game is in a LAN environment, then step 2 can be reduced to just this:

2) The player being connected to should then forward the connect message
   onwards to everyone in its player list. The rest of the games can set up
   their player lists accordingly and send their responses to connecting host.
   
(Basically, the 0xFFFFFFFF is set to the address of the interface instead)
