Remove static routing dependencies in code
This commit is contained in:
1 parent
9c069ceafe
commit
2db05b272b
22 files changed
+406
-197
No files matched your search
@@ -23,6 +23,8 @@
|
||||
#include "ns3/object.h"
|
||||
#include "ns3/socket.h"
|
||||
#include "ipv4-header.h"
|
||||
#include "ipv4-interface-address.h"
|
||||
#include "ipv4.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
@@ -91,6 +93,48 @@ public:
|
||||
virtual bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> idev,
|
||||
UnicastForwardCallback ucb, MulticastForwardCallback mcb,
|
||||
LocalDeliverCallback lcb, ErrorCallback ecb) = 0;
|
||||
|
||||
/**
|
||||
* \param interface the index of the interface we are being notified about
|
||||
*
|
||||
* Protocols are expected to implement this method to be notified of the state change of
|
||||
* an interface in a node.
|
||||
*/
|
||||
virtual void NotifyInterfaceUp (uint32_t interface) = 0;
|
||||
/**
|
||||
* \param interface the index of the interface we are being notified about
|
||||
*
|
||||
* Protocols are expected to implement this method to be notified of the state change of
|
||||
* an interface in a node.
|
||||
*/
|
||||
virtual void NotifyInterfaceDown (uint32_t interface) = 0;
|
||||
|
||||
/**
|
||||
* \param interface the index of the interface we are being notified about
|
||||
* \param address a new address being added to an interface
|
||||
*
|
||||
* Protocols are expected to implement this method to be notified whenever
|
||||
* a new address is added to an interface. Typically used to add a 'network route' on an
|
||||
* interface. Can be invoked on an up or down interface.
|
||||
*/
|
||||
virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) = 0;
|
||||
|
||||
/**
|
||||
* \param interface the index of the interface we are being notified about
|
||||
* \param address a new address being added to an interface
|
||||
*
|
||||
* Protocols are expected to implement this method to be notified whenever
|
||||
* a new address is removed from an interface. Typically used to remove the 'network route' of an
|
||||
* interface. Can be invoked on an up or down interface.
|
||||
*/
|
||||
virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) = 0;
|
||||
|
||||
/**
|
||||
* \param ipv4 the ipv4 object this routing protocol is being associated with
|
||||
*
|
||||
* Typically, invoked directly or indirectly from ns3::Ipv4::SetRoutingProtocol
|
||||
*/
|
||||
virtual void SetIpv4 (Ptr<Ipv4> ipv4) = 0;
|
||||
};
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
@@ -357,10 +357,6 @@ public:
|
||||
* \see Ipv4StaticRouting::AddRoute
|
||||
*/
|
||||
virtual void RemoveMulticastRoute (uint32_t index) = 0;
|
||||
|
||||
virtual void SetNode (Ptr<Node> node) = 0;
|
||||
virtual Ptr<Node> GetNode (void) const = 0;
|
||||
|
||||
};
|
||||
|
||||
} // Namespace ns3
|
||||
|
||||
+1
-1
@@ -24,7 +24,6 @@
|
||||
#include "ns3/object.h"
|
||||
#include "ns3/socket.h"
|
||||
#include "ns3/callback.h"
|
||||
#include "ipv4-routing-protocol.h"
|
||||
#include "ipv4-address.h"
|
||||
#include "ipv4-interface-address.h"
|
||||
|
||||
@@ -33,6 +32,7 @@ namespace ns3 {
|
||||
class Node;
|
||||
class NetDevice;
|
||||
class Packet;
|
||||
class Ipv4RoutingProtocol;
|
||||
|
||||
/**
|
||||
* \ingroup node
|
||||
|
||||
Reference in new issue
Block a user