--- scratch/wifi-mesh-orig.cc 2008-11-08 11:46:46.000000000 -0800 +++ scratch/wifi-mesh.cc 2008-11-08 11:49:08.000000000 -0800 @@ -30,7 +30,7 @@ clock_t finish; double diff; - double simtime=2.0; + double simtime=12.0; uint16_t port = 200; //uint32_t nPackets = 1; uint32_t nNodes = 3; @@ -125,7 +125,7 @@ Ipv4AddressHelper address; - address.SetBase("192.168.0.0","255.255.255.0"); + address.SetBase("192.168.0.0","255.255.255.255"); Ipv4InterfaceContainer wifiInterfaces; wifiInterfaces = address.Assign (wifiDevices); @@ -137,9 +137,8 @@ NS_LOG_INFO ("Enabling OLSR routing on all backbone nodes"); OlsrHelper olsr; olsr.Install(meshNodes); + olsr.Install(internetNodes); - GlobalRouteManager::PopulateRoutingTables (); - OnOffHelper onoff ("ns3::UdpSocketFactory",InetSocketAddress(csmaInterfaces.GetAddress (0),port)); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (simtime))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); @@ -157,7 +156,7 @@ ApplicationContainer internetApps = sink.Install(internetNodes); - internetApps.Start (Seconds (0)); + internetApps.Start (Seconds (10)); internetApps.Stop (Seconds (simtime)); Simulator::Stop (Seconds (simtime));