|
From: | address@hidden |
Subject: | Re: [lwip-users] structure packaging |
Date: | Wed, 05 May 2010 21:00:29 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
address@hidden wrote:
Can you explain why these should be packed? Structure packing should only be necessary for protocol headers where the structures are used to describe a well-defined header layout. In contrast to this, the structures above are used internally only and thus don't need to be packed.There are some structures that are by default not packed but only work if they are packed. The following structures are: struct mem in mem.c struct pbuf in pbuf.h struct dhcp in dhcp.h Is there any reason that they are not packed by default? Because I think they should be. Has anyone had similar problems?
The only exception to this in the lwIP code currently is the struct ip_reass_helper, which is only packed to know that its size isn't enlarged by an optimizing compiler, but that's not valid for mem/pbuf/dhcp.
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |