<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.network.simulator.ns3.user">
    <title>gmane.network.simulator.ns3.user</title>
    <link>http://blog.gmane.org/gmane.network.simulator.ns3.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20404"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20403"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20402"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20401"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20400"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20399"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20398"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20396"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20392"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20391"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20389"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20387"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20386"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20384"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20383"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20382"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20379"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20378"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20369"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.simulator.ns3.user/20368"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20404">
    <title>channel model for mobile multi-hop wifi networks</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20404</link>
    <description>&lt;pre&gt; 

Dear ns3users,

could anybody recommend me a channel model for the simulation of mobile 
wifi ad-hoc networks? Is out there a particular example I should rely on? 

Thanks in advance,

Marco

&lt;/pre&gt;</description>
    <dc:creator>Marco Mezzavilla</dc:creator>
    <dc:date>2013-06-19T18:17:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20403">
    <title>handover in lte</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20403</link>
    <description>&lt;pre&gt;Hey Evreyone ,

How can i add a voice trafic in LTE , i want to simulate a UE between  base 
station LTE .

tnx.


&lt;/pre&gt;</description>
    <dc:creator>walid zahri</dc:creator>
    <dc:date>2013-06-19T18:14:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20402">
    <title>Protocol value in FiveTuple</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20402</link>
    <description>&lt;pre&gt;I have a  simple network 4 nodes with onoff application. There are 2 UDP 
flows instantiated using UdpSocketfactory and 1 TCP flow instantialted 
using TcpSocketfactory. 
I am using flowmonitor  and flowstats to print out the flow statistics (see 
appended code snippet). Everything works fine except that the  protocol 
field 
in the fivetuple is empty (See attached results) which I gather should be 
17 for UDP and 6 for TCP. 

When I create a flow using the UDPSocketfactory, isn't the protocol field 
set to UDP? 

My apologies if this has already been discussed before. 

Thanks. 

Dipak 

----------------------------code snippet 
-----------------------------------------------------------------------
  monitor-&amp;gt;CheckForLostPackets (); 
   Ptr&amp;lt;Ipv4FlowClassifier&amp;gt; classifier = DynamicCast&amp;lt;Ipv4FlowClassifier&amp;gt; 
(fl.GetClassifier ());
   std::map&amp;lt;FlowId, FlowMonitor::FlowStats&amp;gt; stats = monitor-&amp;gt;GetFlowStats 
();

   for (std::map&amp;lt;FlowId, FlowMonitor::FlowStats&amp;gt;::const_iterator iter = 
stats.begin (); iter != stats.end (); ++iter)
     {
          Ipv4FlowClassifier::FiveTuple t = classifier-&amp;gt;FindFlow 
(iter-&amp;gt;first);
       
   NS_LOG_UNCOND("Flow ID: " &amp;lt;&amp;lt; iter-&amp;gt;first &amp;lt;&amp;lt; "  Protocol  " &amp;lt;&amp;lt; t.protocol 
&amp;lt;&amp;lt; " Src Addr " &amp;lt;&amp;lt; t.sourceAddress &amp;lt;&amp;lt; " Dst Addr " &amp;lt;&amp;lt; t.destinationAddress);
      NS_LOG_UNCOND("Tx Packets = " &amp;lt;&amp;lt; iter-&amp;gt;second.txPackets);
      NS_LOG_UNCOND("Rx Packets = " &amp;lt;&amp;lt; iter-&amp;gt;second.rxPackets);
      NS_LOG_UNCOND("Lost Packets = " &amp;lt;&amp;lt; iter-&amp;gt;second.lostPackets);
      NS_LOG_UNCOND("Throughput: " &amp;lt;&amp;lt; iter-&amp;gt;second.rxBytes * 8.0 / 
(iter-&amp;gt;second.timeLastRxPacket.GetSeconds()-iter-&amp;gt;second.timeFirstTxPacket.GetSeconds()) 
/ 1024  &amp;lt;&amp;lt; " Kbps");
     }

----------------------------------------Results (attached) 
-------------------------

Waf: Entering directory `/home/dipakghosal/workspace/ns-3-dev/build'
Waf: Leaving directory `/home/dipakghosal/workspace/ns-3-dev/build'
'build' finished successfully (0.521s)
Creating the nodes
Creating channels and adding address space
Create applications
Flowmonitor enabled and created
Simulation done
Protocol   
Flow ID: 1  Protocol    Src Addr 10.1.1.1 Dst Addr 10.1.3.1
Tx Packets = 2
Rx Packets = 2
Lost Packets = 0
Throughput: 16.9498 Kbps
Protocol   
Flow ID: 2  Protocol    Src Addr 10.1.3.1 Dst Addr 10.1.1.1
Tx Packets = 1
Rx Packets = 1
Lost Packets = 0
Throughput: 25.4247 Kbps
Protocol   
Flow ID: 3  Protocol    Src Addr 10.1.1.1 Dst Addr 10.1.3.1
Tx Packets = 2133
Rx Packets = 2133
Lost Packets = 0
Throughput: 495.218 Kbps
Protocol   
Flow ID: 4  Protocol    Src Addr 10.1.2.1 Dst Addr 10.1.3.1
Tx Packets = 2106
Rx Packets = 2106
Lost Packets = 0
Throughput: 495.212 Kbps

&lt;/pre&gt;</description>
    <dc:creator>Dipak Ghosal</dc:creator>
    <dc:date>2013-06-19T17:46:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20401">
    <title>Set Pathloss</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20401</link>
    <description>&lt;pre&gt;Hi everyone!

I want to set the OkumuraHataPropagationLossModel.

I use this line of code 
"lteHelper-&amp;gt;SetAttribute("PathlossModel",StringValue("ns3::OkumuraHataPropagationLossModel"));"

but when i build the project i see this messagge "msg="Requested 
constructor for ns3::OkumuraHataPropagationLossModel but it does not have 
one.", file=../src/core/model/type-id.cc, line=213"

I don'tundertand the problem.

Please help me

Antonino

&lt;/pre&gt;</description>
    <dc:creator>antonino.masaracchia-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-06-19T16:31:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20400">
    <title>Disable Aacknowlegment in MAC</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20400</link>
    <description>&lt;pre&gt;
Hi to all,

I was trying to provide a new mechanism for reliability in MAC layer, 
therefore I needed to disable the ACK packets and retransmissions in MAC 
layer. I could disable retransmission by using :
  Config::SetDefault 
("ns3::WifiRemoteStationManager::MaxSlrc",StringValue("0"));

however I could not find any easy way to disable ACK packets. is there any 
easy way to do that? 

Best regards
Peyman

&lt;/pre&gt;</description>
    <dc:creator>peyman</dc:creator>
    <dc:date>2013-06-19T14:34:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20399">
    <title>LENA supported only IPv4?</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20399</link>
    <description>&lt;pre&gt;Hi guys!

line 200 in [ns-3-dev\src\lte\model\Lte-ue-net-device.cc] 
LteUeNetDevice::Send (Ptr&amp;lt;Packet&amp;gt; packet, const Address&amp;amp; dest, uint16_t 
protocolNumber)
{
  NS_LOG_FUNCTION (this &amp;lt;&amp;lt; dest &amp;lt;&amp;lt; protocolNumber);
  NS_ASSERT_MSG (protocolNumber == Ipv4L3Protocol::PROT_NUMBER, 
"unsupported protocol " &amp;lt;&amp;lt; protocolNumber &amp;lt;&amp;lt; ", *only IPv4 is supported*");
  
  return m_nas-&amp;gt;Send (packet);
}

LENA of NS3 support only Ipv4??
why do not support other protocol ?

&lt;/pre&gt;</description>
    <dc:creator>YW</dc:creator>
    <dc:date>2013-06-19T13:19:03</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20398">
    <title>basic question regarding GetTypeId</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20398</link>
    <description>&lt;pre&gt;Hello all,

I have been learning ns3 the last 1-2 months and I believe that I have 
reached a level where I can solve most of my problems simply by browsing 
the doxygen documentation.
But today I came up against a strange ns3 behavior, which can not be solved 
solely by doxygen, so I would be glad if anybody offered some help.

What is the method "GetTypeId" supposed to return?

For example go to the first example (where you create 2 point to point 
devices) of the tutorial first.cc and add the following line right 
before Simulator::Run ()

std::cout &amp;lt;&amp;lt; "The device is " &amp;lt;&amp;lt; devices.Get (1)-&amp;gt;GetTypeId() &amp;lt;&amp;lt; std::endl;

The program will return

The device is ns3::NetDevice

instead of 

The device is ns3::PointToPointNetDevice

as one might expect.

the devices are created by the PointToPointHelper, which according to its 
source file (line 229) found here

http://www.nsnam.org/doxygen/point-to-point-helper_8cc_source.html#l00225

creates "point to point net device" instead of "net device".

Thus, the "GetTypeId" should return what is mentioned in  
PointToPointNetDevice::GetTypeId&amp;lt;http://www.nsnam.org/doxygen/classns3_1_1_point_to_point_net_device.html#a045e48d24e615c82db1a9a952a9725b5&amp;gt;() 
found in the following link

http://www.nsnam.org/doxygen/point-to-point-net-device_8cc_source.html#l00040

and more specifically at line 42  ( static TypeId&amp;lt;http://www.nsnam.org/doxygen/classns3_1_1_type_id.html&amp;gt;tid = 
TypeId &amp;lt;http://www.nsnam.org/doxygen/classns3_1_1_type_id.html&amp;gt; (
"ns3::PointToPointNetDevice"))

How can this behavior be explained?

thanks in advance to anyone who will dedicate his/her time to help me

&lt;/pre&gt;</description>
    <dc:creator>Foivos Michelinakis</dc:creator>
    <dc:date>2013-06-19T12:52:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20396">
    <title>passing nodecontainer object as argument :: URGENT</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20396</link>
    <description>&lt;pre&gt;is it wrong to pass a node container object as argument to a function:
 int main()
{
nodecontainer mobnodes;
......
//function call configmovements(mobnodes, .....)

}

void configmovements(nodecontainer mobnodes, .....)
{
NodeContainer::Iterator i=mobnodes.Begin() ....

}

is it right to do so....please its very urgent!!

&lt;/pre&gt;</description>
    <dc:creator>GAURAV JAIN</dc:creator>
    <dc:date>2013-06-19T12:20:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20392">
    <title>Issue in sending internal traffic in Emulation mode</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20392</link>
    <description>&lt;pre&gt;Hi All,


           I'm using following topology in emulation mode:

Laptop-1                                                                                                            

             
          Now the program is running in Emulation mode. In this, I can 
successfully transfer the packet from Laptop-1 to Laptop-2. But if I try to 
generate and send internal traffic from (say) Node N4 to node N6, then it 
doesnt send any packet. It just do 'ARP' request and response from N4 to N6 
and back. But no transmission is done. But if I use "Simulation" mode then 
I'm able to send packets from node N4 to N6.

           So, I need your guidance here. At first, could you please let me 
know whether I can send internal traffic in Emulation mode or not. Second 
thing is how to do it. Please let me know. I need this thing at very urgent.


Thanks &amp;amp; regards,
Deep Singh.

&lt;/pre&gt;</description>
    <dc:creator>Deep Singh</dc:creator>
    <dc:date>2013-06-19T10:20:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20391">
    <title>NS3 requirements</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20391</link>
    <description>&lt;pre&gt;Hi;
What are the requirements or skills that I should have to be professional 
in NS3?
Thank you all. 

&lt;/pre&gt;</description>
    <dc:creator>aboseser</dc:creator>
    <dc:date>2013-06-19T09:46:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20389">
    <title>how to use "double BasicEnergySource::GetRemainingEnergy (void)" to get the remaining energy after the user defined function.</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20389</link>
    <description>&lt;pre&gt;Hello sir

I am trying to find energy consumed in finding the shortest path(static). 
Energy module used is basicEnergySource.
When generate traffic is called energy is consumed due to packet sending, 
but our user defined function has no impact on battery energy.
Please help me with this problem.
Please find the attachment for the program.
Thanking you..

&lt;/pre&gt;</description>
    <dc:creator>manoj.7390-Re5JQEeQqe8AvxtiuMwx3w&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-06-19T07:51:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20387">
    <title>how to install visualizer for ns-3.16</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20387</link>
    <description>&lt;pre&gt;

&lt;/pre&gt;</description>
    <dc:creator>deepu deepak</dc:creator>
    <dc:date>2013-06-19T05:26:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20386">
    <title>LENA+EMU</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20386</link>
    <description>&lt;pre&gt;adding  two emu to pgw and ue node respectively, I want to transmit real 
data in lte network .but now when i add an emu to pgw ,I try to receive and 
send data only using the emu ,nothing else i used ,however,   the question 
is when i don't add l"teHelper-&amp;gt;Attach (ueLteDevs.Get(0), 
enbLteDevs.Get(0))",the emu work very well , when I add it ,I get the data 
slower and don't get the data for a while,and a moment later ,I get 
again,finally I can't get  the data in the physical host;  

&lt;/pre&gt;</description>
    <dc:creator>5shiwolong-k+cT0dCbe1g&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-06-19T03:09:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20384">
    <title>OnOffAplication error !</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20384</link>
    <description>&lt;pre&gt;i am trying to simulate this programme using OnOffApplication CBR 
the logging output always about  OnOffApplication and no information or 
output about PacketSink !! 
i enable logging for both OnOffApplication and PacketSink 
could you tell me why !! PLZ :(



using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("MyThirdScriptExample");




int 
main (int argc, char *argv[])
{
  bool verbose = true;
  uint32_t nCsma = 3;
  uint32_t nWifi = 3;

  CommandLine cmd;
  cmd.AddValue ("nCsma", "Number of \"extra\" CSMA nodes/devices", nCsma);
  cmd.AddValue ("nWifi", "Number of wifi STA devices", nWifi);
  cmd.AddValue ("verbose", "Tell echo applications to log if true", 
verbose);

  cmd.Parse (argc,argv);

  if (nWifi &amp;gt; 18)
    {
      std::cout &amp;lt;&amp;lt; "Number of wifi nodes " &amp;lt;&amp;lt; nWifi &amp;lt;&amp;lt; 
                   " specified exceeds the mobility bounding box" &amp;lt;&amp;lt; 
std::endl;
      exit (1);
    }


 if (verbose)
    {
     LogComponentEnable ("OnOffApplication", LOG_LEVEL_INFO);
     LogComponentEnable ("PacketSink", LOG_LEVEL_INFO);
    }

  NodeContainer p2pNodes;
  p2pNodes.Create (2);

  PointToPointHelper pointToPoint;
  pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
  pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));

  NetDeviceContainer p2pDevices;
  p2pDevices = pointToPoint.Install (p2pNodes);

  NodeContainer csmaNodes;
  csmaNodes.Add (p2pNodes.Get (1));
  csmaNodes.Create (nCsma);

  CsmaHelper csma;
  csma.SetChannelAttribute ("DataRate", StringValue ("100Mbps"));
  csma.SetChannelAttribute ("Delay", TimeValue (NanoSeconds (6560)));

  NetDeviceContainer csmaDevices;
  csmaDevices = csma.Install (csmaNodes);

  NodeContainer wifiStaNodes;
  wifiStaNodes.Create (nWifi);
  NodeContainer wifiApNode = p2pNodes.Get (0);

  YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();
  YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
  phy.SetChannel (channel.Create ());

  WifiHelper wifi = WifiHelper::Default ();
  wifi.SetRemoteStationManager ("ns3::AarfWifiManager");

  NqosWifiMacHelper mac = NqosWifiMacHelper::Default ();

  Ssid ssid = Ssid ("ns-3-ssid");
  mac.SetType ("ns3::StaWifiMac",
               "Ssid", SsidValue (ssid),
               "ActiveProbing", BooleanValue (false));

  NetDeviceContainer staDevices;
  staDevices = wifi.Install (phy, mac, wifiStaNodes);

  mac.SetType ("ns3::ApWifiMac",
               "Ssid", SsidValue (ssid));

  NetDeviceContainer apDevices;
  apDevices = wifi.Install (phy, mac, wifiApNode);

  MobilityHelper mobility;

  mobility.SetPositionAllocator ("ns3::GridPositionAllocator",
                                 "MinX", DoubleValue (0.0),
                                 "MinY", DoubleValue (0.0),
                                 "DeltaX", DoubleValue (5.0),
                                 "DeltaY", DoubleValue (10.0),
                                 "GridWidth", UintegerValue (3),
                                 "LayoutType", StringValue ("RowFirst"));

  mobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel",
                             "Bounds", RectangleValue (Rectangle (-50, 50, 
-50, 50)));
  mobility.Install (wifiStaNodes);

  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
  mobility.Install (wifiApNode);

  InternetStackHelper stack;
  stack.Install (csmaNodes);
  stack.Install (wifiApNode);
  stack.Install (wifiStaNodes);

  Ipv4AddressHelper address;

  address.SetBase ("10.1.1.0", "255.255.255.0");
  Ipv4InterfaceContainer p2pInterfaces;
  p2pInterfaces = address.Assign (p2pDevices);

  address.SetBase ("10.1.2.0", "255.255.255.0");
  Ipv4InterfaceContainer csmaInterfaces;
  csmaInterfaces = address.Assign (csmaDevices);

  address.SetBase ("10.1.3.0", "255.255.255.0");
  address.Assign (staDevices);
  address.Assign (apDevices);


  OnOffHelper onoff ("ns3::UdpSocketFactory", Address (InetSocketAddress 
("10.1.3.4", 9)));
  onoff.SetAttribute ("OnTime",  
StringValue("ns3::ConstantRandomVariable[Constant=20]")); 
  onoff.SetAttribute ("OffTime",  
StringValue("ns3::ConstantRandomVariable[Constant=0]")); 
  onoff.SetAttribute ("PacketSize", StringValue ("1024"));
  onoff.SetAttribute ("DataRate", StringValue ("5kb/s"));
  ApplicationContainer apps = onoff.Install (csmaNodes.Get (nCsma-1));
  apps.Start (Seconds (1.0));
  apps.Stop (Seconds (100.0));

  PacketSinkHelper sink ("ns3::UdpSocketFactory",InetSocketAddress 
("10.1.2.4", 9));
  apps = sink.Install (wifiStaNodes.Get (nWifi-1));
  apps.Start (Seconds (2.0));
  apps.Stop (Seconds (100.0));

  Simulator::Stop (Seconds (10.0));
  pointToPoint.EnablePcapAll ("mythird");
  phy.EnablePcap ("mythird", apDevices.Get (0));
  csma.EnablePcap ("mythird", csmaDevices.Get (0), true);

  GtkConfigStore config;
  config.ConfigureAttributes();

  Simulator::Run ();
  Simulator::Destroy ();

  return 0;
}


&lt;/pre&gt;</description>
    <dc:creator>salma subh</dc:creator>
    <dc:date>2013-06-19T01:09:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20383">
    <title>learning NS 3</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20383</link>
    <description>&lt;pre&gt;Hello,

I am a EE grad student and I am trying to learn NS 3 to do some 
simulations. My background on programming is bounded to C++ and somewhat 
OOP. No python experience. I have read the Ns-3 tutorial however I could 
not proceed in writing a whole project.I wonder how you first started to 
learn and managed to accomplish writing a whole project successfully.I 
would appreciate if you share your experiences.Thanks

Regards,

&lt;/pre&gt;</description>
    <dc:creator>MMIlad</dc:creator>
    <dc:date>2013-06-18T22:59:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20382">
    <title>OLSR Performance evaluation</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20382</link>
    <description>&lt;pre&gt;Dear all , 
I'm trying to evaluate the throughput generated by the following script . 
But all the packets are lost thus  throughputs and the delays are always 0  
Here is my script :
#include &amp;lt;fstream&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include "ns3/core-module.h"
// #include "ns3/common-module.h"
// #include "ns3/node-module.h"
// #include "ns3/helper-module.h"
#include "ns3/mobility-module.h"
// #include "ns3/contrib-module.h"
#include "ns3/wifi-module.h"
// #include "ns3/global-route-manager.h"
#include "ns3/olsr-routing-protocol.h"
#include "ns3/ipv4-routing-protocol.h"
#include "ns3/gnuplot.h"
#include "ns3/flow-monitor.h"
#include "ns3/flow-monitor-helper.h"
#include "ns3/flow-monitor-module.h"
#include &amp;lt;string&amp;gt;
#include &amp;lt;cassert&amp;gt;
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
#include "ns3/olsr-helper.h"
#include "ns3/ipv4-static-routing-helper.h"
#include "ns3/ipv4-list-routing-helper.h"
#include "ns3/flow-classifier.h"
#include "ns3/netanim-module.h"

using namespace ns3;

NS_LOG_COMPONENT_DEFINE ("test");

double DISTANCE = 20; //m
//  double m=1 ;
uint32_t NUM_NODES_SIDE = 3;
std::string fileNameWithNoExtension = "plot-2d";
std::string plotFileName            = fileNameWithNoExtension + ".plt";
void
print_stats (FlowMonitor::FlowStats st)
{
         std::cout &amp;lt;&amp;lt; "  Tx Bytes: " &amp;lt;&amp;lt; st.txBytes &amp;lt;&amp;lt; "\n";
         std::cout &amp;lt;&amp;lt; "  Rx Bytes: " &amp;lt;&amp;lt; st.rxBytes &amp;lt;&amp;lt; "\n";
         std::cout &amp;lt;&amp;lt; "  Tx Packets: " &amp;lt;&amp;lt; st.txPackets &amp;lt;&amp;lt; "\n";
         std::cout &amp;lt;&amp;lt; "  Rx Packets: " &amp;lt;&amp;lt; st.rxPackets &amp;lt;&amp;lt; "\n";
         std::cout &amp;lt;&amp;lt; "  Lost Packets: " &amp;lt;&amp;lt; st.lostPackets &amp;lt;&amp;lt; "\n";

     if (st.rxPackets &amp;gt; 0)
     {
             std::cout &amp;lt;&amp;lt; "  Mean{Delay}: " &amp;lt;&amp;lt; (st.delaySum.GetSeconds() 
/st.rxPackets);
             std::cout &amp;lt;&amp;lt; "  Mean{Jitter}: " &amp;lt;&amp;lt; (st.jitterSum.GetSeconds() 
/(st.rxPackets-1));
             std::cout &amp;lt;&amp;lt; "  Mean{Hop Count}: " &amp;lt;&amp;lt; st.timesForwarded 
/st.rxPackets + 1;
     }

     if (false)
     {
             std::cout &amp;lt;&amp;lt; "Delay Histogram" &amp;lt;&amp;lt; "\n";
         for (uint32_t i=0; i&amp;lt;st.delayHistogram.GetNBins (); i++)
                 std::cout &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; i &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt;
st.delayHistogram.GetBinStart (i) &amp;lt;&amp;lt; "-"
                                 &amp;lt;&amp;lt; st.delayHistogram.GetBinEnd (i) &amp;lt;&amp;lt; "): 
" &amp;lt;&amp;lt;
st.delayHistogram.GetBinCount (i) &amp;lt;&amp;lt; "\n";

         std::cout &amp;lt;&amp;lt; "Jitter Histogram" &amp;lt;&amp;lt; "\n";
         for (uint32_t i=0; i&amp;lt;st.jitterHistogram.GetNBins (); i++ )
                 std::cout &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; i &amp;lt;&amp;lt; "(" 
&amp;lt;&amp;lt;st.jitterHistogram.GetBinStart (i) &amp;lt;&amp;lt; "-"
                                 &amp;lt;&amp;lt; st.jitterHistogram.GetBinEnd (i) &amp;lt;&amp;lt; "): 
" &amp;lt;&amp;lt;st.jitterHistogram.GetBinCount (i) &amp;lt;&amp;lt; "\n";

         std::cout &amp;lt;&amp;lt; "PacketSize Histogram  "&amp;lt;&amp;lt; "\n";
         for (uint32_t i=0; i&amp;lt;st.packetSizeHistogram.GetNBins (); i++ )
                         std::cout &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; i &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; 
st.packetSizeHistogram.GetBinStart(i) &amp;lt;&amp;lt; "-"
                                 &amp;lt;&amp;lt; st.packetSizeHistogram.GetBinEnd (i) &amp;lt;&amp;lt; 
"): " &amp;lt;&amp;lt;st.packetSizeHistogram.GetBinCount (i) &amp;lt;&amp;lt; "\n";
     }

     for (uint32_t i=0; i&amp;lt;st.packetsDropped.size (); i++)
             std::cout &amp;lt;&amp;lt; "  Packets dropped by reason " &amp;lt;&amp;lt; i &amp;lt;&amp;lt; ": " 
&amp;lt;&amp;lt;st.packetsDropped [i] &amp;lt;&amp;lt; "\n";}
main (int argc, char *argv []) {

LogComponentEnable ("OlsrRoutingProtocol", LOG_LEVEL_INFO);

         uint32_t NumNodesSide = 0;
         std::string Results("friis");
         bool Plot = true;

         CommandLine cmd;
         cmd.AddValue ("NumNodesSide", "Grid side number of nodes (total 
number of nodes will be this number squared)", NumNodesSide);
         cmd.AddValue ("Results", "Write XML results to file", Results);
         cmd.AddValue ("Plot", "Plot the results using the matplotlib 
python module", Plot);
         cmd.Parse (argc,argv);

         YansWifiChannelHelper wifiChannel = 
YansWifiChannelHelper::Default();                        /
         YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default 
();                                                //Create a phy helper in 
a default working state.
         wifiPhy.SetChannel (wifiChannel.Create ());

         NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default 
();                                                //Create a mac helper in 
a default working state. i.e., this is an adhoc mac by default.
         Ssid ssid = Ssid("wifi-default");
         wifiMac.SetType ("ns3::AdhocWifiMac", 
"Ssid",SsidValue(ssid));                                                                                    

         WifiHelper wifi = WifiHelper::Default 
();                                                                             


         OlsrHelper olsr_routing;
         Ipv4StaticRoutingHelper static_routing;
         Ipv4ListRoutingHelper list_routing;
         list_routing.Add (static_routing, 0);
         list_routing.Add (olsr_routing, 100);
         InternetStackHelper internet;
         internet.SetRoutingHelper (list_routing);

         Ipv4AddressHelper ipv4Address;
         ipv4Address.SetBase ("10.0.0.0", "255.255.255.0");

         uint16_t port = 9;       
         OnOffHelper onoff ("ns3::UdpSocketFactory",
                         Address(InetSocketAddress(Ipv4Address 
("10.0.0.1"), port)));
         onoff.SetAttribute ("DataRate", 
DataRateValue(DataRate("100kbps")));
           onoff.SetAttribute ("OnTime", StringValue 
("ns3::ConstantRandomVariable[Constant=1.0]"));
           onoff.SetAttribute ("OffTime", StringValue 
("ns3::ConstantRandomVariable[Constant=0.0]"));


         Ipv4InterfaceContainer addresses;
         NodeContainer nodes;

         if(NumNodesSide == 0)
                 NumNodesSide = NUM_NODES_SIDE;

         for(uint32_t xi=0; xi&amp;lt;NumNodesSide; xi++)
         {
                 for(uint32_t yi=0; yi&amp;lt;NumNodesSide; yi++)
                 {
                         Ptr&amp;lt;Node&amp;gt; node = CreateObject&amp;lt;Node&amp;gt;();
                         nodes.Add(node);

                         internet.Install (node);

                         Ptr&amp;lt;ConstantPositionMobilityModel&amp;gt; mobility 
=CreateObject&amp;lt;ConstantPositionMobilityModel&amp;gt;();
                         mobility-&amp;gt;SetPosition(Vector(xi*DISTANCE, 
yi*DISTANCE, 0));
                         node-&amp;gt;AggregateObject(mobility);

                         NetDeviceContainer devices = wifi.Install 
(wifiPhy, wifiMac,node);
                         Ipv4InterfaceContainer ipv4_interfaces = 
ipv4Address.Assign(devices);
                         addresses.Add(ipv4_interfaces.Get(0));
                 }
         }

         OnOffHelper onOffHelper ("ns3::UdpSocketFactory", Address ());
         for(uint32_t i=0; i&amp;lt;nodes.GetN (); i++)
         {
                 Ipv4Address destaddr = addresses.GetAddress 
((addresses.GetN () - 1- i) % addresses.GetN ());
                 onOffHelper.SetAttribute 
("Remote",AddressValue(InetSocketAddress(destaddr, port)));
                 ApplicationContainer app = onOffHelper.Install 
(nodes.Get(i));
             app.Start (Seconds (UniformVariable (20, 30).GetValue ()));
         }

         Ptr&amp;lt;FlowMonitor&amp;gt; monitor;
         FlowMonitorHelper flowmon_helper;
         monitor = flowmon_helper.InstallAll();
         monitor-&amp;gt;SetAttribute("DelayBinWidth", DoubleValue(0.001));
         monitor-&amp;gt;SetAttribute("JitterBinWidth", DoubleValue(0.001));
         monitor-&amp;gt;SetAttribute("PacketSizeBinWidth", DoubleValue(20));

         Simulator::Stop (Seconds (100.0));
         AnimationInterface anim ("flowanim.xml");
     anim.SetStartTime(Seconds(1));
     anim.SetStopTime(Seconds(100.1));
     anim.EnableIpv4RouteTracking("flowanim-routes.xml", Seconds(0), 
Seconds(20));

         Simulator::Run ();

         monitor-&amp;gt;CheckForLostPackets();
         Ptr&amp;lt;Ipv4FlowClassifier&amp;gt; classifier 
=DynamicCast&amp;lt;Ipv4FlowClassifier&amp;gt;(flowmon_helper.GetClassifier());

         if(Results == "friis")
         {
                 std::string proto;
                 std::map&amp;lt; FlowId, FlowMonitor::FlowStats &amp;gt; stats = 
monitor-&amp;gt;GetFlowStats();
                 for (std::map&amp;lt; FlowId, FlowMonitor::FlowStats &amp;gt;::iterator 
flow=stats.begin(); flow!=stats.end(); flow++)
                 {
                         Ipv4FlowClassifier::FiveTuple t = 
classifier-&amp;gt;FindFlow(flow-&amp;gt;first);
                        
                         std::cout &amp;lt;&amp;lt; "FlowID: " &amp;lt;&amp;lt; flow-&amp;gt;first &amp;lt;&amp;lt; " (" &amp;lt;&amp;lt; 
proto &amp;lt;&amp;lt; " "
                                         &amp;lt;&amp;lt; t.sourceAddress &amp;lt;&amp;lt; "/" &amp;lt;&amp;lt; 
t.sourcePort &amp;lt;&amp;lt; " --&amp;gt; "
                                         &amp;lt;&amp;lt; t.destinationAddress &amp;lt;&amp;lt; "/" &amp;lt;&amp;lt; 
t.destinationPort &amp;lt;&amp;lt; ")" &amp;lt;&amp;lt;"\n";
                         print_stats(flow-&amp;gt;second);
                 }
         }
         
                 monitor-&amp;gt;SerializeToXmlFile("flow.flowmon", true, true);



          if(Plot)
         {
         int k=0;
                 Gnuplot gnuplot("ThrouputbyFLOW.png");
                 Gnuplot2dDataset dataset("Throuput of each flow");
                 dataset.SetStyle(Gnuplot2dDataset::LINES);
                 std::map&amp;lt; FlowId, FlowMonitor::FlowStats &amp;gt; stats = 
monitor-&amp;gt;GetFlowStats();
                 for (std::map&amp;lt; FlowId, FlowMonitor::FlowStats &amp;gt;::iterator 
flow=stats.begin(); flow!=stats.end(); flow++) 
       
                 {
                 
                          Ipv4FlowClassifier::FiveTuple t = 
classifier-&amp;gt;FindFlow(flow-&amp;gt;first);
                          
                          if( 
(!t.destinationAddress.IsSubnetDirectedBroadcast("255.255.255.0")) )
{
k++;
std::cout &amp;lt;&amp;lt; "\nFlow " &amp;lt;&amp;lt; k &amp;lt;&amp;lt; " (" &amp;lt;&amp;lt; t.sourceAddress &amp;lt;&amp;lt; " -&amp;gt; "
&amp;lt;&amp;lt; t.destinationAddress &amp;lt;&amp;lt;"throu  "&amp;lt;&amp;lt;(double)flow-&amp;gt;second.rxBytes * 8.0 / 
(double)(flow-&amp;gt;second.timeLastRxPacket.GetSeconds()-flow-&amp;gt;second.timeFirstTxPacket.GetSeconds()) 
/ 1024   &amp;lt;&amp;lt;"delay "&amp;lt;&amp;lt;(double)flow-&amp;gt;second.delaySum.GetSeconds() / 
(double)flow-&amp;gt;second.rxPackets&amp;lt;&amp;lt; ")\n";

                  dataset.Add((double)flow-&amp;gt;first, 
(double)flow-&amp;gt;second.rxBytes * 8.0 / 
(double)(flow-&amp;gt;second.timeLastRxPacket.GetSeconds()-flow-&amp;gt;second.timeFirstTxPacket.GetSeconds()) 
/ 1024   );            

                 }
                 }
                 gnuplot.AddDataset(dataset);

                 // Open the plot file.
                 std::ofstream plotFile (plotFileName.c_str());

                 // Write the plot file.
                gnuplot.GenerateOutput (plotFile);

                  // Close the plot file.
                 plotFile.close ();
         }

         Simulator::Destroy ();

         return 0;
}
Here is the output :
'build' finished successfully (4.274s)
FlowID: 1 ( 10.0.0.2/698 --&amp;gt; 10.0.0.255/698)
  Tx Bytes: 2616
  Rx Bytes: 48
  Tx Packets: 50
  Rx Packets: 1
  Lost Packets: 44
  Mean{Delay}: 0.000136066  Mean{Jitter}: -nan  Mean{Hop Count}: 1FlowID: 2 
( 10.0.0.4/698 --&amp;gt; 10.0.0.255/698)
  Tx Bytes: 2616
  Rx Bytes: 48
  Tx Packets: 50
  Rx Packets: 1
  Lost Packets: 44
  Mean{Delay}: 0.000136066  Mean{Jitter}: -nan  Mean{Hop Count}: 1FlowID: 3 
( 10.0.0.9/698 --&amp;gt; 10.0.0.255/698)
  Tx Bytes: 2616
  Rx Bytes: 160
  Tx Packets: 50
  Rx Packets: 2
  Lost Packets: 43
  Mean{Delay}: 0.000180066  Mean{Jitter}: 8.8e-05  Mean{Hop Count}: 
1FlowID: 4 ( 10.0.0.7/698 --&amp;gt; 10.0.0.255/698)
  Tx Bytes: 2616
  Rx Bytes: 160
  Tx Packets: 50
  Rx Packets: 2
  Lost Packets: 43
  Mean{Delay}: 0.000180099  Mean{Jitter}: 8.8067e-05  Mean{Hop Count}: 
1FlowID: 5 ( 10.0.0.5/698 --&amp;gt; 10.0.0.255/698)
  Tx Bytes: 2616
  Rx Bytes: 48
  Tx Packets: 50
  Rx Packets: 1
  Lost Packets: 44
  Mean{Delay}: 0.000136066  Mean{Jitter}: -nan  Mean{Hop Count}: 1FlowID: 6 
( 10.0.0.8/698 --&amp;gt; 10.0.0.255/698)
  Tx Bytes: 2616
  Rx Bytes: 48
  Tx Packets: 50
  Rx Packets: 1
  Lost Packets: 44
  Mean{Delay}: 0.000136066  Mean{Jitter}: -nan  Mean{Hop Count}: 1FlowID: 7 
( 10.0.0.3/698 --&amp;gt; 10.0.0.255/698)
  Tx Bytes: 2616
  Rx Bytes: 48
  Tx Packets: 50
  Rx Packets: 1
  Lost Packets: 44
  Mean{Delay}: 0.000136066  Mean{Jitter}: -nan  Mean{Hop Count}: 1FlowID: 8 
( 10.0.0.6/698 --&amp;gt; 10.0.0.255/698)
  Tx Bytes: 2648
  Rx Bytes: 48
  Tx Packets: 50
  Rx Packets: 1
  Lost Packets: 44
  Mean{Delay}: 0.000136066  Mean{Jitter}: -nan  Mean{Hop Count}: 1FlowID: 9 
( 10.0.0.1/698 --&amp;gt; 10.0.0.255/698)
  Tx Bytes: 2424
  Rx Bytes: 48
  Tx Packets: 50
  Rx Packets: 1
  Lost Packets: 44
  Mean{Delay}: 0.000136066  Mean{Jitter}: -nan  Mean{Hop Count}: 1FlowID: 
10 ( 10.0.0.5/49153 --&amp;gt; 10.0.0.5/9)
  Tx Bytes: 2629260
  Rx Bytes: 2629260
  Tx Packets: 4869
  Rx Packets: 4869
  Lost Packets: 0
  Mean{Delay}: 0  Mean{Jitter}: 0  Mean{Hop Count}: 1FlowID: 11 ( 
10.0.0.1/49153 --&amp;gt; 10.0.0.9/9)
  Tx Bytes: 2570400
  Rx Bytes: 0
  Tx Packets: 4760
  Rx Packets: 0
  Lost Packets: 4150
FlowID: 12 ( 10.0.0.6/49153 --&amp;gt; 10.0.0.4/9)
  Tx Bytes: 2504520
  Rx Bytes: 0
  Tx Packets: 4638
  Rx Packets: 0
  Lost Packets: 4028
FlowID: 13 ( 10.0.0.2/49153 --&amp;gt; 10.0.0.8/9)
  Tx Bytes: 2504520
  Rx Bytes: 0
  Tx Packets: 4638
  Rx Packets: 0
  Lost Packets: 4028
FlowID: 14 ( 10.0.0.8/49153 --&amp;gt; 10.0.0.2/9)
  Tx Bytes: 2372760
  Rx Bytes: 0
  Tx Packets: 4394
  Rx Packets: 0
  Lost Packets: 3784
FlowID: 15 ( 10.0.0.4/49153 --&amp;gt; 10.0.0.6/9)
  Tx Bytes: 2306880
  Rx Bytes: 0
  Tx Packets: 4272
  Rx Packets: 0
  Lost Packets: 3662
FlowID: 16 ( 10.0.0.3/49153 --&amp;gt; 10.0.0.7/9)
  Tx Bytes: 2306880
  Rx Bytes: 0
  Tx Packets: 4272
  Rx Packets: 0
  Lost Packets: 3662
FlowID: 17 ( 10.0.0.9/49153 --&amp;gt; 10.0.0.1/9)
  Tx Bytes: 2306880
  Rx Bytes: 0
  Tx Packets: 4272
  Rx Packets: 0
  Lost Packets: 3662
FlowID: 18 ( 10.0.0.7/49153 --&amp;gt; 10.0.0.3/9)
  Tx Bytes: 2306880
  Rx Bytes: 0
  Tx Packets: 4272
  Rx Packets: 0
  Lost Packets: 3662

Flow 1 (10.0.0.5 -&amp;gt; 10.0.0.5throu  260.414delay 0)

Flow 2 (10.0.0.1 -&amp;gt; 10.0.0.9throu  -0delay -nan)

Flow 3 (10.0.0.6 -&amp;gt; 10.0.0.4throu  -0delay -nan)

Flow 4 (10.0.0.2 -&amp;gt; 10.0.0.8throu  -0delay -nan)

Flow 5 (10.0.0.8 -&amp;gt; 10.0.0.2throu  -0delay -nan)

Flow 6 (10.0.0.4 -&amp;gt; 10.0.0.6throu  -0delay -nan)

Flow 7 (10.0.0.3 -&amp;gt; 10.0.0.7throu  -0delay -nan)

Flow 8 (10.0.0.9 -&amp;gt; 10.0.0.1throu  -0delay -nan)

Flow 9 (10.0.0.7 -&amp;gt; 10.0.0.3throu  -0delay -nan)

with NetAnim for the flow 14 for example , I have :
 
Flow Id:14

======

UDP 10.0.0.8/49153----&amp;gt;10.0.0.2/9


Tx bitrate:267.4kbps

Rx bitrate:0kbps

Mean delay:-1ms

Packet Loss ratio:100%


timeFirstTxPacket= 2.85905e+10ns

timeFirstRxPacket= 0ns

timeLastTxPacket= 9.95779e+10ns

timeLastRxPacket= 0ns

delaySum= 0ns

jitterSum= 0ns

lastDelay= 0ns

txBytes= 2372760

rxBytes= 0

txPackets= 4394

rxPackets= 0

lostPackets= 3784

timesForwarded= 0


delayHistogram nBins:0


jitterHistogram nBins:0


packetSizeHistogram nBins:0
flowInterruptionsHistogram nBins:0 

it's pretty the same for all the other flows . 

Why are my packets lost , and how can I have the throughput different from 
0 ? 

Any idea please ? 

Thanks a lot .

How can I have 

&lt;/pre&gt;</description>
    <dc:creator>Nesrine Doghri</dc:creator>
    <dc:date>2013-06-18T22:44:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20379">
    <title>error while running my program in ns-3.17</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20379</link>
    <description>&lt;pre&gt;Hello All,
here i attached my simulation file,while running it in ns-3.16, it's 
working properly but when i am running it in ns-3.17 it's giving me error 
msg="UEs need to have IPv4 installed before EPS bearers can be activated". 
i am not getting how to fix it. if anyone know about it please tell me 
which saves my much time. Thanks..

&lt;/pre&gt;</description>
    <dc:creator>Nitish Rajoria</dc:creator>
    <dc:date>2013-06-18T18:15:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20378">
    <title>sinr, tbs,qci stats  calculations  and loss models appplicable</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20378</link>
    <description>&lt;pre&gt;Hi,

          All the propagation loss models (PLM) are single frequency and only provide computation of loss at a certain distance for that frequency, on the other hand, the spectrum propagation loss models (SPLM) provide calculation of TX/Rx Power Spectral Density. 

Question 1: does it implicitly follow that PLMs are strictly for use with Uplink and SPLMs for use with Downlinks???

Question 2: Given the above situation, what would be the correct way to compute Qci, Sinr, Tbs etc...just take them from MAC stats??? In fact, the more analytical way should be to use different methods when one has access to spectral density and when only to RxPower (TxPower - comptedLoss)...is this correct, if not, then please tell me which is the right way then...

With Regards,
madan 
       

&lt;/pre&gt;</description>
    <dc:creator>Madan Pande</dc:creator>
    <dc:date>2013-06-18T18:07:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20369">
    <title>How to schedule Flow Monitor to get throughput per second?</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20369</link>
    <description>&lt;pre&gt;Hi,

I have a network that is simulated for 20 seconds, and I want the 
throughput each second so that I can plot Mbps over seconds. Below is a 
snippet of the flow monitor function, and at the moment it calculates the 
throughput over the whole simulation i.e. for 20 seconds. Basically, how do 
I schedule the flow monitor so that it calculates for each second? 

Help is appreciated!




FlowMonitorHelper flowmon;
  Ptr&amp;lt;FlowMonitor&amp;gt; monitor;
  monitor = flowmon.InstallAll();
// monitor = flowmon.Install(apNodes);

  Simulator::Stop (Seconds (20.0));

AnimationInterface anim ("CSMA_Anim.xml");

anim.EnablePacketMetadata (true);

  Simulator::Run ();

monitor-&amp;gt;CheckForLostPackets ();

  Ptr&amp;lt;Ipv4FlowClassifier&amp;gt; classifier = DynamicCast&amp;lt;Ipv4FlowClassifier&amp;gt; 
(flowmon.GetClassifier ());
  std::map&amp;lt;FlowId, FlowMonitor::FlowStats&amp;gt; stats = monitor-&amp;gt;GetFlowStats ();
  std::map&amp;lt;FlowId, FlowMonitor::FlowStats&amp;gt;::const_iterator i;
  for (std::map&amp;lt;FlowId, FlowMonitor::FlowStats&amp;gt;::const_iterator i = 
stats.begin (); i != stats.end (); ++i)
    {
  Ipv4FlowClassifier::FiveTuple t = classifier-&amp;gt;FindFlow (i-&amp;gt;first);
      NS_LOG_DEBUG ("Flow " &amp;lt;&amp;lt; i-&amp;gt;first  &amp;lt;&amp;lt; " (" &amp;lt;&amp;lt; t.sourceAddress &amp;lt;&amp;lt; " -&amp;gt; 
" &amp;lt;&amp;lt; t.destinationAddress &amp;lt;&amp;lt; ")");

std::cout &amp;lt;&amp;lt; "Flow " &amp;lt;&amp;lt; i-&amp;gt;first &amp;lt;&amp;lt; " (" &amp;lt;&amp;lt; t.sourceAddress &amp;lt;&amp;lt; " -&amp;gt; " &amp;lt;&amp;lt; 
t.destinationAddress &amp;lt;&amp;lt; ")\n";           std::cout &amp;lt;&amp;lt; "  Tx Bytes:   " &amp;lt;&amp;lt; 
i-&amp;gt;second.txBytes &amp;lt;&amp;lt; "\n";
          std::cout &amp;lt;&amp;lt; "  Rx Bytes:   " &amp;lt;&amp;lt; i-&amp;gt;second.rxBytes &amp;lt;&amp;lt; "\n";
          std::cout &amp;lt;&amp;lt; "  Throughput: " &amp;lt;&amp;lt; i-&amp;gt;second.rxBytes * 8.0 / 20.0 / 
1024 / 1024  &amp;lt;&amp;lt; " Mbps\n";

 }

bool enableFlowMonitor = true;

if (enableFlowMonitor){
  monitor-&amp;gt;SerializeToXmlFile ("CSMA_AP.xml", true, true);
}

&lt;/pre&gt;</description>
    <dc:creator>SiMaL</dc:creator>
    <dc:date>2013-06-18T13:16:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20368">
    <title>Empty Routing Tables OLSR</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20368</link>
    <description>&lt;pre&gt;Dear All , 

When I ran my script , I got empty routing tables :
here's my code :

#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"
#include "ns3/olsr-routing-protocol.h"
#include "ns3/olsr-helper.h"
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;cmath&amp;gt;

using namespace ns3;

uint16_t port = 9;

NS_LOG_COMPONENT_DEFINE ("OlsrManetExample");

class OlsrManetExample
{
public:
  OlsrManetExample ();
  void CaseRun (uint32_t nWifis,
                uint32_t nSinks,
                double totalTime,
                std::string rate,
                std::string phyMode,
                double dataStart,
                bool printRoutes,
                std::string CSVfileName);

private:
  uint32_t m_nWifis;
  uint32_t m_nSinks;
  double m_totalTime;
  std::string m_rate;
  std::string m_phyMode;


  double m_dataStart;
  uint32_t bytesTotal;
  uint32_t packetsReceived;
  bool m_printRoutes;
  std::string m_CSVfileName;
//   uint32_t m_xSize ;
//   uint32_t m_ySize ;
//   uint32_t m_step ;

  NodeContainer nodes;
  NetDeviceContainer devices;
  Ipv4InterfaceContainer interfaces;

private:
  void CreateNodes ();
  void CreateDevices (std::string tr_name);
  void InstallInternetStack (std::string tr_name);
  void InstallApplications ();
  void SetupMobility ();
  void ReceivePacket (Ptr &amp;lt;Socket&amp;gt; );
  Ptr &amp;lt;Socket&amp;gt; SetupPacketReceive (Ipv4Address, Ptr &amp;lt;Node&amp;gt; );
  void CheckThroughput ();

};

int main (int argc, char **argv)
{
  OlsrManetExample test;
  uint32_t nWifis = 20;
  uint32_t nSinks = 20;
  double totalTime = 500.0;
  std::string rate ("8kbps");
  std::string phyMode ("DsssRate11Mbps");

  std::string appl = "all";
 
  double dataStart = 10.0;
  bool printRoutingTable = true;
  std::string CSVfileName = "OlsrManetExample.csv";
//   uint32_t m_xSize =10;
//  uint32_t m_ySize =10;
//   uint32_t m_step =300;
  
  CommandLine cmd;
  cmd.AddValue ("nWifis", "Number of wifi nodes[Default:30]", nWifis);
  cmd.AddValue ("nSinks", "Number of wifi sink nodes[Default:10]", nSinks);
  cmd.AddValue ("totalTime", "Total Simulation time[Default:100]", 
totalTime);
  cmd.AddValue ("phyMode", "Wifi Phy mode[Default:DsssRate11Mbps]", 
phyMode);
  cmd.AddValue ("rate", "CBR traffic rate[Default:8kbps]", rate);

  cmd.AddValue ("dataStart", "Time at which nodes start to transmit 
data[Default=50.0]", dataStart);
  cmd.AddValue ("printRoutingTable", "print routing table for 
nodes[Default:1]", printRoutingTable);
  cmd.AddValue ("CSVfileName", "The name of the CSV output file 
name[Default:OlsrManetExample.
csv]", CSVfileName);
  cmd.Parse (argc, argv);

  std::ofstream out (CSVfileName.c_str ());
  out &amp;lt;&amp;lt; "SimulationSecond," &amp;lt;&amp;lt;
  "ReceiveRate," &amp;lt;&amp;lt;
  "PacketsReceived," &amp;lt;&amp;lt;
  "NumberOfSinks," &amp;lt;&amp;lt;
  std::endl;
  out.close ();

  SeedManager::SetSeed (12345);

  Config::SetDefault ("ns3::OnOffApplication::PacketSize", StringValue 
("1000"));
  Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue 
(rate));
  Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode", 
StringValue (phyMode));
   Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", 
StringValue ("2000"));

  test = OlsrManetExample ();
  test.CaseRun (nWifis, nSinks, totalTime, rate, phyMode, 
                 dataStart, printRoutingTable, CSVfileName);

  return 0;
}

OlsrManetExample::OlsrManetExample ()
  : bytesTotal (0),
    packetsReceived (0)
{
}

void
OlsrManetExample::ReceivePacket (Ptr &amp;lt;Socket&amp;gt; socket)
{
  NS_LOG_UNCOND (Simulator::Now ().GetSeconds () &amp;lt;&amp;lt; " Received one 
packet!");
  Ptr &amp;lt;Packet&amp;gt; packet;
  while ((packet = socket-&amp;gt;Recv ()))
    {
      bytesTotal += packet-&amp;gt;GetSize ();
      packetsReceived += 1;
    }
}

void
OlsrManetExample::CheckThroughput ()
{
  double kbs = (bytesTotal * 8.0) / 1000;
  bytesTotal = 0;

  std::ofstream out (m_CSVfileName.c_str (), std::ios::app);

  out &amp;lt;&amp;lt; (Simulator::Now ()).GetSeconds () &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; kbs &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; 
packetsReceived &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; m_nSinks &amp;lt;&amp;lt; std::endl;

  out.close ();
  packetsReceived = 0;
  Simulator::Schedule (Seconds (1.0), &amp;amp;OlsrManetExample::CheckThroughput, 
this);
}

Ptr &amp;lt;Socket&amp;gt;
OlsrManetExample::SetupPacketReceive (Ipv4Address addr, Ptr &amp;lt;Node&amp;gt; node)
{

  TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
  Ptr &amp;lt;Socket&amp;gt; sink = Socket::CreateSocket (node, tid);
  InetSocketAddress local = InetSocketAddress (addr, port);
  sink-&amp;gt;Bind (local);
  sink-&amp;gt;SetRecvCallback (MakeCallback ( &amp;amp;OlsrManetExample::ReceivePacket, 
this));

  return sink;
}

void
OlsrManetExample::CaseRun (uint32_t nWifis, uint32_t nSinks, double 
totalTime, std::string rate,
                           std::string phyMode ,
                           double dataStart, bool printRoutes, std::string 
CSVfileName)
{
  m_nWifis = nWifis;
  m_nSinks = nSinks;
  m_totalTime = totalTime;
  m_rate = rate;
  m_phyMode = phyMode;
 
  
  m_dataStart = dataStart;
  m_printRoutes = printRoutes;
  m_CSVfileName = CSVfileName;

  std::stringstream ss;
  ss &amp;lt;&amp;lt; m_nWifis;
  std::string t_nodes = ss.str ();

  std::stringstream ss3;
  ss3 &amp;lt;&amp;lt; m_totalTime;
  std::string sTotalTime = ss3.str ();

  std::string tr_name = "OLSR_Manet_" + t_nodes + "Nodes_" + sTotalTime + 
"SimTime";
  std::cout &amp;lt;&amp;lt; "Trace file generated is " &amp;lt;&amp;lt; tr_name &amp;lt;&amp;lt; ".tr\n";

  CreateNodes ();
  CreateDevices (tr_name);
  SetupMobility ();
  InstallInternetStack (tr_name);
  InstallApplications ();

  std::cout &amp;lt;&amp;lt; "\nStarting simulation for " &amp;lt;&amp;lt; m_totalTime &amp;lt;&amp;lt; " s ...\n";

  CheckThroughput ();

  Simulator::Stop (Seconds (m_totalTime));
  Simulator::Run ();
  Simulator::Destroy ();
}

void
OlsrManetExample::CreateNodes ()
{
  std::cout &amp;lt;&amp;lt; "Creating " &amp;lt;&amp;lt; (unsigned) m_nWifis &amp;lt;&amp;lt; " nodes.\n";
  nodes.Create (m_nWifis);
  NS_ASSERT_MSG (m_nWifis &amp;gt; m_nSinks, "Sinks must be less or equal to the 
number of nodes in network");
}

void
OlsrManetExample::SetupMobility ()
{
  MobilityHelper mobility;

mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
//   mobility.SetPositionAllocator (taPositionAlloc);
  mobility.SetPositionAllocator("ns3::GridPositionAllocator", "MinX", 
DoubleValue(0.0), "MinY", DoubleValue(0.0),
                    "DeltaX", DoubleValue(20.0), "DeltaY", 
DoubleValue(20.0), "GridWidth", UintegerValue(10),
                    "LayoutType", StringValue("RowFirst"));
  mobility.Install (nodes);
}

void
OlsrManetExample::CreateDevices (std::string tr_name)
{
  NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
  wifiMac.SetType ("ns3::AdhocWifiMac");
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
  YansWifiChannelHelper wifiChannel;
  wifiChannel.SetPropagationDelay 
("ns3::ConstantSpeedPropagationDelayModel");
  wifiChannel.AddPropagationLoss ("ns3::FriisPropagationLossModel");
  wifiPhy.SetChannel (wifiChannel.Create ());
  WifiHelper wifi;
  wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
  wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", 
StringValue (m_phyMode), "ControlMode",
                                StringValue (m_phyMode));
  devices = wifi.Install (wifiPhy, wifiMac, nodes);

  AsciiTraceHelper ascii;
//   wifiPhy.EnableAsciiAll (ascii.CreateFileStream (tr_name + ".tr"));
//   wifiPhy.EnablePcapAll (tr_name);
}

void
OlsrManetExample::InstallInternetStack (std::string tr_name)
{

  OlsrHelper olsr;
 
  InternetStackHelper stack;
  stack.SetRoutingHelper (olsr); // has effect on the next Install ()
  stack.Install (nodes);
  Ipv4AddressHelper address;
  address.SetBase ("192.168.1.0", "255.255.255.0");
  interfaces = address.Assign (devices);
  if (m_printRoutes)
    {
      Ptr&amp;lt;OutputStreamWrapper&amp;gt; routingStream = Create&amp;lt;OutputStreamWrapper&amp;gt; 
((tr_name + ".routes"), std::ios::out);
      olsr.PrintRoutingTableAllAt (Seconds (2), routingStream);
    }
}

void
OlsrManetExample::InstallApplications ()
{
  for (uint32_t i = 0; i &amp;lt;= m_nSinks - 1; i++ )
    {
      Ptr&amp;lt;Node&amp;gt; node = NodeList::GetNode (i);
      Ipv4Address nodeAddress = node-&amp;gt;GetObject&amp;lt;Ipv4&amp;gt; ()-&amp;gt;GetAddress (1, 
0).GetLocal ();
      Ptr&amp;lt;Socket&amp;gt; sink = SetupPacketReceive (nodeAddress, node);
    }

  for (uint32_t clientNode = 0; clientNode &amp;lt;= m_nWifis - 1; clientNode++ )
    {
      for (uint32_t j = 0; j &amp;lt;= m_nSinks - 1; j++ )
        {
          OnOffHelper onoff1 ("ns3::UdpSocketFactory", Address 
(InetSocketAddress (interfaces.GetAddress (j), port)));
          onoff1.SetAttribute ("OnTime", StringValue 
("ns3::ConstantRandomVariable[Constant=1.0]"));
          onoff1.SetAttribute ("OffTime", StringValue 
("ns3::ConstantRandomVariable[Constant=0.0]"));

          if (j != clientNode)
            {
              ApplicationContainer apps1 = onoff1.Install (nodes.Get 
(clientNode));
              Ptr&amp;lt;UniformRandomVariable&amp;gt; var = 
CreateObject&amp;lt;UniformRandomVariable&amp;gt; ();
             apps1.Start (Seconds (var-&amp;gt;GetValue (m_dataStart, m_dataStart 
+ 1)));
              apps1.Stop (Seconds (m_totalTime));
            }
        }
    }
}
Could someone help me please ? 

Thanks 

&lt;/pre&gt;</description>
    <dc:creator>Nesrine Doghri</dc:creator>
    <dc:date>2013-06-18T12:46:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.simulator.ns3.user/20367">
    <title>Empty Routing Tables in OLSR</title>
    <link>http://comments.gmane.org/gmane.network.simulator.ns3.user/20367</link>
    <description>&lt;pre&gt;Dear All , 

When I ran my script , I got empty routing tables :
here's my code :
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2010 Hemanth Narra
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Hemanth Narra &amp;lt;hemanth-4UKb5NUtQT1BDgjK7y7TUQ&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
 *
 * James P.G. Sterbenz &amp;lt;jpgs-4UKb5NUtQT2Vc3sceRu5cw&amp;lt; at &amp;gt;public.gmane.org&amp;gt;, director
 * ResiliNets Research Group  http://wiki.ittc.ku.edu/resilinets
 * Information and Telecommunication Technology Center (ITTC)
 * and Department of Electrical Engineering and Computer Science
 * The University of Kansas Lawrence, KS USA.
 *
 * Work supported in part by NSF FIND (Future Internet Design) Program
 * under grant CNS-0626918 (Postmodern Internet Architecture),
 * NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and 
Experimentation on GENI),
 * US Department of Defense (DoD), and ITTC at The University of Kansas.
 */
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"
#include "ns3/olsr-routing-protocol.h"
#include "ns3/olsr-helper.h"
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;cmath&amp;gt;

using namespace ns3;

uint16_t port = 9;

NS_LOG_COMPONENT_DEFINE ("OlsrManetExample");

class OlsrManetExample
{
public:
  OlsrManetExample ();
  void CaseRun (uint32_t nWifis,
                uint32_t nSinks,
                double totalTime,
                std::string rate,
                std::string phyMode,
                double dataStart,
                bool printRoutes,
                std::string CSVfileName);

private:
  uint32_t m_nWifis;
  uint32_t m_nSinks;
  double m_totalTime;
  std::string m_rate;
  std::string m_phyMode;


  double m_dataStart;
  uint32_t bytesTotal;
  uint32_t packetsReceived;
  bool m_printRoutes;
  std::string m_CSVfileName;
//   uint32_t m_xSize ;
//   uint32_t m_ySize ;
//   uint32_t m_step ;

  NodeContainer nodes;
  NetDeviceContainer devices;
  Ipv4InterfaceContainer interfaces;

private:
  void CreateNodes ();
  void CreateDevices (std::string tr_name);
  void InstallInternetStack (std::string tr_name);
  void InstallApplications ();
  void SetupMobility ();
  void ReceivePacket (Ptr &amp;lt;Socket&amp;gt; );
  Ptr &amp;lt;Socket&amp;gt; SetupPacketReceive (Ipv4Address, Ptr &amp;lt;Node&amp;gt; );
  void CheckThroughput ();

};

int main (int argc, char **argv)
{
  OlsrManetExample test;
  uint32_t nWifis = 20;
  uint32_t nSinks = 20;
  double totalTime = 500.0;
  std::string rate ("8kbps");
  std::string phyMode ("DsssRate11Mbps");

  std::string appl = "all";
 
  double dataStart = 10.0;
  bool printRoutingTable = true;
  std::string CSVfileName = "OlsrManetExample.csv";
//   uint32_t m_xSize =10;
//  uint32_t m_ySize =10;
//   uint32_t m_step =300;
  
  CommandLine cmd;
  cmd.AddValue ("nWifis", "Number of wifi nodes[Default:30]", nWifis);
  cmd.AddValue ("nSinks", "Number of wifi sink nodes[Default:10]", nSinks);
  cmd.AddValue ("totalTime", "Total Simulation time[Default:100]", 
totalTime);
  cmd.AddValue ("phyMode", "Wifi Phy mode[Default:DsssRate11Mbps]", 
phyMode);
  cmd.AddValue ("rate", "CBR traffic rate[Default:8kbps]", rate);

  cmd.AddValue ("dataStart", "Time at which nodes start to transmit 
data[Default=50.0]", dataStart);
  cmd.AddValue ("printRoutingTable", "print routing table for 
nodes[Default:1]", printRoutingTable);
  cmd.AddValue ("CSVfileName", "The name of the CSV output file 
name[Default:OlsrManetExample.csv]", CSVfileName);
  cmd.Parse (argc, argv);

  std::ofstream out (CSVfileName.c_str ());
  out &amp;lt;&amp;lt; "SimulationSecond," &amp;lt;&amp;lt;
  "ReceiveRate," &amp;lt;&amp;lt;
  "PacketsReceived," &amp;lt;&amp;lt;
  "NumberOfSinks," &amp;lt;&amp;lt;
  std::endl;
  out.close ();

  SeedManager::SetSeed (12345);

  Config::SetDefault ("ns3::OnOffApplication::PacketSize", StringValue 
("1000"));
  Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue 
(rate));
  Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode", 
StringValue (phyMode));
   Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", 
StringValue ("2000"));

  test = OlsrManetExample ();
  test.CaseRun (nWifis, nSinks, totalTime, rate, phyMode, 
                 dataStart, printRoutingTable, CSVfileName);

  return 0;
}

OlsrManetExample::OlsrManetExample ()
  : bytesTotal (0),
    packetsReceived (0)
{
}

void
OlsrManetExample::ReceivePacket (Ptr &amp;lt;Socket&amp;gt; socket)
{
  NS_LOG_UNCOND (Simulator::Now ().GetSeconds () &amp;lt;&amp;lt; " Received one 
packet!");
  Ptr &amp;lt;Packet&amp;gt; packet;
  while ((packet = socket-&amp;gt;Recv ()))
    {
      bytesTotal += packet-&amp;gt;GetSize ();
      packetsReceived += 1;
    }
}

void
OlsrManetExample::CheckThroughput ()
{
  double kbs = (bytesTotal * 8.0) / 1000;
  bytesTotal = 0;

  std::ofstream out (m_CSVfileName.c_str (), std::ios::app);

  out &amp;lt;&amp;lt; (Simulator::Now ()).GetSeconds () &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; kbs &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; 
packetsReceived &amp;lt;&amp;lt; "," &amp;lt;&amp;lt; m_nSinks &amp;lt;&amp;lt; std::endl;

  out.close ();
  packetsReceived = 0;
  Simulator::Schedule (Seconds (1.0), &amp;amp;OlsrManetExample::CheckThroughput, 
this);
}

Ptr &amp;lt;Socket&amp;gt;
OlsrManetExample::SetupPacketReceive (Ipv4Address addr, Ptr &amp;lt;Node&amp;gt; node)
{

  TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
  Ptr &amp;lt;Socket&amp;gt; sink = Socket::CreateSocket (node, tid);
  InetSocketAddress local = InetSocketAddress (addr, port);
  sink-&amp;gt;Bind (local);
  sink-&amp;gt;SetRecvCallback (MakeCallback ( &amp;amp;OlsrManetExample::ReceivePacket, 
this));

  return sink;
}

void
OlsrManetExample::CaseRun (uint32_t nWifis, uint32_t nSinks, double 
totalTime, std::string rate,
                           std::string phyMode ,
                           double dataStart, bool printRoutes, std::string 
CSVfileName)
{
  m_nWifis = nWifis;
  m_nSinks = nSinks;
  m_totalTime = totalTime;
  m_rate = rate;
  m_phyMode = phyMode;
 
  
  m_dataStart = dataStart;
  m_printRoutes = printRoutes;
  m_CSVfileName = CSVfileName;

  std::stringstream ss;
  ss &amp;lt;&amp;lt; m_nWifis;
  std::string t_nodes = ss.str ();

  std::stringstream ss3;
  ss3 &amp;lt;&amp;lt; m_totalTime;
  std::string sTotalTime = ss3.str ();

  std::string tr_name = "OLSR_Manet_" + t_nodes + "Nodes_" + sTotalTime + 
"SimTime";
  std::cout &amp;lt;&amp;lt; "Trace file generated is " &amp;lt;&amp;lt; tr_name &amp;lt;&amp;lt; ".tr\n";

  CreateNodes ();
  CreateDevices (tr_name);
  SetupMobility ();
  InstallInternetStack (tr_name);
  InstallApplications ();

  std::cout &amp;lt;&amp;lt; "\nStarting simulation for " &amp;lt;&amp;lt; m_totalTime &amp;lt;&amp;lt; " s ...\n";

  CheckThroughput ();

  Simulator::Stop (Seconds (m_totalTime));
  Simulator::Run ();
  Simulator::Destroy ();
}

void
OlsrManetExample::CreateNodes ()
{
  std::cout &amp;lt;&amp;lt; "Creating " &amp;lt;&amp;lt; (unsigned) m_nWifis &amp;lt;&amp;lt; " nodes.\n";
  nodes.Create (m_nWifis);
  NS_ASSERT_MSG (m_nWifis &amp;gt; m_nSinks, "Sinks must be less or equal to the 
number of nodes in network");
}

void
OlsrManetExample::SetupMobility ()
{
  MobilityHelper mobility;

mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
//   mobility.SetPositionAllocator (taPositionAlloc);
  mobility.SetPositionAllocator("ns3::GridPositionAllocator", "MinX", 
DoubleValue(0.0), "MinY", DoubleValue(0.0),
                    "DeltaX", DoubleValue(20.0), "DeltaY", 
DoubleValue(20.0), "GridWidth", UintegerValue(10),
                    "LayoutType", StringValue("RowFirst"));
  mobility.Install (nodes);
}

void
OlsrManetExample::CreateDevices (std::string tr_name)
{
  NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
  wifiMac.SetType ("ns3::AdhocWifiMac");
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
  YansWifiChannelHelper wifiChannel;
  wifiChannel.SetPropagationDelay 
("ns3::ConstantSpeedPropagationDelayModel");
  wifiChannel.AddPropagationLoss ("ns3::FriisPropagationLossModel");
  wifiPhy.SetChannel (wifiChannel.Create ());
  WifiHelper wifi;
  wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
  wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", 
StringValue (m_phyMode), "ControlMode",
                                StringValue (m_phyMode));
  devices = wifi.Install (wifiPhy, wifiMac, nodes);

  AsciiTraceHelper ascii;
//   wifiPhy.EnableAsciiAll (ascii.CreateFileStream (tr_name + ".tr"));
//   wifiPhy.EnablePcapAll (tr_name);
}

void
OlsrManetExample::InstallInternetStack (std::string tr_name)
{

  OlsrHelper olsr;
 
  InternetStackHelper stack;
  stack.SetRoutingHelper (olsr); // has effect on the next Install ()
  stack.Install (nodes);
  Ipv4AddressHelper address;
  address.SetBase ("192.168.1.0", "255.255.255.0");
  interfaces = address.Assign (devices);
  if (m_printRoutes)
    {
      Ptr&amp;lt;OutputStreamWrapper&amp;gt; routingStream = Create&amp;lt;OutputStreamWrapper&amp;gt; 
((tr_name + ".routes"), std::ios::out);
      olsr.PrintRoutingTableAllAt (Seconds (2), routingStream);
    }
}

void
OlsrManetExample::InstallApplications ()
{
  for (uint32_t i = 0; i &amp;lt;= m_nSinks - 1; i++ )
    {
      Ptr&amp;lt;Node&amp;gt; node = NodeList::GetNode (i);
      Ipv4Address nodeAddress = node-&amp;gt;GetObject&amp;lt;Ipv4&amp;gt; ()-&amp;gt;GetAddress (1, 
0).GetLocal ();
      Ptr&amp;lt;Socket&amp;gt; sink = SetupPacketReceive (nodeAddress, node);
    }

  for (uint32_t clientNode = 0; clientNode &amp;lt;= m_nWifis - 1; clientNode++ )
    {
      for (uint32_t j = 0; j &amp;lt;= m_nSinks - 1; j++ )
        {
          OnOffHelper onoff1 ("ns3::UdpSocketFactory", Address 
(InetSocketAddress (interfaces.GetAddress (j), port)));
          onoff1.SetAttribute ("OnTime", StringValue 
("ns3::ConstantRandomVariable[Constant=1.0]"));
          onoff1.SetAttribute ("OffTime", StringValue 
("ns3::ConstantRandomVariable[Constant=0.0]"));

          if (j != clientNode)
            {
              ApplicationContainer apps1 = onoff1.Install (nodes.Get 
(clientNode));
              Ptr&amp;lt;UniformRandomVariable&amp;gt; var = 
CreateObject&amp;lt;UniformRandomVariable&amp;gt; ();
             apps1.Start (Seconds (var-&amp;gt;GetValue (m_dataStart, m_dataStart 
+ 1)));
              apps1.Stop (Seconds (m_totalTime));
            }
        }
    }
}
Could someone help me please ? 

Thanks 

&lt;/pre&gt;</description>
    <dc:creator>Nesrine Doghri</dc:creator>
    <dc:date>2013-06-18T12:40:05</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.network.simulator.ns3.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.network.simulator.ns3.user</link>
  </textinput>
</rdf:RDF>
