mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-24 17:17:03 +08:00
Add API macros for netif client data handling and update documentation accordingly
This commit is contained in:
@@ -426,6 +426,14 @@ err_t netif_input(struct pbuf *p, struct netif *inp);
|
||||
|
||||
#if LWIP_NUM_NETIF_CLIENT_DATA > 0
|
||||
u8_t netif_alloc_client_data_id(void);
|
||||
/** @ingroup netif_cd
|
||||
* Set client data. Obtain ID from netif_alloc_client_data_id().
|
||||
*/
|
||||
#define netif_set_client_data(netif, id, data) netif_get_client_data(netif, id) = (data)
|
||||
/** @ingroup netif_cd
|
||||
* Get client data. Obtain ID from netif_alloc_client_data_id().
|
||||
*/
|
||||
#define netif_get_client_data(netif, id) (netif)->client_data[(id)]
|
||||
#endif
|
||||
|
||||
#if LWIP_IPV6
|
||||
|
||||
@@ -2495,7 +2495,8 @@
|
||||
|
||||
/**
|
||||
* LWIP_HOOK_VLAN_SET:
|
||||
* Hook can be used to set prio_vid field of vlan_hdr.
|
||||
* Hook can be used to set prio_vid field of vlan_hdr. If you need to store data
|
||||
* on per-netif basis to implement this callback, see @ref netif_cd.
|
||||
* Called from ethernet_output() if VLAN support (@ref ETHARP_SUPPORT_VLAN) is enabled.\n
|
||||
* Signature: s32_t my_hook_vlan_set(struct netif* netif, struct pbuf* pbuf, const struct eth_addr* src, const struct eth_addr* dst, u16_t eth_type);\n
|
||||
* Arguments:
|
||||
|
||||
Reference in New Issue
Block a user