equal
deleted
inserted
replaced
110 // Create the OnOff application to send UDP datagrams of size |
110 // Create the OnOff application to send UDP datagrams of size |
111 // 210 bytes at a rate of 448 Kb/s |
111 // 210 bytes at a rate of 448 Kb/s |
112 uint16_t port = 9; // Discard port (RFC 863) |
112 uint16_t port = 9; // Discard port (RFC 863) |
113 OnOffHelper onoff ("ns3::UdpSocketFactory", |
113 OnOffHelper onoff ("ns3::UdpSocketFactory", |
114 Address (InetSocketAddress (ifInAddrC.GetLocal (), port))); |
114 Address (InetSocketAddress (ifInAddrC.GetLocal (), port))); |
115 onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]")); |
115 onoff.SetConstantRate (DataRate (6000)); |
116 onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]")); |
|
117 onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000))); |
|
118 ApplicationContainer apps = onoff.Install (nA); |
116 ApplicationContainer apps = onoff.Install (nA); |
119 apps.Start (Seconds (1.0)); |
117 apps.Start (Seconds (1.0)); |
120 apps.Stop (Seconds (10.0)); |
118 apps.Stop (Seconds (10.0)); |
121 |
119 |
122 // Create a packet sink to receive these packets |
120 // Create a packet sink to receive these packets |