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: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] 1.8.0 and network byte order
From: Mitch Davis <mjd@xxxxxxxxxx>
Date: Thu, 04 Mar 1999 10:41:50 +1100

David Pfitzner wrote:
> 
> ?? 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 ?

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

If the network byte order is wrong, then won't the major
version of the protocol in the first packet be 0x01000000
instead of 0x00000001?  This seems like an easy way to
check.  We could then set a flag such that the single return
packet is modified accordingly so the other side would know
why it was being rejected.

Regards,

Mitch.
--
| mailto:mjd@xxxxxxxxxx       | Not the official view of: |
| mailto:mjd@xxxxxxxxxxxxxxxx | Australian Calculator Opn |
| Certified Linux Evangelist! | Hewlett Packard Australia |

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