[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] DHCP issues....problem found; how do I solve it?
From: |
Leon Woestenberg |
Subject: |
Re: [lwip-users] DHCP issues....problem found; how do I solve it? |
Date: |
Sun, 30 Nov 2003 20:44:12 +0100 |
Hello Tom
----- Original Message -----
From: "Tom C. Barker" <address@hidden>
To: "'Mailing list for lwIP users'" <address@hidden>
Sent: Wednesday, November 26, 2003 1:09 AM
Subject: [lwip-users] DHCP issues....problem found; how do I solve it?
> The issue of malformed packets is that on the Coldfire5282,
> the transmit buffer must be 4-byte aligned.
>
> I confirmed the proper working of DHCP by creating a 4-byte
> aligned buffer and then doing a memcpy every time (ugh!) in
> low_level_output: this idea fails in many areas but proves that
> DHCP is working just fine.
>
> How do I align _any_ packet so that after the TCP/UDP and IP
> headers are tacked on, I end up with a 4-byte aligned buffer?
>
> Anybody got an idea (shy of a total rewrite)? Hopefully I have
> overlooked something....
>
Have you tried setting this define to 4?
/* ---------- Memory options ---------- */
/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
byte alignment -> define MEM_ALIGNMENT to 2. */
#define MEM_ALIGNMENT 4
Let us know if this works, thanks,
Leon.