nix-vector-routing: Handle Multiple Wifi connections with same channel object
Signed-off-by: Ameya Deshpande <ameyanrd@outlook.com>
This commit is contained in:
committed by
Tommaso Pecorella
parent
2d512ad14b
commit
7be87100a9
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user