nix-vector-routing: Remove the unused BuildNixVectorLocal () function
This commit removes the dead function `BuildNixVectorLocal ()`. This issue is discussed in #466. Signed-off-by: Ameya Deshpande <ameyanrd@outlook.com>
This commit is contained in:
committed by
Tommaso Pecorella
parent
b7ddd9d3f5
commit
1f894ae7eb
@@ -269,35 +269,6 @@ NixVectorRouting<T>::GetIpRouteInCache (IpAddress address)
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool
|
||||
NixVectorRouting<T>::BuildNixVectorLocal (Ptr<NixVector> nixVector)
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
|
||||
uint32_t numberOfDevices = m_node->GetNDevices ();
|
||||
|
||||
// here we are building a nix vector to
|
||||
// ourself, so we need to find the loopback
|
||||
// interface and add that to the nix vector
|
||||
|
||||
for (uint32_t i = 0; i < numberOfDevices; i++)
|
||||
{
|
||||
uint32_t interfaceIndex = (m_ip)->GetInterfaceForDevice (m_node->GetDevice (i));
|
||||
IpInterfaceAddress ifAddr = m_ip->GetAddress (interfaceIndex, 0);
|
||||
IpAddress ifAddrValue = ifAddr.GetAddress ();
|
||||
if (ifAddrValue.IsLocalhost ())
|
||||
{
|
||||
NS_LOG_LOGIC ("Adding loopback to nix.");
|
||||
NS_LOG_LOGIC ("Adding Nix: " << i << " with " << nixVector->BitCount (numberOfDevices)
|
||||
<< " bits, for node " << m_node->GetId ());
|
||||
nixVector->AddNeighborIndex (i, nixVector->BitCount (numberOfDevices));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool
|
||||
NixVectorRouting<T>::BuildNixVector (const std::vector< Ptr<Node> > & parentVector, uint32_t source, uint32_t dest, Ptr<NixVector> nixVector) const
|
||||
|
||||
@@ -218,13 +218,6 @@ private:
|
||||
*/
|
||||
bool BuildNixVector (const std::vector< Ptr<Node> > & parentVector, uint32_t source, uint32_t dest, Ptr<NixVector> nixVector) const;
|
||||
|
||||
/**
|
||||
* Special variation of BuildNixVector for when a node is sending to itself
|
||||
* \param [out] nixVector the NixVector to be used for routing
|
||||
* \returns true on success, false otherwise.
|
||||
*/
|
||||
bool BuildNixVectorLocal (Ptr<NixVector> nixVector);
|
||||
|
||||
/**
|
||||
* Simply iterates through the nodes net-devices and determines
|
||||
* how many neighbors the node has.
|
||||
|
||||
Reference in New Issue
Block a user