mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 23:25:58 +00:00
make igmp/mld6 filter actions an enum and define them in netif.h where the callback function prototypes are defined
This commit is contained in:
parent
f93a6e3310
commit
a189941da6
@ -51,18 +51,11 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* IGMP timer */
|
/* IGMP timer */
|
||||||
#define IGMP_TMR_INTERVAL 100 /* Milliseconds */
|
#define IGMP_TMR_INTERVAL 100 /* Milliseconds */
|
||||||
#define IGMP_V1_DELAYING_MEMBER_TMR (1000/IGMP_TMR_INTERVAL)
|
#define IGMP_V1_DELAYING_MEMBER_TMR (1000/IGMP_TMR_INTERVAL)
|
||||||
#define IGMP_JOIN_DELAYING_MEMBER_TMR (500 /IGMP_TMR_INTERVAL)
|
#define IGMP_JOIN_DELAYING_MEMBER_TMR (500 /IGMP_TMR_INTERVAL)
|
||||||
|
|
||||||
/* MAC Filter Actions, these are passed to a netif's
|
|
||||||
* igmp_mac_filter callback function. */
|
|
||||||
#define IGMP_DEL_MAC_FILTER 0
|
|
||||||
#define IGMP_ADD_MAC_FILTER 1
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* igmp group structure - there is
|
* igmp group structure - there is
|
||||||
* a list of groups for each interface
|
* a list of groups for each interface
|
||||||
|
@ -74,11 +74,6 @@ struct mld_group {
|
|||||||
|
|
||||||
#define MLD6_TMR_INTERVAL 100 /* Milliseconds */
|
#define MLD6_TMR_INTERVAL 100 /* Milliseconds */
|
||||||
|
|
||||||
/* MAC Filter Actions, these are passed to a netif's
|
|
||||||
* mld_mac_filter callback function. */
|
|
||||||
#define MLD6_DEL_MAC_FILTER 0
|
|
||||||
#define MLD6_ADD_MAC_FILTER 1
|
|
||||||
|
|
||||||
err_t mld6_stop(struct netif *netif);
|
err_t mld6_stop(struct netif *netif);
|
||||||
void mld6_report_groups(struct netif *netif);
|
void mld6_report_groups(struct netif *netif);
|
||||||
void mld6_tmr(void);
|
void mld6_tmr(void);
|
||||||
|
@ -181,15 +181,31 @@ 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);
|
typedef err_t (*netif_linkoutput_fn)(struct netif *netif, struct pbuf *p);
|
||||||
/** Function prototype for netif status- or link-callback functions. */
|
/** Function prototype for netif status- or link-callback functions. */
|
||||||
typedef void (*netif_status_callback_fn)(struct netif *netif);
|
typedef void (*netif_status_callback_fn)(struct netif *netif);
|
||||||
|
|
||||||
#if LWIP_IPV4 && LWIP_IGMP
|
#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 */
|
/** Function prototype for netif igmp_mac_filter functions */
|
||||||
typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif,
|
typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif,
|
||||||
const ip4_addr_t *group, u8_t action);
|
const ip4_addr_t *group, enum netif_igmp_filter_action action);
|
||||||
#endif /* LWIP_IPV4 && LWIP_IGMP */
|
#endif /* LWIP_IPV4 && LWIP_IGMP */
|
||||||
|
|
||||||
#if LWIP_IPV6 && LWIP_IPV6_MLD
|
#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 */
|
/** Function prototype for netif mld_mac_filter functions */
|
||||||
typedef err_t (*netif_mld_mac_filter_fn)(struct netif *netif,
|
typedef err_t (*netif_mld_mac_filter_fn)(struct netif *netif,
|
||||||
const ip6_addr_t *group, u8_t action);
|
const ip6_addr_t *group, enum netif_mld6_filter_action action);
|
||||||
#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */
|
#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */
|
||||||
|
|
||||||
/** Generic data structure used for all lwIP network interfaces.
|
/** Generic data structure used for all lwIP network interfaces.
|
||||||
|
Loading…
Reference in New Issue
Block a user