[U-Boot] [PATCH] net: Make sure IPaddr_t is 32 bits in size

Mike Frysinger vapier at gentoo.org
Fri Dec 2 17:48:11 CET 2011


On Friday 02 December 2011 11:26:12 Matthias Weisser wrote:
> When building u-boot as 64 bit application (e.g. sandbox) ulong might be
> 64 bits in size. This breaks network code as IPaddr_t is 64 bytes in
> size then. This patch makes sure that IPaddr_t is always 32 bits in
> size. Also some warnings introduced by this patch are fixed.

on 2nd thought, could you clarify why we want it to be 32bits ?  it's because 
that's the size of the address field in an IPv4 packet ...

> --- a/include/net.h
> +++ b/include/net.h
> 
> -typedef ulong		IPaddr_t;
> +typedef u32		IPaddr_t;

and add a comment here too ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111202/63b3aa26/attachment.pgp>


More information about the U-Boot mailing list