lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Misalignment problems on PowerPC (little endian mode)


From: address@hidden
Subject: Re: [lwip-users] Misalignment problems on PowerPC (little endian mode)
Date: Fri, 09 May 2008 17:30:10 +0200
User-agent: Thunderbird 2.0.0.14 (Macintosh/20080421)

Muhamad Ikhwan Ismail wrote:

Hi,

Thanks Bill and Simon. Simon is right, my payload is aligned. The problem arises when the Ethernet header gets stripped, the IP addr field is not aligned when it gets accessed. And I didnt know structure packing is a must. Then I have to find a way to make my port works. Meaning even if i fixed my ip addr processing macros and functions, Ill still get problems ?
I'm not sure but I think so, yeah. The reason is the same reason 'network byte order' is used: when you exchange data over the network, everyone would have to use the same alignment. Instead, packing is used.
I thought i woulnt since all e.g TCP header fields are 2 bytes aligned ?
At least DNS had a problem with non-packed mode, I think. DHCP could have problems, too...

Simon




reply via email to

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