title: VANET simple CBR application, no output (empty pcap files)?
body: <p>I have a problem .. 
  i wanted to simulate a VANET network (only two nodes), that use <strong>OnOffApplication</strong> (in order to simulte video streaming traffic)
  I tried the following code, no error appear, however, the pcap files are empty ? and not packets were sent at all. Any suggestion please ?</p>
  
  <pre><code>  int main (int argc, char *argv[])
    {
    std::string phyMode ("OfdmRate6MbpsBW10MHz");
  
  
    bool verbose = false;
    NodeContainer c;
    c.Create (2);
  
    // The below set of helpers will help us to put together the wifi NICs we want
    YansWifiPhyHelper wifiPhy =  YansWifiPhyHelper::Default ();
    YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
    Ptr&lt;YansWifiChannel&gt; channel = wifiChannel.Create ();
    wifiPhy.SetChannel (channel);
    // ns-3 supports generate a pcap trace
    wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11);
    NqosWaveMacHelper wifi80211pMac = NqosWaveMacHelper::Default ();
    Wifi80211pHelper wifi80211p = Wifi80211pHelper::Default ();
    if (verbose)
      {
        wifi80211p.EnableLogComponents ();      // Turn on all Wifi 802.11p logging
      }
  
    wifi80211p.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
                                        "DataMode",StringValue (phyMode),
                                        "ControlMode",StringValue (phyMode));
    NetDeviceContainer devices = wifi80211p.Install (wifiPhy, wifi80211pMac, c);
  
    // Tracing
    wifiPhy.EnablePcap ("wave-simple-80211p", devices);
  
    MobilityHelper mobility;
    Ptr&lt;ListPositionAllocator&gt; positionAlloc = CreateObject&lt;ListPositionAllocator&gt; ();
    positionAlloc-&gt;Add (Vector (0.0, 0.0, 0.0));
    positionAlloc-&gt;Add (Vector (5.0, 0.0, 0.0));
    mobility.SetPositionAllocator (positionAlloc);
    mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
    mobility.Install (c);
  
    InternetStackHelper internet;
    internet.Install (c);
  
  
    Address serverAddress;
    Ipv4AddressHelper ipv4;
    NS_LOG_INFO ("Assign IP Addresses.");
    ipv4.SetBase ("192.168.1.0", "255.255.255.0");
    Ipv4InterfaceContainer i = ipv4.Assign (devices);
    serverAddress = Address (i.GetAddress (1));
  
  
   // Create router nodes, initialize routing database and set up the routing
    // tables in the nodes.
    Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
  
    // Create the OnOff application to send UDP datagrams of size
    // 210 bytes at a rate of 448 Kb/s
    NS_LOG_INFO ("Create Applications.");
    uint16_t port = 9;   // Discard port (RFC 863)
    OnOffHelper onoff ("ns3::UdpSocketFactory", 
                       Address (InetSocketAddress (i.GetAddress (0), port)));
    onoff.SetConstantRate (DataRate ("448kb/s"));
    ApplicationContainer apps = onoff.Install (c.Get (0));
    apps.Start (Seconds (1.0));
    apps.Stop (Seconds (10.0));
  
    // Create a packet sink to receive these packets
    PacketSinkHelper sink ("ns3::UdpSocketFactory",
                           Address (InetSocketAddress (i.GetAddress(1), port)));
    apps = sink.Install (c.Get (1));
    apps.Start (Seconds (1.0));
    apps.Stop (Seconds (10.0));
  
  
    AsciiTraceHelper ascii;
    wifiPhy.EnableAsciiAll (ascii.CreateFileStream ("simple-global-routing.tr"));
    wifiPhy.EnablePcapAll ("simple-global-routing");
  
    // // Flow Monitor
    // FlowMonitorHelper flowmonHelper;
    // if (enableFlowMonitor)
      // {
        // flowmonHelper.InstallAll ();
      // }
  
    NS_LOG_INFO ("Run Simulation.");
    Simulator::Stop (Seconds (11));
    Simulator::Run ();
    NS_LOG_INFO ("Done.");
  
  
  NS_LOG_INFO ("Done.");
    Simulator::Destroy ();
  
  
    return 0;
  }
  </code></pre>
  
  <p>What Should i do exactly ? </p>