[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #36471] ppp_oe.c is using sizeof(struct eth_hdr) inste
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [bug #36471] ppp_oe.c is using sizeof(struct eth_hdr) instead of SIZEOF_ETH_HDR |
Date: |
Tue, 15 May 2012 19:55:42 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:12.0) Gecko/20100101 Firefox/12.0 |
Follow-up Comment #1, bug #36471 (project lwip):
I don't think it makes a difference. If you look at the definition of struct
eth_hdr in etharp.h, you see it already includes an u8_t array of ETH_PAD_SIZE
(before the actual header). Being like that, sizeof(struct eth_hdr) and
ETH_PAD_SIZE should yield the same values.
Actually, I don't know myself what should be the difference between those two.
Using ETH_PAD_SIZE has the advantage of giving a correct result if your
compiler doesn't support structure packing. But then again, using such a
compiler, lwIP won't work anyway... But maybe this was the original author's
intention.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?36471>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.nongnu.org/