lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Re: [lwip] Anyone Using An Architecture That Isn't little


From: Shaun Jackman
Subject: [lwip-users] Re: [lwip] Anyone Using An Architecture That Isn't little or big endian?
Date: Thu, 09 Jan 2003 02:26:13 -0000

The byte swapping cannot be done in the device driver because it has 
no way of knowing which bytes must be swapped (without inspecting the 
packet for its type, which is not generic). Keep in mind single-byte 
fields are not swapped, and short and long fields are swapped in 
different manners. The device driver cannot know that the packet may 
potentially consist of entirely single-byte fields, in which case no 
swapping would be necessary.

I've heard of mixed-endian systems, but I don't think any are in 
current usage.

Cheers,
Shaun

> Maybe I'm missing something, but it seems to me that all of the
> little/big endian conversions in the stack can be eliminated if the
> required byte swapping is done in the device driver just before the
> bytes are sent to the network device.  Does this make sense, or am
> I way off?
[This message was sent through the lwip discussion list.]




reply via email to

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