|From:||Muhamad Ikhwan Ismail|
|Subject:||[lwip-users] The purpose of structure packing|
|Date:||Wed, 12 Dec 2007 07:00:06 +0000|
I swear i searched the mailing list before coming up with this question, and none really explains the purpose of structure packing.
My question is what is the purpose of structure packing. I at first thought lwip requires it to spare memory and
keep alignment problem away, and since I dont have much of those problem I removed all of my structure packing macros.
I am working with lwip 1.2.0.
I was checking the pbufs of the DHCP discovery packet since wireshark couldnt pickup any of the packages i transmitted.
The driver was working since the ethernet controller signals that the buffer was sent. Then I noticed that e.g in RFC that the IP header
member e.g TTL should be 8 bits long while in struct ip_hdr it is 16 bits long, and in the pbufs prior to transmission it was also 16 bits long.
Hence I assumed which is why wireshark didnt pick the package up or it was filtered by the end point ethernet controller.
I guess that this is due to the fact I removed structure packing ? Anyone with example done with a Windriver compiler ?
Thanks a lot for your replies.
Share life as it happens with the new Windows Live. Share now!
|[Prev in Thread]||Current Thread||[Next in Thread]|