mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08:00
Documentation updates related to Joel's if_api changes
This commit is contained in:
parent
fb0a750970
commit
eae4129863
@ -3,6 +3,9 @@
|
|||||||
* Interface Identification APIs from:
|
* Interface Identification APIs from:
|
||||||
* RFC 3493: Basic Socket Interface Extensions for IPv6
|
* RFC 3493: Basic Socket Interface Extensions for IPv6
|
||||||
* Section 4: Interface Identification
|
* Section 4: Interface Identification
|
||||||
|
*
|
||||||
|
* @defgroup if_api Interface Identification API
|
||||||
|
* @ingroup socket
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -43,6 +46,15 @@
|
|||||||
#include "lwip/if_api.h"
|
#include "lwip/if_api.h"
|
||||||
#include "lwip/netifapi.h"
|
#include "lwip/netifapi.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup if_api
|
||||||
|
* Maps an interface index to its corresponding name.
|
||||||
|
* @param ifindex interface index
|
||||||
|
* @param ifname shall point to a buffer of at least {IF_NAMESIZE} bytes
|
||||||
|
* @return If ifindex is an interface index, then the function shall return the
|
||||||
|
* value supplied in ifname, which points to a buffer now containing the interface name.
|
||||||
|
* Otherwise, the function shall return a NULL pointer.
|
||||||
|
*/
|
||||||
char *
|
char *
|
||||||
lwip_if_indextoname(unsigned int ifindex, char *ifname)
|
lwip_if_indextoname(unsigned int ifindex, char *ifname)
|
||||||
{
|
{
|
||||||
@ -63,6 +75,13 @@ lwip_if_indextoname(unsigned int ifindex, char *ifname)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup if_api
|
||||||
|
* Returs the interface index corresponding to name ifname.
|
||||||
|
* @param ifname Interface name
|
||||||
|
* @return The corresponding index if ifname is the name of an interface;
|
||||||
|
* otherwise, zero.
|
||||||
|
*/
|
||||||
unsigned int
|
unsigned int
|
||||||
lwip_if_nametoindex(const char *ifname)
|
lwip_if_nametoindex(const char *ifname)
|
||||||
{
|
{
|
||||||
|
@ -1298,7 +1298,7 @@ netif_null_output_ip6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipa
|
|||||||
#endif /* LWIP_IPV6 */
|
#endif /* LWIP_IPV6 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup netif_if
|
* @ingroup netif
|
||||||
* Return the interface index for the netif with name
|
* Return the interface index for the netif with name
|
||||||
* or 0 (invalid interface) if not found/on error
|
* or 0 (invalid interface) if not found/on error
|
||||||
*
|
*
|
||||||
@ -1316,7 +1316,7 @@ netif_name_to_index(const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup netif_if
|
* @ingroup netif
|
||||||
* Return the interface name for the netif matching index
|
* Return the interface name for the netif matching index
|
||||||
* or NULL if not found/on error
|
* or NULL if not found/on error
|
||||||
*
|
*
|
||||||
|
@ -312,7 +312,8 @@ struct netif {
|
|||||||
u8_t flags;
|
u8_t flags;
|
||||||
/** descriptive abbreviation */
|
/** descriptive abbreviation */
|
||||||
char name[2];
|
char name[2];
|
||||||
/** number of this interface */
|
/** number of this interface. Used for @ref if_api and @ref netifapi_netif,
|
||||||
|
* as well as for IPv6 zones */
|
||||||
u8_t num;
|
u8_t num;
|
||||||
#if LWIP_IPV6_AUTOCONFIG
|
#if LWIP_IPV6_AUTOCONFIG
|
||||||
/** is this netif enabled for IPv6 autoconfiguration */
|
/** is this netif enabled for IPv6 autoconfiguration */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user