This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: REAL meaning of little-endian and big-endian?
- From: Ashwani Mathur <mashwani at zilog dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 17 Dec 2002 03:51:05 -0700
- Subject: RE: [ECOS] REAL meaning of little-endian and big-endian?
The bit/nibble order is not affected. For more info, see link below:
http://www.byteswap.net/mikesnotes/2002/getting-started/byteorder.html
>-----Original Message-----
>From: johnsonest@hotmail.com [mailto:johnsonest@hotmail.com]
>Sent: Tuesday, December 17, 2002 9:08 AM
>To: ecos-discuss@sources.redhat.com
>Subject: [ECOS] REAL meaning of little-endian and big-endian?
>hello,every one!
> I have a "old" and "simple" question (i think like this before):
> 1 both endian mode only differ in byte order? how bit-order in one
>byte?
> 2 if differ in bit order,one byte with little-endian come from
>net,then how me(receiver host with big-endian) to read it correctlly? from
>IP processing,it simplely read it! why?
> 3 if identical in bit order,why so define:
>
>struct ip_hdr
>{
>
>#if BYTE_ORDER ==LITTLE_ENDIAN
> unsigned char ip_version;4,
> ip_hlen:4;
>#elif BYTE_ORDER ==BIG_ENDIAN
>unsigned char ip_hlen :4,
> ip_version:4;
>#endif
>
>BRS/zhangliang
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss