feat(lwip): Add macro "LWIP_SUPPORT_CUSTOM_PBUF"

LWIP of newer version has this.
This commit is contained in:
Dong Heng
2018-04-23 16:42:50 +08:00
parent 26d9ff96e6
commit 39b77d4337
2 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,8 @@
#define SOCKETS_MT #define SOCKETS_MT
//#define SOCKETS_TCP_TRACE //#define SOCKETS_TCP_TRACE
#define LWIP_SUPPORT_CUSTOM_PBUF 1
/* /*
----------------------------------------------- -----------------------------------------------
---------- Platform specific locking ---------- ---------- Platform specific locking ----------

View File

@ -40,9 +40,11 @@
extern "C" { extern "C" {
#endif #endif
#ifndef LWIP_SUPPORT_CUSTOM_PBUF
/** Currently, the pbuf_custom code is only needed for one specific configuration /** Currently, the pbuf_custom code is only needed for one specific configuration
* of IP_FRAG */ * of IP_FRAG */
#define LWIP_SUPPORT_CUSTOM_PBUF (IP_FRAG && !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF) #define LWIP_SUPPORT_CUSTOM_PBUF (IP_FRAG && !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF)
#endif
/* @todo: We need a mechanism to prevent wasting memory in every pbuf /* @todo: We need a mechanism to prevent wasting memory in every pbuf
(TCP vs. UDP, IPv4 vs. IPv6: UDP/IPv4 packets may waste up to 28 bytes) */ (TCP vs. UDP, IPv4 vs. IPv6: UDP/IPv4 packets may waste up to 28 bytes) */