From 5477aa5a4277dc93763e693e728da25ffe325397 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sun, 9 Oct 2016 09:41:26 +0200 Subject: [PATCH] Minor: Documentation update --- doc/rawapi.txt | 3 +++ src/core/def.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/doc/rawapi.txt b/doc/rawapi.txt index 9a5c3e00..0cdfdcea 100644 --- a/doc/rawapi.txt +++ b/doc/rawapi.txt @@ -458,6 +458,9 @@ assembly or inline replacements for htons() and htonl() if you're using a little-endian architecture. #define lwip_htons(x) #define lwip_htonl(x) +If you #define them to htons() and htonl(), you should +#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS to prevent lwIP from +defining hton*/ntoh* compatibility macros. Check your network interface driver if it reads at a higher speed than the maximum wire-speed. If the diff --git a/src/core/def.c b/src/core/def.c index 88f5724d..819b7a81 100644 --- a/src/core/def.c +++ b/src/core/def.c @@ -11,6 +11,10 @@ * \#define lwip_htonl(x) your_htonl * * Note lwip_ntohs() and lwip_ntohl() are merely references to the htonx counterparts. + * + * If you #define them to htons() and htonl(), you should + * \#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS to prevent lwIP from + * defining htonx/ntohx compatibility macros. */ /*