equal
deleted
inserted
replaced
80 NodeContainer n02 = NodeContainer (c.Get(0), c.Get (2)); |
80 NodeContainer n02 = NodeContainer (c.Get(0), c.Get (2)); |
81 NodeContainer n12 = NodeContainer (c.Get(1), c.Get (2)); |
81 NodeContainer n12 = NodeContainer (c.Get(1), c.Get (2)); |
82 NodeContainer n32 = NodeContainer (c.Get(3), c.Get (2)); |
82 NodeContainer n32 = NodeContainer (c.Get(3), c.Get (2)); |
83 NodeContainer n34 = NodeContainer (c.Get (3), c.Get (4)); |
83 NodeContainer n34 = NodeContainer (c.Get (3), c.Get (4)); |
84 |
84 |
|
85 // Enable OLSR |
|
86 NS_LOG_INFO ("Enabling OLSR Routing."); |
|
87 OlsrHelper olsr; |
|
88 |
|
89 Ipv4StaticRoutingHelper staticRouting; |
|
90 |
|
91 Ipv4ListRoutingHelper list; |
|
92 list.Add (staticRouting, 0); |
|
93 list.Add (olsr, 10); |
|
94 |
85 InternetStackHelper internet; |
95 InternetStackHelper internet; |
|
96 internet.SetRoutingHelper (list); |
86 internet.Install (c); |
97 internet.Install (c); |
87 |
98 |
88 // We create the channels first without any IP addressing information |
99 // We create the channels first without any IP addressing information |
89 NS_LOG_INFO ("Create channels."); |
100 NS_LOG_INFO ("Create channels."); |
90 PointToPointHelper p2p; |
101 PointToPointHelper p2p; |
109 ipv4.SetBase ("10.1.3.0", "255.255.255.0"); |
120 ipv4.SetBase ("10.1.3.0", "255.255.255.0"); |
110 Ipv4InterfaceContainer i32 = ipv4.Assign (nd32); |
121 Ipv4InterfaceContainer i32 = ipv4.Assign (nd32); |
111 |
122 |
112 ipv4.SetBase ("10.1.4.0", "255.255.255.0"); |
123 ipv4.SetBase ("10.1.4.0", "255.255.255.0"); |
113 Ipv4InterfaceContainer i34 = ipv4.Assign (nd34); |
124 Ipv4InterfaceContainer i34 = ipv4.Assign (nd34); |
114 |
|
115 // Enable OLSR |
|
116 NS_LOG_INFO ("Enabling OLSR Routing."); |
|
117 OlsrHelper olsr; |
|
118 olsr.InstallAll (); |
|
119 |
125 |
120 // Create the OnOff application to send UDP datagrams of size |
126 // Create the OnOff application to send UDP datagrams of size |
121 // 210 bytes at a rate of 448 Kb/s |
127 // 210 bytes at a rate of 448 Kb/s |
122 NS_LOG_INFO ("Create Applications."); |
128 NS_LOG_INFO ("Create Applications."); |
123 uint16_t port = 9; // Discard port (RFC 863) |
129 uint16_t port = 9; // Discard port (RFC 863) |