Add API macros for netif client data handling and update documentation accordingly

This commit is contained in:
Dirk Ziegelmeier
2016-08-26 11:21:49 +02:00
parent 537bd836c9
commit 0d510dd66d
6 changed files with 24 additions and 9 deletions

View File

@@ -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

View File

@@ -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: