[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] struct packing
From: |
Adam Dunkels |
Subject: |
[lwip-users] Re: [lwip] struct packing |
Date: |
Wed, 08 Jan 2003 23:10:20 -0000 |
Hi James!
On Wednesday 20 February 2002 00.26, you wrote:
> 1. struct packing
Ok, so GCC needs an extra __attribute__ ((packed)) at the end of the structs.
Another #define PACK_STRUCT_STRUCT should be added then, like this:
struct foo {
PACK_STRUCT_FIELD(struct x bar);
} PACK_STRUCT_STRUCT;
> 2. more packing:
>
> After I have added the extra attribute to the structs, the
> ethernet frame is recognized as an IP packet with correct version number
> etc. I suspect that there are other structs to be packed. lwIP sends
> continuous arp requests for the ip address on its own default interface.
>
> Should I try to repack the ethernet frame from within the 8900a
> driver? Would I have to re-pack differently for each ip or arp packet
> type, or can it be generalized to 2 cases?
The only structs that needs to be packed are those that define protocol
headers. I'll add the packet attribute to all protocol header structs in the
next lwIP version.
/adam
--
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] Re: [lwip] struct packing,
Adam Dunkels <=