#include <ipv4-nix-vector-routing.h>
Public Member Functions | |
Ipv4NixVectorRouting () | |
~Ipv4NixVectorRouting () | |
void | FlushGlobalNixRoutingCache (void) |
Called when run-time link topology change occurs which iterates through the node list and flushes any nix vector caches. | |
void | SetNode (Ptr< Node > node) |
Set the Node pointer of the node for which this routing protocol is to be placed. | |
![]() | |
virtual void | NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address)=0 |
virtual void | NotifyInterfaceDown (uint32_t interface)=0 |
virtual void | NotifyInterfaceUp (uint32_t interface)=0 |
virtual void | NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address)=0 |
virtual void | PrintRoutingTable (Ptr< OutputStreamWrapper > stream) const =0 |
Print the Routing Table entries. | |
virtual bool | RouteInput (Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb)=0 |
Route an input packet (to be forwarded or locally delivered) | |
virtual Ptr< Ipv4Route > | RouteOutput (Ptr< Packet > p, const Ipv4Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr)=0 |
Query routing cache for an existing route, for an outbound packet. | |
virtual void | SetIpv4 (Ptr< Ipv4 > ipv4)=0 |
![]() | |
Object () | |
virtual | ~Object () |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Start (void) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
virtual | ~ObjectBase () |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
The Interface ID of the Global Router interface. |
Private Attributes | |
Ptr< Ipv4 > | m_ipv4 |
Ipv4RouteMap_t | m_ipv4RouteCache |
NixMap_t | m_nixCache |
Ptr< Node > | m_node |
uint32_t | m_totalNeighbors |
Additional Inherited Members | |
![]() | |
typedef Callback< void, Ptr < const Packet >, const Ipv4Header &, Socket::SocketErrno > | ErrorCallback |
typedef Callback< void, Ptr < const Packet >, const Ipv4Header &, uint32_t > | LocalDeliverCallback |
typedef Callback< void, Ptr < Ipv4MulticastRoute >, Ptr < const Packet >, const Ipv4Header & > | MulticastForwardCallback |
typedef Callback< void, Ptr < Ipv4Route >, Ptr< const Packet >, const Ipv4Header & > | UnicastForwardCallback |
![]() | |
Object (const Object &o) | |
virtual void | DoDispose (void) |
virtual void | DoStart (void) |
virtual void | NotifyNewAggregate (void) |
Nix-vector routing protocol
Definition at line 49 of file ipv4-nix-vector-routing.h.
ns3::Ipv4NixVectorRouting::Ipv4NixVectorRouting | ( | ) |
Definition at line 47 of file ipv4-nix-vector-routing.cc.
References NS_LOG_FUNCTION_NOARGS.
ns3::Ipv4NixVectorRouting::~Ipv4NixVectorRouting | ( | ) |
Definition at line 53 of file ipv4-nix-vector-routing.cc.
References NS_LOG_FUNCTION_NOARGS.
|
private |
Definition at line 728 of file ipv4-nix-vector-routing.cc.
References ns3::NetDeviceContainer::Begin(), ns3::NetDeviceContainer::End(), GetAdjacentNetDevices(), ns3::NetDevice::GetChannel(), ns3::Node::GetDevice(), ns3::Node::GetId(), ns3::Node::GetNDevices(), ns3::Object::GetObject(), ns3::NetDevice::IsLinkUp(), ns3::Ipv4::IsUp(), NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.
Referenced by GetNixVector().
|
private |
Definition at line 225 of file ipv4-nix-vector-routing.cc.
References ns3::NixVector::AddNeighborIndex(), ns3::NetDeviceContainer::Begin(), ns3::NixVector::BitCount(), ns3::NetDeviceContainer::End(), GetAdjacentNetDevices(), ns3::NetDevice::GetChannel(), ns3::Node::GetDevice(), ns3::Node::GetId(), ns3::NetDeviceContainer::GetN(), ns3::Node::GetNDevices(), ns3::NetDevice::IsBridge(), NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.
Referenced by GetNixVector().
Definition at line 198 of file ipv4-nix-vector-routing.cc.
References ns3::NixVector::AddNeighborIndex(), ns3::NixVector::BitCount(), ns3::Ipv4::GetAddress(), ns3::Node::GetDevice(), ns3::Node::GetId(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Node::GetNDevices(), m_ipv4, m_node, NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.
|
private |
Definition at line 69 of file ipv4-nix-vector-routing.cc.
References m_ipv4, m_node, and NS_LOG_FUNCTION_NOARGS.
|
private |
Definition at line 437 of file ipv4-nix-vector-routing.cc.
References ns3::NetDeviceContainer::Get(), ns3::Ipv4::GetAddress(), GetAdjacentNetDevices(), ns3::NetDevice::GetChannel(), ns3::Node::GetDevice(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::NetDeviceContainer::GetN(), ns3::Node::GetNDevices(), ns3::NetDevice::GetNode(), ns3::Object::GetObject(), and m_node.
Referenced by RouteInput(), and RouteOutput().
|
private |
Definition at line 366 of file ipv4-nix-vector-routing.cc.
References GetAdjacentNetDevices(), ns3::NetDevice::GetChannel(), ns3::Node::GetDevice(), ns3::NetDeviceContainer::GetN(), ns3::Node::GetNDevices(), and m_node.
Referenced by RouteInput(), and RouteOutput().
void ns3::Ipv4NixVectorRouting::FlushGlobalNixRoutingCache | ( | void | ) |
Called when run-time link topology change occurs which iterates through the node list and flushes any nix vector caches.
Definition at line 89 of file ipv4-nix-vector-routing.cc.
References ns3::NodeList::Begin(), ns3::NodeList::End(), ns3::Object::GetObject(), NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.
Referenced by NotifyAddAddress(), NotifyInterfaceDown(), NotifyInterfaceUp(), and NotifyRemoveAddress().
|
private |
Definition at line 115 of file ipv4-nix-vector-routing.cc.
References m_ipv4RouteCache, and NS_LOG_FUNCTION_NOARGS.
|
private |
Definition at line 108 of file ipv4-nix-vector-routing.cc.
References m_nixCache, and NS_LOG_FUNCTION_NOARGS.
|
private |
Definition at line 298 of file ipv4-nix-vector-routing.cc.
References ns3::NetDeviceContainer::Add(), ns3::NetDevice::GetChannel(), ns3::Channel::GetDevice(), ns3::Channel::GetNDevices(), NetDeviceIsBridged(), NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.
Referenced by BFS(), BuildNixVector(), FindNetDeviceForNixIndex(), and FindTotalNeighbors().
|
private |
Definition at line 182 of file ipv4-nix-vector-routing.cc.
References m_ipv4RouteCache, NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.
Referenced by RouteInput(), and RouteOutput().
|
private |
Definition at line 122 of file ipv4-nix-vector-routing.cc.
References BFS(), BuildNixVector(), ns3::Node::GetId(), ns3::NodeList::GetNNodes(), GetNodeByIp(), NS_LOG_DEBUG, NS_LOG_ERROR, and NS_LOG_FUNCTION_NOARGS.
Referenced by RouteOutput().
|
private |
Definition at line 166 of file ipv4-nix-vector-routing.cc.
References m_nixCache, NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.
Referenced by RouteOutput().
|
private |
Definition at line 338 of file ipv4-nix-vector-routing.cc.
References ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), ns3::NodeContainer::GetGlobal(), ns3::Ipv4::GetInterfaceForAddress(), ns3::Object::GetObject(), NS_LOG_ERROR, and NS_LOG_FUNCTION_NOARGS.
Referenced by GetNixVector().
|
static |
The Interface ID of the Global Router interface.
This method returns the TypeId associated to ns3::Ipv4NixVectorRouting.
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Ipv4RoutingProtocol.
Definition at line 38 of file ipv4-nix-vector-routing.cc.
References ns3::TypeId::SetParent().
|
private |
Definition at line 397 of file ipv4-nix-vector-routing.cc.
References ns3::Node::GetDevice(), ns3::Node::GetNDevices(), ns3::NetDevice::GetNode(), ns3::Object::GetObject(), ns3::NetDevice::IsBridge(), NS_ABORT_MSG_UNLESS, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by GetAdjacentNetDevices().
|
privatevirtual |
Definition at line 717 of file ipv4-nix-vector-routing.cc.
References FlushGlobalNixRoutingCache().
|
privatevirtual |
Definition at line 712 of file ipv4-nix-vector-routing.cc.
References FlushGlobalNixRoutingCache().
|
privatevirtual |
Definition at line 707 of file ipv4-nix-vector-routing.cc.
References FlushGlobalNixRoutingCache().
|
privatevirtual |
Definition at line 722 of file ipv4-nix-vector-routing.cc.
References FlushGlobalNixRoutingCache().
|
privatevirtual |
Definition at line 662 of file ipv4-nix-vector-routing.cc.
References ns3::Names::FindName(), ns3::OutputStreamWrapper::GetStream(), m_ipv4RouteCache, and m_nixCache.
|
private |
|
privatevirtual |
Definition at line 604 of file ipv4-nix-vector-routing.cc.
References ns3::NixVector::BitCount(), ns3::NixVector::ExtractNeighborIndex(), FindNetDeviceForNixIndex(), FindTotalNeighbors(), ns3::Ipv4::GetAddress(), ns3::Ipv4Header::GetDestination(), ns3::Node::GetDevice(), ns3::Node::GetId(), GetIpv4RouteInCache(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Ipv4::GetNetDevice(), ns3::Packet::GetNixVector(), m_ipv4, m_ipv4RouteCache, m_node, m_totalNeighbors, NS_ASSERT, NS_LOG_FUNCTION_NOARGS, NS_LOG_LOGIC, ns3::Ipv4Route::SetDestination(), ns3::Ipv4Route::SetGateway(), ns3::Ipv4Route::SetOutputDevice(), and ns3::Ipv4Route::SetSource().
|
privatevirtual |
Definition at line 483 of file ipv4-nix-vector-routing.cc.
References ns3::NixVector::Copy(), ns3::Socket::ERROR_NOROUTETOHOST, ns3::Socket::ERROR_NOTERROR, FindNetDeviceForNixIndex(), FindTotalNeighbors(), ns3::Ipv4::GetAddress(), ns3::Ipv4Header::GetDestination(), ns3::Node::GetDevice(), GetIpv4RouteInCache(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Ipv4::GetNetDevice(), GetNixVector(), GetNixVectorInCache(), ns3::Ipv4Route::GetOutputDevice(), m_ipv4, m_ipv4RouteCache, m_nixCache, m_node, m_totalNeighbors, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_ERROR, NS_LOG_FUNCTION_NOARGS, NS_LOG_LOGIC, ns3::Ipv4Route::SetDestination(), ns3::Ipv4Route::SetGateway(), ns3::Packet::SetNixVector(), ns3::Ipv4Route::SetOutputDevice(), and ns3::Ipv4Route::SetSource().
Definition at line 59 of file ipv4-nix-vector-routing.cc.
References m_ipv4, NS_ASSERT, and NS_LOG_DEBUG.
Set the Node pointer of the node for which this routing protocol is to be placed.
node | Node pointer |
Definition at line 81 of file ipv4-nix-vector-routing.cc.
References m_node, and NS_LOG_FUNCTION_NOARGS.
Definition at line 162 of file ipv4-nix-vector-routing.h.
Referenced by BuildNixVectorLocal(), DoDispose(), RouteInput(), RouteOutput(), and SetIpv4().
|
private |
Definition at line 160 of file ipv4-nix-vector-routing.h.
Referenced by FlushIpv4RouteCache(), GetIpv4RouteInCache(), PrintRoutingTable(), RouteInput(), and RouteOutput().
|
private |
Definition at line 157 of file ipv4-nix-vector-routing.h.
Referenced by FlushNixCache(), GetNixVectorInCache(), PrintRoutingTable(), and RouteOutput().
Definition at line 163 of file ipv4-nix-vector-routing.h.
Referenced by BuildNixVectorLocal(), DoDispose(), FindNetDeviceForNixIndex(), FindTotalNeighbors(), RouteInput(), RouteOutput(), and SetNode().
|
private |
Definition at line 167 of file ipv4-nix-vector-routing.h.
Referenced by RouteInput(), and RouteOutput().