Skip to content

Commit

Permalink
examples: Change Recovery algorithm in TcpVariantsComparison
Browse files Browse the repository at this point in the history
  • Loading branch information
natale-p committed May 15, 2018
1 parent 1095d99 commit b579c44
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/tcp/tcp-variants-comparison.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ int main (int argc, char *argv[])
bool pcap = false;
bool sack = true;
std::string queue_disc_type = "ns3::PfifoFastQueueDisc";
std::string recovery = "ns3::TcpClassicRecovery";


CommandLine cmd;
Expand All @@ -246,6 +247,7 @@ int main (int argc, char *argv[])
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.AddValue ("recovery", "Recovery algorithm type to use (e.g., ns3::TcpPrrRecovery", recovery);
cmd.Parse (argc, argv);

transport_prot = std::string ("ns3::") + transport_prot;
Expand Down Expand Up @@ -279,6 +281,8 @@ int main (int argc, char *argv[])
Config::SetDefault ("ns3::TcpSocket::SndBufSize", UintegerValue (1 << 21));
Config::SetDefault ("ns3::TcpSocketBase::Sack", BooleanValue (sack));

Config::SetDefault ("ns3::TcpL4Protocol::RecoveryType",
TypeIdValue (TypeId::LookupByName (recovery)));
// Select TCP variant
if (transport_prot.compare ("ns3::TcpWestwoodPlus") == 0)
{
Expand Down

0 comments on commit b579c44

Please sign in to comment.