diff --git a/src/core/netif.c b/src/core/netif.c index b386354a..d6cfb55c 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -4,6 +4,12 @@ * * @defgroup netif Network interface (NETIF) * @ingroup callbackstyle_api + * + * @defgroup netif_ip4 IPv4 address handling + * @ingroup netif + * + * @defgroup netif_ip6 IPv6 address handling + * @ingroup netif */ /* @@ -321,7 +327,7 @@ netif_add(struct netif *netif, #if LWIP_IPV4 /** - * @ingroup netif + * @ingroup netif_ip4 * Change IP address configuration for a network interface (including netmask * and default gateway). * @@ -470,7 +476,7 @@ netif_find(const char *name) #if LWIP_IPV4 /** - * @ingroup netif + * @ingroup netif_ip4 * Change the IP address of a network interface * * @param netif the network interface to change @@ -518,7 +524,7 @@ netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr) } /** - * @ingroup netif + * @ingroup netif_ip4 * Change the default gateway for a network interface * * @param netif the network interface to change @@ -540,7 +546,7 @@ netif_set_gw(struct netif *netif, const ip4_addr_t *gw) } /** - * @ingroup netif + * @ingroup netif_ip4 * Change the netmask of a network interface * * @param netif the network interface to change @@ -979,7 +985,7 @@ netif_alloc_client_data_id(void) #if LWIP_IPV6 /** - * @ingroup netif + * @ingroup netif_ip6 * Change an IPv6 address of a network interface * * @param netif the network interface to change @@ -1048,7 +1054,7 @@ netif_ip6_addr_set_parts(struct netif *netif, s8_t addr_idx, u32_t i0, u32_t i1, } /** - * @ingroup netif + * @ingroup netif_ip6 * Change the state of an IPv6 address of a network interface * (INVALID, TEMPTATIVE, PREFERRED, DEPRECATED, where TEMPTATIVE * includes the number of checks done, see ip6_addr.h) @@ -1123,7 +1129,7 @@ netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr) } /** - * @ingroup netif + * @ingroup netif_ip6 * Create a link-local IPv6 address on a netif (stored in slot 0) * * @param netif the netif to create the address on @@ -1175,7 +1181,7 @@ netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit) } /** - * @ingroup netif + * @ingroup netif_ip6 * This function allows for the easy addition of a new IPv6 address to an interface. * It takes care of finding an empty slot and then sets the address tentative * (to make sure that all the subsequent processing happens). diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index 6b727044..1b5f21c7 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -359,17 +359,17 @@ void netif_set_default(struct netif *netif); void netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr); void netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask); void netif_set_gw(struct netif *netif, const ip4_addr_t *gw); -/** @ingroup netif */ +/** @ingroup netif_ip4 */ #define netif_ip4_addr(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->ip_addr))) -/** @ingroup netif */ +/** @ingroup netif_ip4 */ #define netif_ip4_netmask(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->netmask))) -/** @ingroup netif */ +/** @ingroup netif_ip4 */ #define netif_ip4_gw(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->gw))) -/** @ingroup netif */ +/** @ingroup netif_ip4 */ #define netif_ip_addr4(netif) ((const ip_addr_t*)&((netif)->ip_addr)) -/** @ingroup netif */ +/** @ingroup netif_ip4 */ #define netif_ip_netmask4(netif) ((const ip_addr_t*)&((netif)->netmask)) -/** @ingroup netif */ +/** @ingroup netif_ip4 */ #define netif_ip_gw4(netif) ((const ip_addr_t*)&((netif)->gw)) #endif /* LWIP_IPV4 */ @@ -429,9 +429,9 @@ u8_t netif_alloc_client_data_id(void); #endif #if LWIP_IPV6 -/** @ingroup netif */ +/** @ingroup netif_ip6 */ #define netif_ip_addr6(netif, i) ((const ip_addr_t*)(&((netif)->ip6_addr[i]))) -/** @ingroup netif */ +/** @ingroup netif_ip6 */ #define netif_ip6_addr(netif, i) ((const ip6_addr_t*)ip_2_ip6(&((netif)->ip6_addr[i]))) void netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6); void netif_ip6_addr_set_parts(struct netif *netif, s8_t addr_idx, u32_t i0, u32_t i1, u32_t i2, u32_t i3); diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 49b6c17b..eeb3e6c0 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -2494,19 +2494,21 @@ #endif /** - * LWIP_HOOK_VLAN_SET(netif, eth_hdr, vlan_hdr): + * LWIP_HOOK_VLAN_SET: * Hook can be used to set prio_vid field of vlan_hdr. - * Called from ethernet_output() if VLAN support is enabled. - * 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); + * 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: * - netif: struct netif that the packet will be sent through * - p: struct pbuf packet to be sent * - src: source eth address * - dst: destination eth address - * - eth_type: ethernet type to packet to be sent + * - eth_type: ethernet type to packet to be sent\n + * + * * Return values: - * - <0: Packet shall not contain VLAN header. - * - 0 <= return value <= 0xFFFF: Packet shall contain VLAN header. Return value is prio_vid in host byte order. + * - <0: Packet shall not contain VLAN header. + * - 0 <= return value <= 0xFFFF: Packet shall contain VLAN header. Return value is prio_vid in host byte order. */ #ifdef __DOXYGEN__ #define LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type) diff --git a/src/netif/ethernet.c b/src/netif/ethernet.c index 88705f3b..6eeab95a 100644 --- a/src/netif/ethernet.c +++ b/src/netif/ethernet.c @@ -68,6 +68,8 @@ const struct eth_addr ethzero = {{0,0,0,0,0,0}}; * * @param p the received packet, p->payload pointing to the ethernet header * @param netif the network interface on which the packet was received + * + * @see @ref LWIP_HOOK_UNKNOWN_ETH_PROTOCOL */ err_t ethernet_input(struct pbuf *p, struct netif *netif) @@ -243,7 +245,7 @@ free_and_return: * Send an ethernet packet on the network using netif->linkoutput(). * The ethernet header is filled in before sending. * - * @see @ref LWIP_HOOK_UNKNOWN_ETH_PROTOCOL + * @see @ref LWIP_HOOK_VLAN_SET * * @param netif the lwIP network interface on which to send the packet * @param p the packet to send. pbuf layer must be @ref PBUF_LINK.