net: if: Add IPv4 multicast address join/leave functions
Allows caller to mark IPv4 multicast address to be used or not. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
8d0201f6eb
commit
e5043f5a7f
2 changed files with 50 additions and 0 deletions
|
@ -3736,6 +3736,28 @@ out:
|
|||
return addr;
|
||||
}
|
||||
|
||||
void net_if_ipv4_maddr_leave(struct net_if_mcast_addr *addr)
|
||||
{
|
||||
NET_ASSERT(addr);
|
||||
|
||||
k_mutex_lock(&lock, K_FOREVER);
|
||||
|
||||
addr->is_joined = false;
|
||||
|
||||
k_mutex_unlock(&lock);
|
||||
}
|
||||
|
||||
void net_if_ipv4_maddr_join(struct net_if_mcast_addr *addr)
|
||||
{
|
||||
NET_ASSERT(addr);
|
||||
|
||||
k_mutex_lock(&lock, K_FOREVER);
|
||||
|
||||
addr->is_joined = true;
|
||||
|
||||
k_mutex_unlock(&lock);
|
||||
}
|
||||
|
||||
static void iface_ipv4_init(int if_count)
|
||||
{
|
||||
int i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue