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:
Dirk Ziegelmeier
2016-10-06 12:55:57 +02:00
parent 0c06073819
commit 13fb616bb2
44 changed files with 370 additions and 426 deletions

View File

@@ -456,9 +456,8 @@ introduction to this subject.
Other significant improvements can be made by supplying
assembly or inline replacements for htons() and htonl()
if you're using a little-endian architecture.
#define LWIP_PLATFORM_BYTESWAP 1
#define LWIP_PLATFORM_HTONS(x) <your_htons>
#define LWIP_PLATFORM_HTONL(x) <your_htonl>
#define lwip_htons(x) <your_htons>
#define lwip_htonl(x) <your_htonl>
Check your network interface driver if it reads at
a higher speed than the maximum wire-speed. If the