mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-02 23:19:28 +00:00
pimd, pim6d: Define pim_addr_is_multicast API
pim_addr_is_multicast API will check if the address is multicast address or not. Signed-off-by: Sarita Patra <saritap@vmware.com>
This commit is contained in:
parent
a00621d8b9
commit
dce0f7468d
@ -166,3 +166,15 @@ int pim_get_all_mcast_group(struct prefix *prefix)
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool pim_addr_is_multicast(pim_addr addr)
|
||||
{
|
||||
#if PIM_IPV == 4
|
||||
if (IN_MULTICAST(addr.s_addr))
|
||||
return true;
|
||||
#else
|
||||
if (IN6_IS_ADDR_MULTICAST(&addr))
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -37,4 +37,5 @@ int pim_is_group_224_0_0_0_24(struct in_addr group_addr);
|
||||
int pim_is_group_224_4(struct in_addr group_addr);
|
||||
bool pim_is_group_filtered(struct pim_interface *pim_ifp, pim_addr *grp);
|
||||
int pim_get_all_mcast_group(struct prefix *prefix);
|
||||
bool pim_addr_is_multicast(pim_addr addr);
|
||||
#endif /* PIM_UTIL_H */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user