lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t)


From: Stephane Lesage
Subject: [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t)
Date: Fri, 05 Feb 2010 08:05:19 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

Follow-up Comment #29, bug #27352 (project lwip):


I looked at the compiled code and it looks ok. The access is compiled
accordingly to the packed attribute of the pointer. So this is better now (we
still need the copies), but there's room for improvement:

- all packed structures seem to be fine with word alignment, I tested it
successfully. some structures like udp_hdr even don't need packing (assuming
pointers are even which should always be the case, no ?)...
or we could add the min alignment as a parameter of the PACK_STRUCT macros

- define IP4_ADDR() and ip4_addrX() macros directly according to endianness,
not using htonl()


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?27352>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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