mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-29 12:14:28 +00:00
Add some netif related macros to docs
This commit is contained in:
parent
b7da649944
commit
5f9c944da4
@ -73,6 +73,12 @@ extern "C" {
|
|||||||
#define NETIF_MAX_HWADDR_LEN 6U
|
#define NETIF_MAX_HWADDR_LEN 6U
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup netif_flags
|
||||||
|
* @ingroup netif
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/** Whether the network interface is 'up'. This is
|
/** Whether the network interface is 'up'. This is
|
||||||
* a software flag used to control whether this network
|
* a software flag used to control whether this network
|
||||||
* interface is enabled and processes traffic.
|
* interface is enabled and processes traffic.
|
||||||
@ -104,6 +110,10 @@ extern "C" {
|
|||||||
* Set by the netif driver in its init function. */
|
* Set by the netif driver in its init function. */
|
||||||
#define NETIF_FLAG_MLD6 0x40U
|
#define NETIF_FLAG_MLD6 0x40U
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#if LWIP_CHECKSUM_CTRL_PER_NETIF
|
#if LWIP_CHECKSUM_CTRL_PER_NETIF
|
||||||
#define NETIF_CHECKSUM_GEN_IP 0x0001
|
#define NETIF_CHECKSUM_GEN_IP 0x0001
|
||||||
#define NETIF_CHECKSUM_GEN_UDP 0x0002
|
#define NETIF_CHECKSUM_GEN_UDP 0x0002
|
||||||
@ -270,7 +280,7 @@ struct netif {
|
|||||||
u8_t hwaddr_len;
|
u8_t hwaddr_len;
|
||||||
/** link level hardware address of this interface */
|
/** link level hardware address of this interface */
|
||||||
u8_t hwaddr[NETIF_MAX_HWADDR_LEN];
|
u8_t hwaddr[NETIF_MAX_HWADDR_LEN];
|
||||||
/** flags (see NETIF_FLAG_ above) */
|
/** flags (@see @ref netif_flags) */
|
||||||
u8_t flags;
|
u8_t flags;
|
||||||
/** descriptive abbreviation */
|
/** descriptive abbreviation */
|
||||||
char name[2];
|
char name[2];
|
||||||
@ -358,7 +368,9 @@ void netif_set_gw(struct netif *netif, const ip4_addr_t *gw);
|
|||||||
|
|
||||||
void netif_set_up(struct netif *netif);
|
void netif_set_up(struct netif *netif);
|
||||||
void netif_set_down(struct netif *netif);
|
void netif_set_down(struct netif *netif);
|
||||||
/** Ask if an interface is up */
|
/** @ingroup netif
|
||||||
|
* Ask if an interface is up
|
||||||
|
*/
|
||||||
#define netif_is_up(netif) (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0)
|
#define netif_is_up(netif) (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0)
|
||||||
|
|
||||||
#if LWIP_NETIF_STATUS_CALLBACK
|
#if LWIP_NETIF_STATUS_CALLBACK
|
||||||
@ -402,7 +414,9 @@ void netif_poll_all(void);
|
|||||||
#endif /* ENABLE_LOOPBACK */
|
#endif /* ENABLE_LOOPBACK */
|
||||||
|
|
||||||
#if LWIP_IPV6
|
#if LWIP_IPV6
|
||||||
|
/** @ingroup netif */
|
||||||
#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 */
|
||||||
#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])))
|
||||||
#define netif_ip6_addr_set(netif, i, addr6) do { ip6_addr_set(ip_2_ip6(&((netif)->ip6_addr[i])), addr6); IP_SET_TYPE_VAL((netif)->ip6_addr[i], IPADDR_TYPE_V6); } while(0)
|
#define netif_ip6_addr_set(netif, i, addr6) do { ip6_addr_set(ip_2_ip6(&((netif)->ip6_addr[i])), addr6); IP_SET_TYPE_VAL((netif)->ip6_addr[i], IPADDR_TYPE_V6); } while(0)
|
||||||
#define netif_ip6_addr_state(netif, i) ((netif)->ip6_addr_state[i])
|
#define netif_ip6_addr_state(netif, i) ((netif)->ip6_addr_state[i])
|
||||||
|
Loading…
Reference in New Issue
Block a user