igmp.h, igmp.c, netif.h, netif.c, ip.c: To enable to have interfaces with IGMP, and others without it, there is a new NETIF_FLAG_IGMP flag to set in netif->flags if you want IGMP on an interface. igmp_stop() is now called inside netif_remove(). igmp_report_groups() is now called inside netif_set_link_up() (need to have LWIP_NETIF_LINK_CALLBACK=1) to resend reports once the link is up (avoid to wait the next query message to receive the matching multicast streams).

This commit is contained in:
fbernon
2007-09-09 20:46:33 +00:00
parent 8205737fdb
commit 939180c1a1
6 changed files with 127 additions and 12 deletions

View File

@@ -112,11 +112,15 @@ void igmp_init(void);
err_t igmp_start( struct netif *netif);
struct igmp_group *igmp_lookfor_group(struct netif *ifp, struct ip_addr *addr);
err_t igmp_stop( struct netif *netif);
struct igmp_group *igmp_lookup_group(struct netif *ifp, struct ip_addr *addr);
void igmp_report_groups( struct netif *netif);
err_t igmp_remove_group(struct igmp_group *group);
struct igmp_group *igmp_lookfor_group( struct netif *ifp, struct ip_addr *addr);
struct igmp_group *igmp_lookup_group( struct netif *ifp, struct ip_addr *addr);
err_t igmp_remove_group( struct igmp_group *group);
void igmp_input( struct pbuf *p, struct netif *inp, struct ip_addr *dest);

View File

@@ -76,6 +76,8 @@ extern "C" {
#define NETIF_FLAG_LINK_UP 0x10U
/** if set, the netif is an device using ARP */
#define NETIF_FLAG_ETHARP 0x20U
/** if set, the netif has IGMP capability */
#define NETIF_FLAG_IGMP 0x40U
/** Generic data structure used for all lwIP network interfaces.
* The following fields should be filled in by the initialization