[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] AW: [lwip] Problems with struct member aligment within lwIP
From: |
Konrad, Guido |
Subject: |
[lwip-users] AW: [lwip] Problems with struct member aligment within lwIP |
Date: |
Wed, 08 Jan 2003 22:21:09 -0000 |
I tried it and it works partly. I've found out that all header stuff within
the stack must be packed, so TCP works only if I pack tcp_hdr as well. This
leads to some changes within the stack source code, means that I must
explicitly cast some pointers to void*.
There is an additional requirement for the http server. All data must be 2
byte aligned. But the reason for this is probably that the target ethernet
hardware supports only 16 bit access.
Guido
-----Ursprüngliche Nachricht-----
Von: Florian Schulze [mailto:address@hidden
Gesendet: Dienstag, 29. Januar 2002 21:37
An: address@hidden
Betreff: Re: [lwip] Problems with struct member aligment within lwIP
Try to pack ethip_hdr in arp.c as well. These were the only two structs I
had to
pack.
Hope this helps,
Florian
From: "Konrad, Guido" <address@hidden>
> Hi,
>
> porting lwIP to ARM7TDMI with ADS 1.1 if encounter problems with the
member
> alignement within structures. I've found the comment in arp.c to compile
the
> structure arp_hdr with __packed directive. Nevertheless it seems that some
> more structures need this. Background is that the ARM compiler always
> constructs structures with an aligment of 4! Only for structures
preceeding
> this __packed directive the alignment is 1. But this structures can not be
> carsted to non packed structures, nor casted implizitly to e.g. void*.
>
> Has anybody an answer?
>
> Regards,
>
> Guido Konrad
>
>
> [This message was sent through the lwip discussion list.]
>
[This message was sent through the lwip discussion list.]
[This message was sent through the lwip discussion list.]
- [lwip-users] AW: [lwip] Problems with struct member aligment within lwIP,
Konrad, Guido <=