tutorial/tutorial-bus-network.cc
changeset 2888 872dc8466352
parent 2887 9a637e6daee0
child 2965 4b28e9740e3b
child 2996 a83b94e277d4
equal deleted inserted replaced
2887:9a637e6daee0 2888:872dc8466352
    44   csma.SetChannelParameter ("Delay", MilliSeconds(20));
    44   csma.SetChannelParameter ("Delay", MilliSeconds(20));
    45   NetDeviceContainer nd = csma.Install (n);
    45   NetDeviceContainer nd = csma.Install (n);
    46 
    46 
    47   Ipv4AddressHelper ipv4;
    47   Ipv4AddressHelper ipv4;
    48   ipv4.SetBase ("10.1.0.0", "255.255.0.0", "0.0.0.3");
    48   ipv4.SetBase ("10.1.0.0", "255.255.0.0", "0.0.0.3");
    49   Ipv4InterfaceContainer i = ipv4.Allocate (nd);
    49   Ipv4InterfaceContainer i = ipv4.Assign (nd);
    50 
    50 
    51   uint32_t port = 7;
    51   uint32_t port = 7;
    52   UdpEchoClientHelper client;
    52   UdpEchoClientHelper client;
    53   client.SetRemote (i.GetAddress (1), port);
    53   client.SetRemote (i.GetAddress (1), port);
    54   client.SetAppAttribute ("MaxPackets", Uinteger (1));
    54   client.SetAppAttribute ("MaxPackets", Uinteger (1));