mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-06-01 23:53:26 +08:00
combine MAC filter actions for IGMP and MLD6 (IGMP has compatibility defines for old code, MLD6 filter functions must be adapted)
This commit is contained in:
@@ -56,6 +56,10 @@ extern "C" {
|
||||
#define IGMP_V1_DELAYING_MEMBER_TMR (1000/IGMP_TMR_INTERVAL)
|
||||
#define IGMP_JOIN_DELAYING_MEMBER_TMR (500 /IGMP_TMR_INTERVAL)
|
||||
|
||||
/* Compatibility defines (don't use for new code) */
|
||||
#define IGMP_DEL_MAC_FILTER NETIF_DEL_MAC_FILTER
|
||||
#define IGMP_ADD_MAC_FILTER NETIF_ADD_MAC_FILTER
|
||||
|
||||
/**
|
||||
* igmp group structure - there is
|
||||
* a list of groups for each interface
|
||||
|
||||
@@ -132,6 +132,15 @@ enum lwip_internal_netif_client_data_index
|
||||
|
||||
struct netif;
|
||||
|
||||
/** MAC Filter Actions, these are passed to a netif's igmp_mac_filter or
|
||||
* mld_mac_filter callback function. */
|
||||
enum netif_mac_filter_action {
|
||||
/** Delete a filter entry */
|
||||
NETIF_DEL_MAC_FILTER = 0,
|
||||
/** Add a filter entry */
|
||||
NETIF_ADD_MAC_FILTER = 1
|
||||
};
|
||||
|
||||
/** Function prototype for netif init functions. Set up flags and output/linkoutput
|
||||
* callback functions in this function.
|
||||
*
|
||||
@@ -181,31 +190,15 @@ typedef err_t (*netif_output_ip6_fn)(struct netif *netif, struct pbuf *p,
|
||||
typedef err_t (*netif_linkoutput_fn)(struct netif *netif, struct pbuf *p);
|
||||
/** Function prototype for netif status- or link-callback functions. */
|
||||
typedef void (*netif_status_callback_fn)(struct netif *netif);
|
||||
|
||||
#if LWIP_IPV4 && LWIP_IGMP
|
||||
/** MAC Filter Actions, these are passed to a netif's igmp_mac_filter callback function. */
|
||||
enum netif_igmp_filter_action {
|
||||
/** Delete a filter entry */
|
||||
IGMP_DEL_MAC_FILTER = 0,
|
||||
/** Add a filter entry */
|
||||
IGMP_ADD_MAC_FILTER = 1
|
||||
};
|
||||
/** Function prototype for netif igmp_mac_filter functions */
|
||||
typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif,
|
||||
const ip4_addr_t *group, enum netif_igmp_filter_action action);
|
||||
const ip4_addr_t *group, enum netif_mac_filter_action action);
|
||||
#endif /* LWIP_IPV4 && LWIP_IGMP */
|
||||
|
||||
#if LWIP_IPV6 && LWIP_IPV6_MLD
|
||||
/** MAC Filter Actions, these are passed to a netif's mld_mac_filter callback function. */
|
||||
enum netif_mld6_filter_action {
|
||||
/** Delete a filter entry */
|
||||
MLD6_DEL_MAC_FILTER = 0,
|
||||
/** Add a filter entry */
|
||||
MLD6_ADD_MAC_FILTER = 1
|
||||
};
|
||||
/** Function prototype for netif mld_mac_filter functions */
|
||||
typedef err_t (*netif_mld_mac_filter_fn)(struct netif *netif,
|
||||
const ip6_addr_t *group, enum netif_mld6_filter_action action);
|
||||
const ip6_addr_t *group, enum netif_mac_filter_action action);
|
||||
#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */
|
||||
|
||||
/** Generic data structure used for all lwIP network interfaces.
|
||||
|
||||
Reference in New Issue
Block a user