mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 13:34:38 +08:00
Add multicast support to loopif
This commit adds support to send and receive multicast on the loopback netif by enabling IGMP via NETIF_FLAG_IGMP This commit also introduces an LwIP configuration option, LWIP_LOOPIF_MCAST, to control the behavior and it defaults to off
This commit is contained in:
parent
204bd29e52
commit
0ab21da820
@ -126,6 +126,9 @@ netif_loopif_init(struct netif *netif)
|
|||||||
#endif
|
#endif
|
||||||
#if LWIP_IPV6
|
#if LWIP_IPV6
|
||||||
netif->output_ip6 = netif_loop_output_ipv6;
|
netif->output_ip6 = netif_loop_output_ipv6;
|
||||||
|
#endif
|
||||||
|
#if LWIP_LOOPIF_MCAST
|
||||||
|
netif->flags |= NETIF_FLAG_IGMP;
|
||||||
#endif
|
#endif
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
|
@ -1424,6 +1424,13 @@
|
|||||||
#define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK
|
#define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LWIP_LOOPIF_MCAST==1: Support multicast on loop interface (127.0.0.1).
|
||||||
|
*/
|
||||||
|
#ifndef LWIP_LOOPIF_MCAST
|
||||||
|
#define LWIP_LOOPIF_MCAST 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
------------------------------------
|
------------------------------------
|
||||||
---------- SLIPIF options ----------
|
---------- SLIPIF options ----------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user