examples/csma-one-subnet.cc
author Craig Dowell <craigdo@ee.washington.edu>
Mon, 31 Mar 2008 17:48:21 -0700
changeset 2860 9105a5cf6535
parent 2838 d120c4ca2d24
child 2887 9a637e6daee0
permissions -rw-r--r--
use global seed in examples, new regression tests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     2
/*
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     3
 * This program is free software; you can redistribute it and/or modify
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     4
 * it under the terms of the GNU General Public License version 2 as
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     5
 * published by the Free Software Foundation;
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     6
 *
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     7
 * This program is distributed in the hope that it will be useful,
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    10
 * GNU General Public License for more details.
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    11
 *
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    12
 * You should have received a copy of the GNU General Public License
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    13
 * along with this program; if not, write to the Free Software
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    14
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    15
 */
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    16
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    17
// Network topology
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    18
//
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    19
//       n0    n1   n2   n3
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    20
//       |     |    |    |
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    21
//       =================
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    22
//              LAN
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    23
//
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    24
// - CBR/UDP flows from n0 to n1 and from n3 to n0
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    25
// - DropTail queues 
1272
67a2ba1143e0 rename to csma
Craig Dowell <craigdo@ee.washington.edu>
parents: 1224
diff changeset
    26
// - Tracing of queues and packet receptions to file "csma-one-subnet.tr"
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    27
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    28
#include <iostream>
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    29
#include <fstream>
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    30
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    31
#include "ns3/simulator-module.h"
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    32
#include "ns3/core-module.h"
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    33
#include "ns3/helper-module.h"
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    34
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    35
using namespace ns3;
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    36
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
    37
NS_LOG_COMPONENT_DEFINE ("CsmaOneSubnetExample");
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    38
1430
25fa26a6533e many debug prints
Craig Dowell <craigdo@ee.washington.edu>
parents: 1272
diff changeset
    39
int 
25fa26a6533e many debug prints
Craig Dowell <craigdo@ee.washington.edu>
parents: 1272
diff changeset
    40
main (int argc, char *argv[])
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    41
{
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    42
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    43
// Users may find it convenient to turn on explicit debugging
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    44
// for selected modules; the below lines suggest how to do this
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    45
//
991
e05514a93564 fix tracing
Tom Henderson <tomh@tomh.org>
parents: 990
diff changeset
    46
#if 0 
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
    47
  LogComponentEnable ("CsmaOneSubnetExample", LOG_LEVEL_INFO);
1430
25fa26a6533e many debug prints
Craig Dowell <craigdo@ee.washington.edu>
parents: 1272
diff changeset
    48
#endif
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    49
//
2860
9105a5cf6535 use global seed in examples, new regression tests
Craig Dowell <craigdo@ee.washington.edu>
parents: 2838
diff changeset
    50
// Make the random number generators generate reproducible results.
9105a5cf6535 use global seed in examples, new regression tests
Craig Dowell <craigdo@ee.washington.edu>
parents: 2838
diff changeset
    51
//
9105a5cf6535 use global seed in examples, new regression tests
Craig Dowell <craigdo@ee.washington.edu>
parents: 2838
diff changeset
    52
  RandomVariable::UseGlobalSeed (1, 1, 2, 3, 5, 8);
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    53
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    54
// Allow the user to override any of the defaults and the above Bind() at
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    55
// run-time, via command-line arguments
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    56
//
2575
1aae382e65e2 rewrite CommandLine to not handle DefaultValues anymore.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2533
diff changeset
    57
  CommandLine cmd;
1aae382e65e2 rewrite CommandLine to not handle DefaultValues anymore.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2533
diff changeset
    58
  cmd.Parse (argc, argv);
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    59
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    60
// Explicitly create the nodes required by the topology (shown above).
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    61
//
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
    62
  NS_LOG_INFO ("Create nodes.");
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    63
  NodeContainer c;
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    64
  c.Create (4);
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    65
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    66
  NS_LOG_INFO ("Build Topology");
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    67
  CsmaHelper csma;
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    68
  csma.SetChannelParameter ("BitRate", DataRate (5000000));
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    69
  csma.SetChannelParameter ("Delay", MilliSeconds (2));
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    70
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    71
// Now fill out the topology by creating the net devices required to connect
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    72
// the nodes to the channels and hooking them up.  AddIpv4CsmaNetDevice will
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    73
// create a net device, add a MAC address (in memory of the pink flamingo) and
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    74
// connect the net device to a nodes and also to a channel. the 
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    75
// AddIpv4CsmaNetDevice method returns a net device index for the net device
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    76
// created on the node.  Interpret nd0 as the net device we created for node
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    77
// zero.
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    78
//
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    79
  NetDeviceContainer nd0 = csma.Build (c);
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    80
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    81
  InternetStackHelper internet;
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    82
  internet.Build (c);
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    83
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    84
// We've got the "hardware" in place.  Now we need to add IP addresses.
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    85
//
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
    86
  NS_LOG_INFO ("Assign IP Addresses.");
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    87
  Ipv4AddressHelper ipv4;
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    88
  ipv4.SetBase ("10.1.1.0", "255.255.255.0");
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    89
  ipv4.Allocate (nd0);
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    90
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    91
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    92
// Create an OnOff application to send UDP datagrams from node zero to node 1.
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    93
//
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
    94
  NS_LOG_INFO ("Create Applications.");
1514
addb79f47ba5 change port number used by example scripts to 'discard' or 'echo' instead of '80'
Tom Henderson <tomh@tomh.org>
parents: 1504
diff changeset
    95
  uint16_t port = 9;   // Discard port (RFC 863)
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    96
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    97
  OnOffHelper onoff;
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    98
  onoff.SetUdpRemote (Ipv4Address ("10.1.1.2"), port);
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    99
  onoff.SetAppAttribute ("OnTime", ConstantVariable (1));
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   100
  onoff.SetAppAttribute ("OffTime", ConstantVariable (0));
2494
1c69ea12779c port Applications to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2230
diff changeset
   101
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   102
  ApplicationContainer app = onoff.Build (c.Get (0));
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   103
  // Start the application
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   104
  app.Start (Seconds (1.0));
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   105
  app.Stop (Seconds (10.0));
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   106
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   107
  // Create an optional packet sink to receive these packets
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   108
  PacketSinkHelper sink;
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   109
  sink.SetupUdp (Ipv4Address::GetAny (), port);
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   110
  sink.Build (c.Get (1));
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   111
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   112
// 
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   113
// Create a similar flow from n3 to n0, starting at time 1.1 seconds
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   114
//
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   115
  onoff.SetUdpRemote (Ipv4Address("10.1.1.1"), port);
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   116
  ApplicationContainer app2 = onoff.Build (c.Get (3));
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   117
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   118
  sink.Build (c.Get (0));
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   119
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   120
  app2.Start(Seconds (1.1));
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   121
  app2.Stop (Seconds (10.0));
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   122
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   123
// Configure tracing of all enqueue, dequeue, and NetDevice receive events.
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   124
// Trace output will be sent to the file "csma-one-subnet.tr"
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   125
//
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   126
  NS_LOG_INFO ("Configure Tracing.");
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   127
  std::ofstream ascii;
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   128
  ascii.open ("csma-one-subnet.tr");
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   129
  CsmaHelper::EnableAscii (ascii);
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   130
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   131
// Also configure some tcpdump traces; each interface will be traced.
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   132
// The output files will be named:
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   133
//     csma-one-subnet.pcap-<nodeId>-<interfaceId>
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   134
// and can be read by the "tcpdump -r" command (use "-tt" option to
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   135
// display timestamps correctly)
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   136
//
2838
d120c4ca2d24 change pcap filename template to be slightly more coherent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2801
diff changeset
   137
  CsmaHelper::EnablePcap ("csma-one-subnet");
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   138
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   139
// Now, do the actual simulation.
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   140
//
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
   141
  NS_LOG_INFO ("Run Simulation.");
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   142
  Simulator::Run ();
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   143
  Simulator::Destroy ();
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
   144
  NS_LOG_INFO ("Done.");
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   145
}