examples/tcp/tcp-nsc-zoo.cc
author Tom Henderson <tomh@tomh.org>
Mon, 28 Sep 2015 20:27:25 -0700
changeset 11676 05ea1489e509
parent 8966 060dba23e9bb
permissions -rw-r--r--
bug 2184: Integer overflow in MacLow
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     2
/*
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     3
 * This program is free software; you can redistribute it and/or modify
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     4
 * it under the terms of the GNU General Public License version 2 as
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     5
 * published by the Free Software Foundation;
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     6
 *
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     7
 * This program is distributed in the hope that it will be useful,
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
     9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    10
 * GNU General Public License for more details.
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    11
 *
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    12
 * You should have received a copy of the GNU General Public License
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    13
 * along with this program; if not, write to the Free Software
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    14
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    15
 *
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    16
 */
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    17
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    18
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    19
// Network topology
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    20
//
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    21
//       n0    n1   n2   n3
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    22
//       |     |    |    |
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    23
//       =================
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    24
//              LAN
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    25
//
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    26
// - Pcap traces are saved as tcp-nsc-zoo-$n-0.pcap, where $n represents the node number
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    27
// - TCP flows from n0 to n1, n2, n3, from n1 to n0, n2, n3, etc.
3675
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    28
//  Usage (e.g.): ./waf --run 'tcp-nsc-zoo --nodes=5'
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    29
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    30
#include <iostream>
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    31
#include <string>
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    32
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    33
#include "ns3/core-module.h"
6847
138f00c56381 Move applications to a single module
Mitch Watrous <watrous@u.washington.edu>
parents: 6845
diff changeset
    34
#include "ns3/applications-module.h"
6823
a27f86fb4e55 Merge node and common modules into new network module
Tom Henderson <tomh@tomh.org>
parents: 6821
diff changeset
    35
#include "ns3/network-module.h"
6848
1f453ad50ef3 Converts csma, emu, tap-bridge, point-to-point, wifi and wimax modules into modular format
Lalith Suresh <suresh.lalith@gmail.com>
parents: 6847
diff changeset
    36
#include "ns3/csma-module.h"
7089
ebe626d82692 Bug 1105 Move topology helpers into separate per-device modules
John Abraham<john.abraham@gatech.edu>
parents: 6865
diff changeset
    37
#include "ns3/internet-module.h"
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    38
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    39
using namespace ns3;
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    40
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    41
NS_LOG_COMPONENT_DEFINE ("TcpNscZoo");
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    42
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    43
// Simulates a diverse network with various stacks supported by NSC.
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
    44
int main (int argc, char *argv[])
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    45
{
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    46
  CsmaHelper csma;
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    47
  unsigned int MaxNodes = 4;
3675
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    48
  unsigned int runtime = 3;
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    49
3675
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    50
  Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (2048));
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    51
  Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("8kbps"));
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    52
  CommandLine cmd;
3675
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    53
  // this allows the user to raise the number of nodes using --nodes=X command-line argument.
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
    54
  cmd.AddValue ("nodes", "Number of nodes in the network (must be > 1)", MaxNodes);
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
    55
  cmd.AddValue ("runtime", "How long the applications should send data (default 3 seconds)", runtime);
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    56
  cmd.Parse (argc, argv);
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    57
3675
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    58
  if (MaxNodes < 2)
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    59
    {
7196
0f12b1572bca general examples coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7152
diff changeset
    60
      std::cerr << "--nodes: must be >= 2" << std::endl;
0f12b1572bca general examples coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7152
diff changeset
    61
      return 1;
3675
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    62
    }
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
    63
  csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (100 * 1000 * 1000)));
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    64
  csma.SetChannelAttribute ("Delay", TimeValue (MicroSeconds (200)));
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    65
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    66
  NodeContainer n;
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
    67
  n.Create (MaxNodes);
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    68
  NetDeviceContainer ethInterfaces = csma.Install (n);
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    69
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    70
  InternetStackHelper internetStack;
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
    71
  internetStack.SetTcp ("ns3::NscTcpL4Protocol","Library",StringValue ("liblinux2.6.26.so"));
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    72
  // this switches nodes 0 and 1 to NSCs Linux 2.6.26 stack.
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
    73
  internetStack.Install (n.Get (0));
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
    74
  internetStack.Install (n.Get (1));
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    75
  // this disables TCP SACK, wscale and timestamps on node 1 (the attributes represent sysctl-values).
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    76
  Config::Set ("/NodeList/1/$ns3::Ns3NscStack<linux2.6.26>/net.ipv4.tcp_sack", StringValue ("0"));
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    77
  Config::Set ("/NodeList/1/$ns3::Ns3NscStack<linux2.6.26>/net.ipv4.tcp_timestamps", StringValue ("0"));
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    78
  Config::Set ("/NodeList/1/$ns3::Ns3NscStack<linux2.6.26>/net.ipv4.tcp_window_scaling", StringValue ("0"));
3675
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    79
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    80
  if (MaxNodes > 2)
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    81
    {
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
    82
      internetStack.Install (n.Get (2));
3675
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    83
    }
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    84
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    85
  if (MaxNodes > 3)
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    86
    {
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    87
      // the next statement doesn't change anything for the nodes 0, 1, and 2; since they
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    88
      // already have a stack assigned.
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
    89
      internetStack.SetTcp ("ns3::NscTcpL4Protocol","Library",StringValue ("liblinux2.6.26.so"));
7152
f20b4cae997d Bug 1129 nsc library path setting is not robust
John Abraham<john.abraham@gatech.edu>
parents: 7089
diff changeset
    90
      // this switches node 3 to NSCs Linux 2.6.26 stack.
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
    91
      internetStack.Install (n.Get (3));
3675
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    92
      // and then agains disables sack/timestamps/wscale on node 3.
7152
f20b4cae997d Bug 1129 nsc library path setting is not robust
John Abraham<john.abraham@gatech.edu>
parents: 7089
diff changeset
    93
      Config::Set ("/NodeList/3/$ns3::Ns3NscStack<linux2.6.26>/net.ipv4.tcp_sack", StringValue ("0"));
f20b4cae997d Bug 1129 nsc library path setting is not robust
John Abraham<john.abraham@gatech.edu>
parents: 7089
diff changeset
    94
      Config::Set ("/NodeList/3/$ns3::Ns3NscStack<linux2.6.26>/net.ipv4.tcp_timestamps", StringValue ("0"));
f20b4cae997d Bug 1129 nsc library path setting is not robust
John Abraham<john.abraham@gatech.edu>
parents: 7089
diff changeset
    95
      Config::Set ("/NodeList/3/$ns3::Ns3NscStack<linux2.6.26>/net.ipv4.tcp_window_scaling", StringValue ("0"));
3675
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
    96
    }
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    97
  // the freebsd stack is not yet built by default, so its commented out for now.
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    98
  // internetStack.SetNscStack ("libfreebsd5.so");
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
    99
  for (unsigned int i =4; i < MaxNodes; i++)
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   100
    {
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
   101
      internetStack.Install (n.Get (i));
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   102
    }
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   103
  Ipv4AddressHelper ipv4;
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   104
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   105
  ipv4.SetBase ("10.0.0.0", "255.255.255.0");
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   106
  Ipv4InterfaceContainer ipv4Interfaces = ipv4.Assign (ethInterfaces);
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   107
4616
a84f60b6cd12 bug 600: lower the default routing priority of Ipv4GlobalRouting; move to helper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4473
diff changeset
   108
  Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   109
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   110
  uint16_t servPort = 8080;
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   111
  PacketSinkHelper sinkHelper ("ns3::TcpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), servPort));
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   112
  // start a sink client on all nodes
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   113
  ApplicationContainer sinkApp = sinkHelper.Install (n);
3675
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
   114
  sinkApp.Start (Seconds (0));
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   115
  sinkApp.Stop (Seconds (30.0));
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   116
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   117
  // This tells every node on the network to start a flow to all other nodes on the network ...
7252
c8200621e252 rerun check-style.py with uncrustify-0.58
Tom Henderson <tomh@tomh.org>
parents: 7196
diff changeset
   118
  for (unsigned int i = 0; i < MaxNodes; i++)
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   119
    {
7252
c8200621e252 rerun check-style.py with uncrustify-0.58
Tom Henderson <tomh@tomh.org>
parents: 7196
diff changeset
   120
      for (unsigned int j = 0; j < MaxNodes; j++)
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   121
        {
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   122
          if (i == j)
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   123
            {  // ...but we don't want a node to talk to itself.
7196
0f12b1572bca general examples coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7152
diff changeset
   124
              continue;
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   125
            }
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
   126
          Address remoteAddress (InetSocketAddress (ipv4Interfaces.GetAddress (j), servPort));
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   127
          OnOffHelper clientHelper ("ns3::TcpSocketFactory", remoteAddress);
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   128
          clientHelper.SetAttribute 
8966
060dba23e9bb Replace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
   129
            ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   130
          clientHelper.SetAttribute 
8966
060dba23e9bb Replace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
   131
            ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
   132
          ApplicationContainer clientApp = clientHelper.Install (n.Get (i));
3675
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
   133
          clientApp.Start (Seconds (j)); /* delay startup depending on node number */
266033a58f24 nsc: rework tcp-nsc-zoo example
Florian Westphal <fw@strlen.de>
parents: 3580
diff changeset
   134
          clientApp.Stop (Seconds (j + runtime));
7196
0f12b1572bca general examples coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7152
diff changeset
   135
        }
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   136
    }
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   137
6009
e1b696a1ed28 redo pcap tracing
Craig Dowell <craigdo@ee.washington.edu>
parents: 5369
diff changeset
   138
  csma.EnablePcapAll ("tcp-nsc-zoo", false);
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   139
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7252
diff changeset
   140
  Simulator::Stop (Seconds (100));
3580
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   141
  Simulator::Run ();
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   142
  Simulator::Destroy ();
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   143
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   144
  return 0;
5818912ae9a3 nsc: example files.
Florian Westphal <fw@strlen.de>
parents:
diff changeset
   145
}