nix-vector-routing: Handle Multiple Wifi connections with same channel object

Signed-off-by: Ameya Deshpande <ameyanrd@outlook.com>
This commit is contained in:
Ameya Deshpande
2021-08-13 21:17:20 +02:00
committed by Tommaso Pecorella
parent 2d512ad14b
commit 7be87100a9
9 changed files with 406 additions and 14 deletions

View File

@@ -125,6 +125,16 @@ Ipv4InterfaceAddress::GetScope (void) const
return m_scope;
}
bool Ipv4InterfaceAddress::IsInSameSubnet (const Ipv4Address b) const
{
Ipv4Address aAddr = m_local;
aAddr = aAddr.CombineMask(m_mask);
Ipv4Address bAddr = b;
bAddr = bAddr.CombineMask(m_mask);
return (aAddr == bAddr);
}
bool
Ipv4InterfaceAddress::IsSecondary (void) const
{

View File

@@ -138,6 +138,13 @@ public:
*/
Ipv4InterfaceAddress::InterfaceAddressScope_e GetScope (void) const;
/**
* \brief Checks if the address is in the same subnet.
* \param b the address to check
* \return true if the address is in the same subnet.
*/
bool IsInSameSubnet (const Ipv4Address b) const;
/**
* \brief Check if the address is a secondary address
*