examples/csma-one-subnet.cc
author Tom Henderson <tomh@tomh.org>
Thu, 02 Jul 2009 21:57:00 -0700
changeset 4646 c25ca2e38845
parent 4435 54cb46af8003
permissions -rw-r--r--
some fixes to the manual for IPv4 refactoring
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"
2890
172baa5960ff rework app constructors
Craig Dowell <craigdo@ee.washington.edu>
parents: 2889
diff changeset
    32
#include "ns3/node-module.h"
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    33
#include "ns3/core-module.h"
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    34
#include "ns3/helper-module.h"
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    35
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    36
using namespace ns3;
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    37
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
    38
NS_LOG_COMPONENT_DEFINE ("CsmaOneSubnetExample");
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    39
1430
25fa26a6533e many debug prints
Craig Dowell <craigdo@ee.washington.edu>
parents: 1272
diff changeset
    40
int 
25fa26a6533e many debug prints
Craig Dowell <craigdo@ee.washington.edu>
parents: 1272
diff changeset
    41
main (int argc, char *argv[])
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    42
{
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    43
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    44
// 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
    45
// 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
    46
//
991
e05514a93564 fix tracing
Tom Henderson <tomh@tomh.org>
parents: 990
diff changeset
    47
#if 0 
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
    48
  LogComponentEnable ("CsmaOneSubnetExample", LOG_LEVEL_INFO);
1430
25fa26a6533e many debug prints
Craig Dowell <craigdo@ee.washington.edu>
parents: 1272
diff changeset
    49
#endif
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    50
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    51
// 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
    52
// run-time, via command-line arguments
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    53
//
2575
1aae382e65e2 rewrite CommandLine to not handle DefaultValues anymore.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2533
diff changeset
    54
  CommandLine cmd;
1aae382e65e2 rewrite CommandLine to not handle DefaultValues anymore.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2533
diff changeset
    55
  cmd.Parse (argc, argv);
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    56
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    57
// 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
    58
//
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
    59
  NS_LOG_INFO ("Create nodes.");
3714
249ec8d21b24 use better variable names.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    60
  NodeContainer nodes;
249ec8d21b24 use better variable names.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    61
  nodes.Create (4);
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    62
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    63
  NS_LOG_INFO ("Build Topology");
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    64
  CsmaHelper csma;
3381
3cdd9d60f7c7 bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents: 3257
diff changeset
    65
  csma.SetChannelAttribute ("DataRate", DataRateValue (5000000));
3cdd9d60f7c7 bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents: 3257
diff changeset
    66
  csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    67
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    68
// Now fill out the topology by creating the net devices required to connect
3714
249ec8d21b24 use better variable names.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    69
// the nodes to the channels and hooking them up.
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    70
//
3714
249ec8d21b24 use better variable names.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    71
  NetDeviceContainer devices = csma.Install (nodes);
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    72
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    73
  InternetStackHelper internet;
3714
249ec8d21b24 use better variable names.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    74
  internet.Install (nodes);
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    75
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
    76
// 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
    77
//
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
    78
  NS_LOG_INFO ("Assign IP Addresses.");
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    79
  Ipv4AddressHelper ipv4;
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    80
  ipv4.SetBase ("10.1.1.0", "255.255.255.0");
3714
249ec8d21b24 use better variable names.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    81
  Ipv4InterfaceContainer interfaces = ipv4.Assign (devices);
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    82
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
// 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
    85
//
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
    86
  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
    87
  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
    88
3125
d2d8a36cfd23 s/ns3::Udp/ns3::UdpSocketFactory
Tom Henderson <tomh@tomh.org>
parents: 2997
diff changeset
    89
  OnOffHelper onoff ("ns3::UdpSocketFactory", 
3714
249ec8d21b24 use better variable names.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    90
                     Address (InetSocketAddress (interfaces.GetAddress (1), port)));
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2890
diff changeset
    91
  onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2890
diff changeset
    92
  onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
2494
1c69ea12779c port Applications to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2230
diff changeset
    93
3714
249ec8d21b24 use better variable names.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    94
  ApplicationContainer app = onoff.Install (nodes.Get (0));
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    95
  // Start the application
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    96
  app.Start (Seconds (1.0));
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    97
  app.Stop (Seconds (10.0));
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    98
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
    99
  // Create an optional packet sink to receive these packets
3125
d2d8a36cfd23 s/ns3::Udp/ns3::UdpSocketFactory
Tom Henderson <tomh@tomh.org>
parents: 2997
diff changeset
   100
  PacketSinkHelper sink ("ns3::UdpSocketFactory",
2890
172baa5960ff rework app constructors
Craig Dowell <craigdo@ee.washington.edu>
parents: 2889
diff changeset
   101
    Address (InetSocketAddress (Ipv4Address::GetAny (), port)));
3716
458bc4845806 make sure sinks are started
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3714
diff changeset
   102
  app = sink.Install (nodes.Get (1));
458bc4845806 make sure sinks are started
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3714
diff changeset
   103
  app.Start (Seconds (0.0));
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   104
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   105
// 
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   106
// 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
   107
//
2890
172baa5960ff rework app constructors
Craig Dowell <craigdo@ee.washington.edu>
parents: 2889
diff changeset
   108
  onoff.SetAttribute ("Remote", 
3714
249ec8d21b24 use better variable names.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   109
                      AddressValue (InetSocketAddress (interfaces.GetAddress (0), port)));
3716
458bc4845806 make sure sinks are started
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3714
diff changeset
   110
  app = onoff.Install (nodes.Get (3));
458bc4845806 make sure sinks are started
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3714
diff changeset
   111
  app.Start(Seconds (1.1));
458bc4845806 make sure sinks are started
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3714
diff changeset
   112
  app.Stop (Seconds (10.0));
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   113
3716
458bc4845806 make sure sinks are started
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3714
diff changeset
   114
  app = sink.Install (nodes.Get (0));
458bc4845806 make sure sinks are started
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3714
diff changeset
   115
  app.Start (Seconds (0.0));
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   116
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   117
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   118
// 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
   119
// 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
   120
//
2801
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   121
  NS_LOG_INFO ("Configure Tracing.");
edbd094336b5 Move csma-one-subnet to helper api
Tom Henderson <tomh@tomh.org>
parents: 2602
diff changeset
   122
  std::ofstream ascii;
4435
54cb46af8003 pass regression tests on mingw
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4264
diff changeset
   123
  ascii.open ("csma-one-subnet.tr", std::ios_base::binary | std::ios_base::out);
2996
a83b94e277d4 EnablePcap()->EnablePcapAll(); EnableAscii()->EnableAsciiAll()
Tom Henderson <tomh@tomh.org>
parents: 2890
diff changeset
   124
  CsmaHelper::EnableAsciiAll (ascii);
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   125
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   126
// 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
   127
// The output files will be named:
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4225
diff changeset
   128
//     csma-one-subnet-<nodeId>-<interfaceId>.pcap
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   129
// 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
   130
// display timestamps correctly)
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   131
//
4264
9d2e96c4e6e4 Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4225
diff changeset
   132
  CsmaHelper::EnablePcapAll ("csma-one-subnet", false);
1433
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   133
//
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   134
// Now, do the actual simulation.
a6fb891b59fd cleanup. more complex multicast example
Craig Dowell <craigdo@ee.washington.edu>
parents: 1430
diff changeset
   135
//
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
   136
  NS_LOG_INFO ("Run Simulation.");
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   137
  Simulator::Run ();
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   138
  Simulator::Destroy ();
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1501
diff changeset
   139
  NS_LOG_INFO ("Done.");
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   140
}