mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-27 10:41:12 +08:00
Cleanup hton*/ntoh* function handling and platform abstraction
Let lwip use functions/macros prefixed by lwip_ internally to avoid naming clashes with external #includes. Remove over-complicated #define handling in def.h Make functions easier to override in cc.h. The following is sufficient now (no more LWIP_PLATFORM_BYTESWAP): #define lwip_htons(x) <your_htons> #define lwip_htonl(x) <your_htonl>
This commit is contained in:
@@ -84,7 +84,7 @@ typedef union
|
||||
|
||||
#define eui64_set32(e, l) do { \
|
||||
(e).e32[0] = 0; \
|
||||
(e).e32[1] = htonl(l); \
|
||||
(e).e32[1] = lwip_htonl(l); \
|
||||
} while (0)
|
||||
#define eui64_setlo32(e, l) eui64_set32(e, l)
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
* This is not nice ... the alternative is a bitfield struct though.
|
||||
* And unfortunately, we cannot share the same bits for the option
|
||||
* names above since C and H are the same bit. We could do a u_int32
|
||||
* but then we have to do a htonl() all the time and/or we still need
|
||||
* but then we have to do a lwip_htonl() all the time and/or we still need
|
||||
* to know which octet is which.
|
||||
*/
|
||||
#define MPPE_C_BIT 0x01 /* MPPC */
|
||||
|
||||
Reference in New Issue
Block a user