diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 78c36e48..0fafcde3 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -1395,6 +1395,14 @@ #if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__ #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) #endif + +/** + * LWIP_PBUF_REF_T: Refcount type in pbuf. Must be signed! + * Default width of s8_t can be increased if 127 refs are not enough for you. + */ +#ifndef LWIP_PBUF_REF_T +#define LWIP_PBUF_REF_T s8_t +#endif /** * @} */ diff --git a/src/include/lwip/pbuf.h b/src/include/lwip/pbuf.h index 90610461..7490e605 100644 --- a/src/include/lwip/pbuf.h +++ b/src/include/lwip/pbuf.h @@ -169,7 +169,7 @@ struct pbuf { * that refer to this pbuf. This can be pointers from an application, * the stack itself, or pbuf->next pointers from a chain. */ - u16_t ref; + LWIP_PBUF_REF_T ref; };