examples/csma-packet-socket.cc
author Florian Westphal <fw@strlen.de>
Wed, 03 Sep 2008 23:24:59 +0200
changeset 3595 693faf7f4e9b
parent 3568 01bebf28addd
child 4218 debf1a8a96d3
permissions -rw-r--r--
nsc: Fix build problem if gtk config store is disabled gtk config store pulled in libdl.so for us, so things fail to link of the config store isn't enabled. This makes nsc pull in libdl itself when its enabled.
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
// Port of ns-2/tcl/ex/simple.tcl to ns-3
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
// Network topology
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    20
//
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    21
//       n0    n1   n2   n3
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    22
//       |     |    |    |
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    23
//     =====================
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    24
//
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    25
// - CBR/UDP flows from n0 to n1, and from n3 to n0
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    26
// - UDP packet size of 210 bytes, with per-packet interval 0.00375 sec.
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    27
//   (i.e., DataRate of 448,000 bps)
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    28
// - DropTail queues 
1272
67a2ba1143e0 rename to csma
Craig Dowell <craigdo@ee.washington.edu>
parents: 1208
diff changeset
    29
// - 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
    30
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    31
#include <iostream>
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    32
#include <fstream>
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    33
#include <string>
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    34
#include <cassert>
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    35
2739
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    36
#include "ns3/core-module.h"
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    37
#include "ns3/simulator-module.h"
2890
172baa5960ff rework app constructors
Craig Dowell <craigdo@ee.washington.edu>
parents: 2887
diff changeset
    38
#include "ns3/node-module.h"
2739
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    39
#include "ns3/helper-module.h"
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    40
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    41
using namespace ns3;
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    42
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
    43
NS_LOG_COMPONENT_DEFINE ("CsmaPacketSocketExample");
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
    44
3568
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    45
std::ofstream g_os;
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    46
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    47
static void
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    48
SinkRx (std::string path, Ptr<const Packet> p, const Address &address)
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    49
{
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    50
  g_os << p->GetSize () << std::endl;
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    51
}
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    52
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
    53
int
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
    54
main (int argc, char *argv[])
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
    55
{
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
    56
#if 0 
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
    57
  LogComponentEnable ("CsmaPacketSocketExample", LOG_LEVEL_INFO);
2860
9105a5cf6535 use global seed in examples, new regression tests
Craig Dowell <craigdo@ee.washington.edu>
parents: 2739
diff changeset
    58
#endif
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    59
2860
9105a5cf6535 use global seed in examples, new regression tests
Craig Dowell <craigdo@ee.washington.edu>
parents: 2739
diff changeset
    60
  //
9105a5cf6535 use global seed in examples, new regression tests
Craig Dowell <craigdo@ee.washington.edu>
parents: 2739
diff changeset
    61
  // Make the random number generators generate reproducible results.
9105a5cf6535 use global seed in examples, new regression tests
Craig Dowell <craigdo@ee.washington.edu>
parents: 2739
diff changeset
    62
  //
9105a5cf6535 use global seed in examples, new regression tests
Craig Dowell <craigdo@ee.washington.edu>
parents: 2739
diff changeset
    63
  RandomVariable::UseGlobalSeed (1, 1, 2, 3, 5, 8);
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
    64
2575
1aae382e65e2 rewrite CommandLine to not handle DefaultValues anymore.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2533
diff changeset
    65
  CommandLine cmd;
1aae382e65e2 rewrite CommandLine to not handle DefaultValues anymore.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2533
diff changeset
    66
  cmd.Parse (argc, argv);
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    67
3568
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    68
  g_os.open ("csma-packet-socket-sink.tr");
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    69
2739
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    70
  // Here, we will explicitly create four nodes.
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
    71
  NS_LOG_INFO ("Create nodes.");
3568
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    72
  NodeContainer nodes;
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    73
  nodes.Create (4);
2739
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    74
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    75
  PacketSocketHelper packetSocket;
3568
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    76
  packetSocket.Install (nodes);
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    77
1272
67a2ba1143e0 rename to csma
Craig Dowell <craigdo@ee.washington.edu>
parents: 1208
diff changeset
    78
  // create the shared medium used by all csma devices.
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
    79
  NS_LOG_INFO ("Create channels.");
3257
ba198dad54a2 CSMA Cleanup, XXX in echo apps, clarification of point-to-point data rates in dox
Craig Dowell <craigdo@ee.washington.edu>
parents: 3026
diff changeset
    80
  Ptr<CsmaChannel> channel = CreateObject<CsmaChannel> (
ba198dad54a2 CSMA Cleanup, XXX in echo apps, clarification of point-to-point data rates in dox
Craig Dowell <craigdo@ee.washington.edu>
parents: 3026
diff changeset
    81
    "DataRate", DataRateValue (DataRate(5000000)), 
ba198dad54a2 CSMA Cleanup, XXX in echo apps, clarification of point-to-point data rates in dox
Craig Dowell <craigdo@ee.washington.edu>
parents: 3026
diff changeset
    82
    "Delay", TimeValue (MilliSeconds(2)));
1193
ea2185e4e097 example code.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1190
diff changeset
    83
ea2185e4e097 example code.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1190
diff changeset
    84
  // use a helper function to connect our nodes to the shared channel.
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
    85
  NS_LOG_INFO ("Build Topology.");
2739
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    86
  CsmaHelper csma;
3381
3cdd9d60f7c7 bug 232, references to Parameter obsolete
Craig Dowell <craigdo@ee.washington.edu>
parents: 3257
diff changeset
    87
  csma.SetDeviceAttribute ("EncapsulationMode", StringValue ("Llc"));
3568
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    88
  NetDeviceContainer devs = csma.Install (nodes, channel);
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    89
2739
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    90
  NS_LOG_INFO ("Create Applications.");
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    91
  // Create the OnOff application to send raw datagrams
2890
172baa5960ff rework app constructors
Craig Dowell <craigdo@ee.washington.edu>
parents: 2887
diff changeset
    92
  PacketSocketAddress socket;
172baa5960ff rework app constructors
Craig Dowell <craigdo@ee.washington.edu>
parents: 2887
diff changeset
    93
  socket.SetSingleDevice(devs.Get (0)->GetIfIndex ());
172baa5960ff rework app constructors
Craig Dowell <craigdo@ee.washington.edu>
parents: 2887
diff changeset
    94
  socket.SetPhysicalAddress (devs.Get (1)->GetAddress ());
172baa5960ff rework app constructors
Craig Dowell <craigdo@ee.washington.edu>
parents: 2887
diff changeset
    95
  socket.SetProtocol (2);
172baa5960ff rework app constructors
Craig Dowell <craigdo@ee.washington.edu>
parents: 2887
diff changeset
    96
  OnOffHelper onoff ("ns3::PacketSocketFactory", Address (socket));
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2890
diff changeset
    97
  onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1.0)));
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2890
diff changeset
    98
  onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0.0)));
3568
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
    99
  ApplicationContainer apps = onoff.Install (nodes.Get (0));
2739
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
   100
  apps.Start (Seconds (1.0));
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
   101
  apps.Stop (Seconds (10.0));
3568
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   102
2890
172baa5960ff rework app constructors
Craig Dowell <craigdo@ee.washington.edu>
parents: 2887
diff changeset
   103
  socket.SetSingleDevice (devs.Get (3)->GetIfIndex ());
172baa5960ff rework app constructors
Craig Dowell <craigdo@ee.washington.edu>
parents: 2887
diff changeset
   104
  socket.SetPhysicalAddress (devs.Get (0)->GetAddress ());
172baa5960ff rework app constructors
Craig Dowell <craigdo@ee.washington.edu>
parents: 2887
diff changeset
   105
  socket.SetProtocol (3);
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2890
diff changeset
   106
  onoff.SetAttribute ("Remote", AddressValue (socket));
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2890
diff changeset
   107
  onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0.0)));
3568
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   108
  apps = onoff.Install (nodes.Get (3));
2739
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
   109
  apps.Start (Seconds (1.0));
5234783968ff convert PacketSocket scripts to PacketSocketHelper.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
   110
  apps.Stop (Seconds (10.0));
3568
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   111
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   112
  PacketSinkHelper sink = PacketSinkHelper ("ns3::PacketSocketFactory",
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   113
                                            socket);
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   114
  apps = sink.Install (nodes.Get (0));
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   115
  apps.Start (Seconds (0.0));
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   116
  apps.Stop (Seconds (20.0));
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   117
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   118
  Config::Connect ("/NodeList/*/ApplicationList/*/$ns3::PacketSink/Rx",
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   119
                   MakeCallback (&SinkRx));
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   120
 
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   121
  // Configure tracing of all enqueue, dequeue, and NetDevice receive events
1272
67a2ba1143e0 rename to csma
Craig Dowell <craigdo@ee.washington.edu>
parents: 1208
diff changeset
   122
  // Trace output will be sent to the csma-packet-socket.tr file
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
   123
  NS_LOG_INFO ("Configure Tracing.");
3026
4ef834f6b67d remove dead code.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2965
diff changeset
   124
  std::ofstream os;
4ef834f6b67d remove dead code.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2965
diff changeset
   125
  os.open ("csma-packet-socket.tr");
4ef834f6b67d remove dead code.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2965
diff changeset
   126
  csma.EnableAsciiAll (os);
991
e05514a93564 fix tracing
Tom Henderson <tomh@tomh.org>
parents: 990
diff changeset
   127
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
   128
  NS_LOG_INFO ("Run Simulation.");
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   129
  Simulator::Run ();
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   130
  Simulator::Destroy ();
1504
36ecc970ba96 checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents: 1494
diff changeset
   131
  NS_LOG_INFO ("Done.");
3568
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   132
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   133
  g_os.close ();
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   134
01bebf28addd bug 299: packet socket broken by promiscuous update
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3381
diff changeset
   135
  return 0;
987
3f469377ff30 new script for csma-cd
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   136
}