Pedro Alves wrote
> Seems like the right thing to do.
> If the packing is removed from struct ip_addr, and struct 
> ip_addr2 is removed, then there is no need to memcpy anymore.
> 
> A simple:
> 
> sipaddr = hdr->sipaddr;
> 
> will do.

memcpy may still be needed because hdr->sipaddr is misaligned at +2 due to the
format of the ARP packet.  My theory is that struct ip_addr2 was originally
invented because the 4-byte struct/uint32 copy was crashing on someone's 2-byte
aligned CPU!

Regards,
Curt McDowell
Broadcom Corp.





_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to