mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-04 21:39:49 +00: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
|
||||
#if LWIP_IPV6
|
||||
netif->output_ip6 = netif_loop_output_ipv6;
|
||||
#endif
|
||||
#if LWIP_LOOPIF_MCAST
|
||||
netif->flags |= NETIF_FLAG_IGMP;
|
||||
#endif
|
||||
return ERR_OK;
|
||||
}
|
||||
|
@ -1424,6 +1424,13 @@
|
||||
#define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK
|
||||
#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 ----------
|
||||
|
Loading…
x
Reference in New Issue
Block a user