mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-22 16:16:55 +08:00
work on -Wconversion...
This commit is contained in:
@@ -427,6 +427,10 @@ void netif_set_gw(struct netif *netif, const ip4_addr_t *gw);
|
||||
#define netif_ip_gw4(netif) ((const ip_addr_t*)&((netif)->gw))
|
||||
#endif /* LWIP_IPV4 */
|
||||
|
||||
#define netif_set_flags(netif, set_flags) do { (netif)->flags = (u8_t)((netif)->flags | (set_flags)); } while(0)
|
||||
#define netif_clear_flags(netif, set_flags) do { (netif)->flags = (u8_t)((netif)->flags & ~(set_flags)); } while(0)
|
||||
#define netif_is_flag_set(nefif, flag) (((netif)->flags & (flag)) != 0)
|
||||
|
||||
void netif_set_up(struct netif *netif);
|
||||
void netif_set_down(struct netif *netif);
|
||||
/** @ingroup netif
|
||||
@@ -521,8 +525,8 @@ u8_t netif_name_to_index(const char *name);
|
||||
char * netif_index_to_name(u8_t idx, char *name);
|
||||
struct netif* netif_get_by_index(u8_t idx);
|
||||
|
||||
/* Interface indexes always start at 1 per RFC 3493, section 4, num starts at 0 */
|
||||
#define netif_get_index(netif) ((netif)->num + 1)
|
||||
/* Interface indexes always start at 1 per RFC 3493, section 4, num starts at 0 (internal index is 0..254)*/
|
||||
#define netif_get_index(netif) ((u8_t)((netif)->num + 1))
|
||||
#define NETIF_NO_INDEX (0)
|
||||
|
||||
/**
|
||||
|
||||
@@ -1546,7 +1546,7 @@
|
||||
|
||||
/**
|
||||
* LWIP_NUM_NETIF_CLIENT_DATA: Number of clients that may store
|
||||
* data in client_data member array of struct netif.
|
||||
* data in client_data member array of struct netif (max. 256).
|
||||
*/
|
||||
#if !defined LWIP_NUM_NETIF_CLIENT_DATA || defined __DOXYGEN__
|
||||
#define LWIP_NUM_NETIF_CLIENT_DATA 0
|
||||
|
||||
Reference in New Issue
Block a user