mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 23:12:09 +00:00
Fix bug #55078: Add custom data to pbuf struct
Add a #define that users can use to store custom data on a pbuf
(cherry picked from commit 92a18bf638
)
This commit is contained in:
parent
9d97a467ca
commit
fe4395336a
@ -1555,6 +1555,14 @@
|
|||||||
#if !defined LWIP_PBUF_REF_T || defined __DOXYGEN__
|
#if !defined LWIP_PBUF_REF_T || defined __DOXYGEN__
|
||||||
#define LWIP_PBUF_REF_T u8_t
|
#define LWIP_PBUF_REF_T u8_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LWIP_PBUF_CUSTOM_DATA: Store private data on pbufs (e.g. timestamps)
|
||||||
|
* This extends struct pbuf so user can store custom data on every pbuf.
|
||||||
|
*/
|
||||||
|
#if !defined LWIP_PBUF_CUSTOM_DATA || defined __DOXYGEN__
|
||||||
|
#define LWIP_PBUF_CUSTOM_DATA
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -219,6 +219,9 @@ struct pbuf {
|
|||||||
|
|
||||||
/** For incoming packets, this contains the input netif's index */
|
/** For incoming packets, this contains the input netif's index */
|
||||||
u8_t if_idx;
|
u8_t if_idx;
|
||||||
|
|
||||||
|
/** In case the user needs to store data custom data on a pbuf */
|
||||||
|
LWIP_PBUF_CUSTOM_DATA
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user