LEFT | RIGHT |
(no file at all) | |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2014 Piotr Gawlowicz | 3 * Copyright (c) 2014 Piotr Gawlowicz |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 for (uint32_t b = 0; b < 1; ++b) | 274 for (uint32_t b = 0; b < 1; ++b) |
275 { | 275 { |
276 ++dlPort; | 276 ++dlPort; |
277 ++ulPort; | 277 ++ulPort; |
278 | 278 |
279 ApplicationContainer clientApps; | 279 ApplicationContainer clientApps; |
280 ApplicationContainer serverApps; | 280 ApplicationContainer serverApps; |
281 | 281 |
282 UdpClientHelper dlClientHelper (ueIpIfaces.GetAddress (u), dlPort); | 282 UdpClientHelper dlClientHelper (ueIpIfaces.GetAddress (u), dlPort); |
283 dlClientHelper.SetAttribute ("MaxPackets", UintegerValue (1000000)); | 283 dlClientHelper.SetAttribute ("MaxPackets", UintegerValue (1000000)); |
284 dlClientHelper.SetAttribute ("Interval", TimeValue (MilliSeconds (1.0)
)); | 284 dlClientHelper.SetAttribute ("Interval", TimeValue (MilliSeconds (1)))
; |
285 clientApps.Add (dlClientHelper.Install (remoteHost)); | 285 clientApps.Add (dlClientHelper.Install (remoteHost)); |
286 PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory", | 286 PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory", |
287 InetSocketAddress (Ipv4Address::G
etAny (), dlPort)); | 287 InetSocketAddress (Ipv4Address::G
etAny (), dlPort)); |
288 serverApps.Add (dlPacketSinkHelper.Install (ue)); | 288 serverApps.Add (dlPacketSinkHelper.Install (ue)); |
289 | 289 |
290 | 290 |
291 UdpClientHelper ulClientHelper (remoteHostAddr, ulPort); | 291 UdpClientHelper ulClientHelper (remoteHostAddr, ulPort); |
292 ulClientHelper.SetAttribute ("MaxPackets", UintegerValue (1000000)); | 292 ulClientHelper.SetAttribute ("MaxPackets", UintegerValue (1000000)); |
293 ulClientHelper.SetAttribute ("Interval", TimeValue (MilliSeconds (1.0)
)); | 293 ulClientHelper.SetAttribute ("Interval", TimeValue (MilliSeconds (1)))
; |
294 clientApps.Add (ulClientHelper.Install (ue)); | 294 clientApps.Add (ulClientHelper.Install (ue)); |
295 PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory", | 295 PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory", |
296 InetSocketAddress (Ipv4Address::G
etAny (), ulPort)); | 296 InetSocketAddress (Ipv4Address::G
etAny (), ulPort)); |
297 serverApps.Add (ulPacketSinkHelper.Install (remoteHost)); | 297 serverApps.Add (ulPacketSinkHelper.Install (remoteHost)); |
298 | 298 |
299 Ptr<EpcTft> tft = Create<EpcTft> (); | 299 Ptr<EpcTft> tft = Create<EpcTft> (); |
300 EpcTft::PacketFilter dlpf; | 300 EpcTft::PacketFilter dlpf; |
301 dlpf.localPortStart = dlPort; | 301 dlpf.localPortStart = dlPort; |
302 dlpf.localPortEnd = dlPort; | 302 dlpf.localPortEnd = dlPort; |
303 tft->Add (dlpf); | 303 tft->Add (dlpf); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 } | 376 } |
377 else | 377 else |
378 { | 378 { |
379 Simulator::Stop (Seconds (simTime)); | 379 Simulator::Stop (Seconds (simTime)); |
380 } | 380 } |
381 | 381 |
382 Simulator::Run (); | 382 Simulator::Run (); |
383 Simulator::Destroy (); | 383 Simulator::Destroy (); |
384 return 0; | 384 return 0; |
385 } | 385 } |
LEFT | RIGHT |