Minor: Several documentation updates

This commit is contained in:
Dirk Ziegelmeier 2016-08-25 22:04:04 +02:00
parent 452f5d6296
commit 57468b8a30
4 changed files with 33 additions and 23 deletions

View File

@ -4,6 +4,12 @@
* *
* @defgroup netif Network interface (NETIF) * @defgroup netif Network interface (NETIF)
* @ingroup callbackstyle_api * @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 #if LWIP_IPV4
/** /**
* @ingroup netif * @ingroup netif_ip4
* Change IP address configuration for a network interface (including netmask * Change IP address configuration for a network interface (including netmask
* and default gateway). * and default gateway).
* *
@ -470,7 +476,7 @@ netif_find(const char *name)
#if LWIP_IPV4 #if LWIP_IPV4
/** /**
* @ingroup netif * @ingroup netif_ip4
* Change the IP address of a network interface * Change the IP address of a network interface
* *
* @param netif the network interface to change * @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 * Change the default gateway for a network interface
* *
* @param netif the network interface to change * @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 * Change the netmask of a network interface
* *
* @param netif the network interface to change * @param netif the network interface to change
@ -979,7 +985,7 @@ netif_alloc_client_data_id(void)
#if LWIP_IPV6 #if LWIP_IPV6
/** /**
* @ingroup netif * @ingroup netif_ip6
* Change an IPv6 address of a network interface * Change an IPv6 address of a network interface
* *
* @param netif the network interface to change * @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 * Change the state of an IPv6 address of a network interface
* (INVALID, TEMPTATIVE, PREFERRED, DEPRECATED, where TEMPTATIVE * (INVALID, TEMPTATIVE, PREFERRED, DEPRECATED, where TEMPTATIVE
* includes the number of checks done, see ip6_addr.h) * 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) * Create a link-local IPv6 address on a netif (stored in slot 0)
* *
* @param netif the netif to create the address on * @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. * 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 * It takes care of finding an empty slot and then sets the address tentative
* (to make sure that all the subsequent processing happens). * (to make sure that all the subsequent processing happens).

View File

@ -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_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr);
void netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask); void netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask);
void netif_set_gw(struct netif *netif, const ip4_addr_t *gw); 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))) #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))) #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))) #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)) #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)) #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)) #define netif_ip_gw4(netif) ((const ip_addr_t*)&((netif)->gw))
#endif /* LWIP_IPV4 */ #endif /* LWIP_IPV4 */
@ -429,9 +429,9 @@ u8_t netif_alloc_client_data_id(void);
#endif #endif
#if LWIP_IPV6 #if LWIP_IPV6
/** @ingroup netif */ /** @ingroup netif_ip6 */
#define netif_ip_addr6(netif, i) ((const ip_addr_t*)(&((netif)->ip6_addr[i]))) #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]))) #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(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); 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);

View File

@ -2494,19 +2494,21 @@
#endif #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. * Hook can be used to set prio_vid field of vlan_hdr.
* Called from ethernet_output() if VLAN support is enabled. * 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); * 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: * Arguments:
* - netif: struct netif that the packet will be sent through * - netif: struct netif that the packet will be sent through
* - p: struct pbuf packet to be sent * - p: struct pbuf packet to be sent
* - src: source eth address * - src: source eth address
* - dst: destination 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: * Return values:
* - <0: Packet shall not contain VLAN header. * - &lt;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 &lt;= return value &lt;= 0xFFFF: Packet shall contain VLAN header. Return value is prio_vid in host byte order.
*/ */
#ifdef __DOXYGEN__ #ifdef __DOXYGEN__
#define LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type) #define LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type)

View File

@ -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 p the received packet, p->payload pointing to the ethernet header
* @param netif the network interface on which the packet was received * @param netif the network interface on which the packet was received
*
* @see @ref LWIP_HOOK_UNKNOWN_ETH_PROTOCOL
*/ */
err_t err_t
ethernet_input(struct pbuf *p, struct netif *netif) 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(). * Send an ethernet packet on the network using netif->linkoutput().
* The ethernet header is filled in before sending. * 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 netif the lwIP network interface on which to send the packet
* @param p the packet to send. pbuf layer must be @ref PBUF_LINK. * @param p the packet to send. pbuf layer must be @ref PBUF_LINK.