net: if: Add IPv4 support to multicast monitor

Make multicast group join/leave monitor support both IPv6 and IPv4
addresses.

Fixes #26585

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
This commit is contained in:
Markus Fuchs 2021-09-13 16:44:44 +02:00 committed by Christopher Friedt
commit 7926657b27
5 changed files with 72 additions and 48 deletions

View file

@ -1043,11 +1043,11 @@ struct net_if_mcast_addr *net_if_ipv6_maddr_lookup(const struct in6_addr *addr,
* @param iface A pointer to a struct net_if to which the multicast address is
* attached.
* @param addr IPv6 multicast address.
* @param addr IP multicast address.
* @param is_joined True if the address is joined, false if left.
*/
typedef void (*net_if_mcast_callback_t)(struct net_if *iface,
const struct in6_addr *addr,
const struct net_addr *addr,
bool is_joined);
/**
@ -1095,7 +1095,7 @@ void net_if_mcast_mon_unregister(struct net_if_mcast_monitor *mon);
* @param addr Multicast address
* @param is_joined Is this multicast address joined (true) or not (false)
*/
void net_if_mcast_monitor(struct net_if *iface, const struct in6_addr *addr,
void net_if_mcast_monitor(struct net_if *iface, const struct net_addr *addr,
bool is_joined);
/**