tutorial/tutorial-csma-echo.cc
changeset 2888 872dc8466352
parent 2887 9a637e6daee0
child 2965 4b28e9740e3b
equal deleted inserted replaced
2887:9a637e6daee0 2888:872dc8466352
    40   csma.SetChannelParameter ("Delay", MilliSeconds (2));
    40   csma.SetChannelParameter ("Delay", MilliSeconds (2));
    41   NetDeviceContainer nd = csma.Install (n);
    41   NetDeviceContainer nd = csma.Install (n);
    42 
    42 
    43   Ipv4AddressHelper ipv4;
    43   Ipv4AddressHelper ipv4;
    44   ipv4.SetBase ("10.1.1.0", "255.255.255.0");
    44   ipv4.SetBase ("10.1.1.0", "255.255.255.0");
    45   Ipv4InterfaceContainer i = ipv4.Allocate (nd);
    45   Ipv4InterfaceContainer i = ipv4.Assign (nd);
    46 
    46 
    47   uint16_t port = 7;
    47   uint16_t port = 7;
    48 
    48 
    49   UdpEchoClientHelper client;
    49   UdpEchoClientHelper client;
    50   client.SetRemote (i.GetAddress (1), port);
    50   client.SetRemote (i.GetAddress (1), port);