21 #ifndef IPV4_NIX_VECTOR_ROUTING_H
22 #define IPV4_NIX_VECTOR_ROUTING_H
26 #include "ns3/channel.h"
27 #include "ns3/node-container.h"
28 #include "ns3/node-list.h"
29 #include "ns3/net-device-container.h"
30 #include "ns3/ipv4-routing-protocol.h"
31 #include "ns3/ipv4-route.h"
32 #include "ns3/nix-vector.h"
33 #include "ns3/bridge-net-device.h"
40 typedef std::map<Ipv4Address, Ptr<NixVector> >
NixMap_t;
79 void FlushNixCache (
void);
83 void FlushIpv4RouteCache (
void);
88 void ResetTotalNeighbors (
void);
110 bool BuildNixVector (
const std::vector<
Ptr<Node> > & parentVector, uint32_t source, uint32_t dest,
Ptr<NixVector> nixVector);
117 uint32_t FindTotalNeighbors (
void);
125 uint32_t FindNetDeviceForNixIndex (uint32_t nodeIndex,
Ipv4Address & gatewayIp);
135 bool BFS (uint32_t numberOfNodes,
167 uint32_t m_totalNeighbors;
void SetNode(Ptr< Node > node)
Set the Node pointer of the node for which this routing protocol is to be placed. ...
void FlushGlobalNixRoutingCache(void)
Called when run-time link topology change occurs which iterates through the node list and flushes any...
holds a vector of ns3::NetDevice pointers
static TypeId GetTypeId(void)
The Interface ID of the Global Router interface.
virtual void NotifyInterfaceDown(uint32_t interface)
virtual void NotifyInterfaceUp(uint32_t interface)
virtual void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address)
virtual Ptr< Ipv4Route > RouteOutput(Ptr< Packet > p, const Ipv4Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr)
Query routing cache for an existing route, for an outbound packet.
virtual void SetIpv4(Ptr< Ipv4 > ipv4)
Ipv4 addresses are stored in host order in this class.
a class to store IPv4 address information on an interface
virtual bool RouteInput(Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb)
Route an input packet (to be forwarded or locally delivered)
Abstract base class for IPv4 routing protocols.
virtual void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
a unique identifier for an interface.
std::map< Ipv4Address, Ptr< Ipv4Route > > Ipv4RouteMap_t
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream) const
Print the Routing Table entries.
std::map< Ipv4Address, Ptr< NixVector > > NixMap_t