80 DebugComponentEnable("DropTailQueue"); |
80 DebugComponentEnable("DropTailQueue"); |
81 DebugComponentEnable("Channel"); |
81 DebugComponentEnable("Channel"); |
82 DebugComponentEnable("PointToPointChannel"); |
82 DebugComponentEnable("PointToPointChannel"); |
83 DebugComponentEnable("PointToPointNetDevice"); |
83 DebugComponentEnable("PointToPointNetDevice"); |
84 DebugComponentEnable("StaticRouter"); |
84 DebugComponentEnable("StaticRouter"); |
|
85 DebugComponentEnable("StaticRouteManager"); |
85 #endif |
86 #endif |
86 |
87 |
87 // Set up some default values for the simulation. Use the Bind() |
88 // Set up some default values for the simulation. Use the Bind() |
88 // technique to tell the system what subclass of Queue to use, |
89 // technique to tell the system what subclass of Queue to use, |
89 // and what the queue limit is |
90 // and what the queue limit is |
144 // The below functions might better be placed in some kind of |
145 // The below functions might better be placed in some kind of |
145 // Simulator::Initialization function (for further study) |
146 // Simulator::Initialization function (for further study) |
146 routeManager->BuildStaticRoutingDatabase (); |
147 routeManager->BuildStaticRoutingDatabase (); |
147 routeManager->InitializeRoutes (); |
148 routeManager->InitializeRoutes (); |
148 |
149 |
149 // XXX this goes away once static routing is in place |
|
150 // Finally, we add static routes. These three steps (Channel and |
|
151 // NetDevice creation, IP Address assignment, and routing) are |
|
152 // separated because there may be a need to postpone IP Address |
|
153 // assignment (emulation) or modify to use dynamic routing |
|
154 PointToPointTopology::AddIpv4Routes(n0, n2, channel0); |
|
155 PointToPointTopology::AddIpv4Routes(n1, n2, channel1); |
|
156 PointToPointTopology::AddIpv4Routes(n2, n3, channel2); |
|
157 |
|
158 // Create the OnOff application to send UDP datagrams of size |
150 // Create the OnOff application to send UDP datagrams of size |
159 // 210 bytes at a rate of 448 Kb/s |
151 // 210 bytes at a rate of 448 Kb/s |
160 Ptr<OnOffApplication> ooff = Create<OnOffApplication> ( |
152 Ptr<OnOffApplication> ooff = Create<OnOffApplication> ( |
161 n0, |
153 n0, |
162 Ipv4Address("10.1.3.2"), |
154 Ipv4Address("10.1.3.2"), |