Complete.Org: Mailing Lists: Archives: freeciv-dev: March 1999:
Re: [Freeciv-Dev] 1.8.0 and network byte order
Home

Re: [Freeciv-Dev] 1.8.0 and network byte order

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] 1.8.0 and network byte order
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Thu, 4 Mar 1999 08:44:05 +1100

Nicolas Brunel wrote:

> I tried Trent Patch on my computer.
> 
> 'old' server vs network order client
> -> Client can connect but game can't start
> > 0: lost connection to unknown is displayed when
> the client disconnect.
> 
> Looking at the code, it 's like the player isn't really connected nor
> rejected from the game !

Yeah, I got the same thing, but didn't have time to
work out why.

> 'old' client vs network order server.
> It works fine !?? ( a few seconds game )

?? Both ways (mismatched byte orders) I got sort of a 
connection (at least no clean disconnect) but of course 
things don't actually work from then on.

> Can someone think of a trick to detect non network byte order packets ?

Part of the problem may be that the packet _length_
(for every packet) is encoded with a 16 bit int which 
is affected by byte order, and I don't think the packet 
handling code checks for weird lengths, so may get
very confused.

If we can detect the byte order of the other end of 
the connection, it should be possible to put a flag in
the connection struct and then byte-swap all gets/puts
for that connection?  At least so that a new server can
send appropriate failure notices to old clients.

-- David

[Prev in Thread] Current Thread [Next in Thread]