lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-users] The purpose of structure packing


From: Grubb, Jared
Subject: RE: [lwip-users] The purpose of structure packing
Date: Wed, 12 Dec 2007 09:42:40 -0800

ip_hdr._ttl_proto is 16 bits long, but this includes both the TTL and the protocol bits.


Jared

 

From: address@hidden [mailto:address@hidden On Behalf Of Muhamad Ikhwan Ismail
Sent: Tuesday, December 11, 2007 23:00
To: address@hidden
Subject: [lwip-users] The purpose of structure packing

 

Hi,
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.

Greetings
M Ikhwan

 


Share life as it happens with the new Windows Live. Share now!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]