From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn To: "Trenton D. Adams" Cc: eCos Disuss Subject: Re: [ECOS] Network programming for eCos under linux Date: Wed, 08 Aug 2001 08:21:00 -0000 Message-id: <20010808172107.B3798@biferten.ma.tech.ascom.ch> References: <20010808093506.B3658@biferten.ma.tech.ascom.ch> <000901c1201a$5c7e1590$090110ac@TRENT> X-SW-Source: 2001-08/msg00233.html > This shouldn't pose a problem since I've configured my ARM as > little-endian. However, htons (), htonl (), etc should solve that > problem anyhow, shouldn't it? I mean as far networking code goes that > is. I would obviously have to be careful about data types between the > two if they were different. It's nice to have the ARM with 32-bit > little-endian! Makes my life a lot easier since I'm sending data to a > PC. The problem is, if your machines both use the same endianness, you never know when you have missed out a htons(). If they are different endianness, it breaks. That why i like to write network code on a mixed Solaris & linux network, just to make sure. Andrew