From 0738710da2691e26b5825bba6d4bbed85399bc6e Mon Sep 17 00:00:00 2001 From: Natale Patriciello Date: Fri, 3 Feb 2017 14:02:39 +0100 Subject: [PATCH] example: TcpVariantsComparison SACK on command line --- examples/tcp/tcp-variants-comparison.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/tcp/tcp-variants-comparison.cc b/examples/tcp/tcp-variants-comparison.cc index 96c0af2e7..0fa276a23 100644 --- a/examples/tcp/tcp-variants-comparison.cc +++ b/examples/tcp/tcp-variants-comparison.cc @@ -218,6 +218,7 @@ int main (int argc, char *argv[]) uint32_t run = 0; bool flow_monitor = false; bool pcap = false; + bool sack = true; std::string queue_disc_type = "ns3::PfifoFastQueueDisc"; @@ -240,6 +241,7 @@ int main (int argc, char *argv[]) cmd.AddValue ("flow_monitor", "Enable flow monitor", flow_monitor); cmd.AddValue ("pcap_tracing", "Enable or disable PCAP tracing", pcap); cmd.AddValue ("queue_disc_type", "Queue disc type for gateway (e.g. ns3::CoDelQueueDisc)", queue_disc_type); + cmd.AddValue ("sack", "Enable or disable SACK option", sack); cmd.Parse (argc, argv); SeedManager::SetSeed (1); @@ -269,6 +271,7 @@ int main (int argc, char *argv[]) // 4 MB of TCP buffer Config::SetDefault ("ns3::TcpSocket::RcvBufSize", UintegerValue (1 << 21)); Config::SetDefault ("ns3::TcpSocket::SndBufSize", UintegerValue (1 << 21)); + Config::SetDefault ("ns3::TcpSocketBase::Sack", BooleanValue (sack)); // Select TCP variant if (transport_prot.compare ("TcpNewReno") == 0)