examples/csma-packet-socket.cc
changeset 3381 3cdd9d60f7c7
parent 3257 ba198dad54a2
child 3568 01bebf28addd
equal deleted inserted replaced
3380:38b8549b1ad3 3381:3cdd9d60f7c7
    72     "Delay", TimeValue (MilliSeconds(2)));
    72     "Delay", TimeValue (MilliSeconds(2)));
    73 
    73 
    74   // use a helper function to connect our nodes to the shared channel.
    74   // use a helper function to connect our nodes to the shared channel.
    75   NS_LOG_INFO ("Build Topology.");
    75   NS_LOG_INFO ("Build Topology.");
    76   CsmaHelper csma;
    76   CsmaHelper csma;
    77   csma.SetDeviceParameter ("EncapsulationMode", StringValue ("Llc"));
    77   csma.SetDeviceAttribute ("EncapsulationMode", StringValue ("Llc"));
    78   NetDeviceContainer devs = csma.Install (c, channel);
    78   NetDeviceContainer devs = csma.Install (c, channel);
    79 
    79 
    80   NS_LOG_INFO ("Create Applications.");
    80   NS_LOG_INFO ("Create Applications.");
    81   // Create the OnOff application to send raw datagrams
    81   // Create the OnOff application to send raw datagrams
    82   PacketSocketAddress socket;
    82   PacketSocketAddress socket;