equal
deleted
inserted
replaced
39 |
39 |
40 #include "ns3/core-module.h" |
40 #include "ns3/core-module.h" |
41 #include "ns3/simulator-module.h" |
41 #include "ns3/simulator-module.h" |
42 #include "ns3/node-module.h" |
42 #include "ns3/node-module.h" |
43 #include "ns3/helper-module.h" |
43 #include "ns3/helper-module.h" |
44 #include "ns3/global-route-manager.h" |
|
45 |
44 |
46 using namespace ns3; |
45 using namespace ns3; |
47 |
46 |
48 NS_LOG_COMPONENT_DEFINE ("SimpleAlternateRoutingExample"); |
47 NS_LOG_COMPONENT_DEFINE ("SimpleAlternateRoutingExample"); |
49 |
48 |
51 main (int argc, char *argv[]) |
50 main (int argc, char *argv[]) |
52 { |
51 { |
53 // Users may find it convenient to turn on explicit debugging |
52 // Users may find it convenient to turn on explicit debugging |
54 // for selected modules; the below lines suggest how to do this |
53 // for selected modules; the below lines suggest how to do this |
55 #if 0 |
54 #if 0 |
56 LogComponentEnable("GlobalRouteManager", LOG_LOGIC); |
55 LogComponentEnable("GlobalRoutingHelper", LOG_LOGIC); |
57 LogComponentEnable("GlobalRouter", LOG_LOGIC); |
56 LogComponentEnable("GlobalRouter", LOG_LOGIC); |
58 #endif |
57 #endif |
59 |
58 |
60 |
59 |
61 Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210)); |
60 Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210)); |
128 i1i3.SetMetric (0, sampleMetric); |
127 i1i3.SetMetric (0, sampleMetric); |
129 i1i3.SetMetric (1, sampleMetric); |
128 i1i3.SetMetric (1, sampleMetric); |
130 |
129 |
131 // Create router nodes, initialize routing database and set up the routing |
130 // Create router nodes, initialize routing database and set up the routing |
132 // tables in the nodes. |
131 // tables in the nodes. |
133 GlobalRouteManager::PopulateRoutingTables (); |
132 Ipv4GlobalRoutingHelper::PopulateRoutingTables (); |
134 |
133 |
135 // Create the OnOff application to send UDP datagrams |
134 // Create the OnOff application to send UDP datagrams |
136 NS_LOG_INFO ("Create Application."); |
135 NS_LOG_INFO ("Create Application."); |
137 uint16_t port = 9; // Discard port (RFC 863) |
136 uint16_t port = 9; // Discard port (RFC 863) |
138 |
137 |