Hi All
I don't have a strong opinion one way or the other about removing the packing
macros, but I wanted to reply to one point:
The macros will have to remain in the code for the Ethernet
ARP header, if I understand that correctly, so it really
isn't worth worrying about.
This is no longer correct. Since the sipaddr and dipaddr fields were changed
from struct ip_addr to struct ip_addr2, they now only have 16-bit alignment
requirements (this is why they were changed) ...
... so long as compilers don't try to insert padding before and after struct A
in struct B in the following example:
struct A {
u16_t x[2];
};
struct B {
u16_t p;
struct A q;
u16_t r;
};
Hopefully:
offsetof(p) is 0
offsetof(q.x[0]) is 2
offsetof(q.x[1]) is 4
offsetof(r) is 6
sizeof(struct B) is 8
Cheers,
Tony