mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-15 12:47:08 +08:00
netif.h, netif.c: A new NETIF_FLAG_ETHARP flag is defined in netif.h, to allow to initialize a network interface's flag with. It tell this interface is an ethernet device, and we can use ARP with it to do a "gratuitous ARP" (RFC 3220 "IP Mobility Support for IPv4" section 4.6) when interface is "up" with netif_set_up().
This commit is contained in:
@@ -64,6 +64,8 @@
|
||||
/** if set, the interface has an active link
|
||||
* (set by the network interface driver) */
|
||||
#define NETIF_FLAG_LINK_UP 0x10U
|
||||
/** if set, the netif is an device using ARP */
|
||||
#define NETIF_FLAG_ETHARP 0x20U
|
||||
|
||||
/** Generic data structure used for all lwIP network interfaces.
|
||||
* The following fields should be filled in by the initialization
|
||||
@@ -101,7 +103,7 @@ struct netif {
|
||||
#if LWIP_DHCP
|
||||
/** the DHCP client state information for this netif */
|
||||
struct dhcp *dhcp;
|
||||
#endif
|
||||
#endif /* LWIP_DHCP */
|
||||
/** number of bytes used in hwaddr */
|
||||
u8_t hwaddr_len;
|
||||
/** link level hardware address of this interface */
|
||||
@@ -130,11 +132,11 @@ struct netif {
|
||||
u32_t ifoutucastpkts;
|
||||
u32_t ifoutnucastpkts;
|
||||
u32_t ifoutdiscards;
|
||||
#endif
|
||||
#endif /* LWIP_SNMP */
|
||||
#if LWIP_IGMP
|
||||
/* This function could be called to add or delete a entry in the multicast filter table of the ethernet MAC.*/
|
||||
err_t (*igmp_mac_filter)( struct netif *netif, struct ip_addr *group, u8_t action);
|
||||
#endif
|
||||
#endif /* LWIP_IGMP */
|
||||
};
|
||||
|
||||
/** The list of network interfaces. */
|
||||
|
||||
Reference in New Issue
Block a user