static routing
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
|
||||
#include "ns3/composite-trace-resolver.h"
|
||||
#include "ns3/net-device.h"
|
||||
#include "ns3/routing-environment.h"
|
||||
#include "ns3/static-router.h"
|
||||
|
||||
#include "l3-demux.h"
|
||||
#include "ipv4-l4-demux.h"
|
||||
@@ -37,7 +39,6 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
InternetNode::InternetNode()
|
||||
{
|
||||
Construct ();
|
||||
@@ -76,9 +77,19 @@ InternetNode::Construct (void)
|
||||
Object::AddInterface (udpImpl);
|
||||
Object::AddInterface (l3Demux);
|
||||
Object::AddInterface (ipv4L4Demux);
|
||||
//
|
||||
// If static routing has been enabled via bind(), all nodes will have the
|
||||
// capacity to participate in the global static routing scheme. The presence
|
||||
// of the StaticRouter interface tells the route manager that it needs to
|
||||
// ask a given node about any link state records that it may want to advertise.
|
||||
//
|
||||
if (RoutingEnvironment::StaticRoutingEnabled())
|
||||
{
|
||||
Ptr<StaticRouter> staticRouter = Create<StaticRouter> (this);
|
||||
Object::AddInterface (staticRouter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TraceResolver *
|
||||
InternetNode::DoCreateTraceResolver (TraceContext const &context)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user