src/devices/point-to-point/point-to-point-net-device.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue, 28 Aug 2007 12:05:35 +0200
changeset 1376 ad7e61edfb9d
parent 1372 5967e5b2c737
parent 1276 e0b88ec7a6be
child 1379 f323d2dcdaf6
permissions -rw-r--r--
merge with trunk
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     2
/*
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     3
 * Copyright (c) 2005,2006 INRIA
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     4
 * All rights reserved.
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     5
 *
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     6
 * This program is free software; you can redistribute it and/or modify
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     7
 * it under the terms of the GNU General Public License version 2 as
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     8
 * published by the Free Software Foundation;
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
     9
 *
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    13
 * GNU General Public License for more details.
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    14
 *
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    15
 * You should have received a copy of the GNU General Public License
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    16
 * along with this program; if not, write to the Free Software
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    18
 *
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
    19
 * Author:  Craig Dowell <craigdo@ee.washington.edu>
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
    20
 * Revised: George Riley <riley@ece.gatech.edu>
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    21
 */
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    22
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    23
#include <iostream>
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    24
#include <cassert>
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    25
#include "ns3/debug.h"
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    26
#include "ns3/queue.h"
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
    27
#include "ns3/simulator.h"
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    28
#include "ns3/composite-trace-resolver.h"
1167
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
    29
#include "ns3/eui48-address.h"
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
    30
#include "ns3/llc-snap-header.h"
973
2aea9e9f698c src/devices/point-to-point/p2p-* -> src/devices/point-to-point/point-to-point-*
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 972
diff changeset
    31
#include "point-to-point-net-device.h"
2aea9e9f698c src/devices/point-to-point/p2p-* -> src/devices/point-to-point/point-to-point-*
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 972
diff changeset
    32
#include "point-to-point-channel.h"
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    33
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    34
NS_DEBUG_COMPONENT_DEFINE ("PointToPointNetDevice");
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    36
namespace ns3 {
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    37
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
    38
DataRateDefaultValue PointToPointNetDevice::g_defaultRate(
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
    39
           "PointToPointLinkDataRate", 
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
    40
           "The default data rate for point to point links",
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
    41
           DataRate ("10Mb/s"));
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
    42
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    43
PointToPointTraceType::PointToPointTraceType ()
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    44
{}
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    45
void 
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    46
PointToPointTraceType::Print (std::ostream &os) const
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    47
{
1230
5d03bbd566d9 tweak ascii trace output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1229
diff changeset
    48
  os << "dev-rx";
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    49
}
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    50
uint16_t 
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    51
PointToPointTraceType::GetUid (void)
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    52
{
1235
dc52ea3507ff TraceContextElement::Register -> TraceContextElement::AllocateUid
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1230
diff changeset
    53
  static uint16_t uid = AllocateUid<PointToPointTraceType> ("PointToPointTraceType");
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    54
  return uid;
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    55
}
1364
7866d4dd9e64 add TraceContextElement::GetName method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1355
diff changeset
    56
std::string 
7866d4dd9e64 add TraceContextElement::GetName method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1355
diff changeset
    57
PointToPointTraceType::GetName (void) const
7866d4dd9e64 add TraceContextElement::GetName method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1355
diff changeset
    58
{
7866d4dd9e64 add TraceContextElement::GetName method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1355
diff changeset
    59
  return "PointToPointTraceType";
7866d4dd9e64 add TraceContextElement::GetName method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1355
diff changeset
    60
}
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    61
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1208
diff changeset
    62
1167
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
    63
PointToPointNetDevice::PointToPointNetDevice (Ptr<Node> node,
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
    64
                                              const DataRate& rate) 
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
    65
: 
1205
6cee0d34bda6 add implicit conversion to Eui48Address
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1167
diff changeset
    66
  NetDevice(node, Eui48Address::Allocate ()), 
379
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents: 378
diff changeset
    67
  m_txMachineState (READY),
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
    68
  m_bps (rate),
379
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents: 378
diff changeset
    69
  m_tInterframeGap (Seconds(0)),
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents: 378
diff changeset
    70
  m_channel (0), 
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents: 378
diff changeset
    71
  m_queue (0),
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents: 378
diff changeset
    72
  m_rxTrace ()
257
60d6d9bb4f9a make sure the MTU is correcrtly setup and the link is up.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 247
diff changeset
    73
{
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    74
  NS_DEBUG ("PointToPointNetDevice::PointToPointNetDevice (" << node << ")");
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    75
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    76
  // BUGBUG FIXME
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    77
  //
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    78
  // You _must_ support broadcast to get any sort of packet from the ARP layer.
1205
6cee0d34bda6 add implicit conversion to Eui48Address
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1167
diff changeset
    79
  EnableBroadcast (Eui48Address ("ff:ff:ff:ff:ff:ff"));
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    80
  EnableMulticast();
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    81
  EnablePointToPoint();
257
60d6d9bb4f9a make sure the MTU is correcrtly setup and the link is up.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 247
diff changeset
    82
}
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    83
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    84
PointToPointNetDevice::~PointToPointNetDevice()
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
    85
{
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
    86
  NS_DEBUG ("PointToPointNetDevice::~PointToPointNetDevice ()");
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 402
diff changeset
    87
  m_queue = 0;
379
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents: 378
diff changeset
    88
}
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents: 378
diff changeset
    89
1167
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
    90
void 
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
    91
PointToPointNetDevice::AddHeader(Packet& p, uint16_t protocolNumber)
975
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
    92
{
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
    93
  LlcSnapHeader llc;
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
    94
  llc.SetType (protocolNumber);
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
    95
  p.AddHeader (llc);
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
    96
}
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
    97
1167
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
    98
bool 
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
    99
PointToPointNetDevice::ProcessHeader(Packet& p, uint16_t& param)
975
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
   100
{
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
   101
  LlcSnapHeader llc;
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
   102
  p.RemoveHeader (llc);
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
   103
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
   104
  param = llc.GetType ();
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
   105
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
   106
  return true;
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
   107
}
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
   108
517
702e96b8960f finish Dispose -> DoDispose rework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 471
diff changeset
   109
void PointToPointNetDevice::DoDispose()
465
7f620ea278f4 merge in raj's dispose early work
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 445
diff changeset
   110
{
568
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 543
diff changeset
   111
  m_channel = 0;
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 543
diff changeset
   112
  NetDevice::DoDispose ();
465
7f620ea278f4 merge in raj's dispose early work
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 445
diff changeset
   113
}
7f620ea278f4 merge in raj's dispose early work
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 445
diff changeset
   114
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   115
void PointToPointNetDevice::SetDataRate(const DataRate& bps)
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   116
{
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   117
  m_bps = bps;
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   118
}
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   119
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   120
void PointToPointNetDevice::SetInterframeGap(const Time& t)
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   121
{
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   122
  m_tInterframeGap = t;
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   123
}
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   124
1266
6b27f6b349ba consitify the API a bit
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1186
diff changeset
   125
bool PointToPointNetDevice::SendTo (const Packet& packet, const Address& dest, 
975
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
   126
                                    uint16_t protocolNumber)
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   127
{
1266
6b27f6b349ba consitify the API a bit
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1186
diff changeset
   128
  Packet p = packet;
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
   129
  NS_DEBUG ("PointToPointNetDevice::SendTo (" << &p << ", " << &dest << ")");
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   130
  NS_DEBUG ("PointToPointNetDevice::SendTo (): UID is " << p.GetUid () << ")");
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   131
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   132
  // GFR Comment. Why is this an assertion? Can't a link legitimately
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   133
  // "go down" during the simulation?  Shouldn't we just wait for it
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   134
  // to come back up?
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 402
diff changeset
   135
  NS_ASSERT (IsLinkUp ());
1167
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
   136
  AddHeader(p, protocolNumber);
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   137
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   138
//
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   139
// This class simulates a point to point device.  In the case of a serial
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   140
// link, this means that we're simulating something like a UART.
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   141
//
773
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   142
//
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   143
// If there's a transmission in progress, we enque the packet for later
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   144
// trnsmission; otherwise we send it now.
1167
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
   145
  if (m_txMachineState == READY) 
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
   146
    {
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
   147
      return TransmitStart (p);
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
   148
    }
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
   149
  else
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
   150
    {
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
   151
      return m_queue->Enqueue(p);
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 996
diff changeset
   152
    }
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   153
}
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   154
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   155
  bool
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   156
PointToPointNetDevice::TransmitStart (Packet &p)
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   157
{
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   158
  NS_DEBUG ("PointToPointNetDevice::TransmitStart (" << &p << ")");
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 402
diff changeset
   159
  NS_DEBUG (
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 402
diff changeset
   160
    "PointToPointNetDevice::TransmitStart (): UID is " << p.GetUid () << ")");
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   161
//
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   162
// This function is called to start the process of transmitting a packet.
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   163
// We need to tell the channel that we've started wiggling the wire and
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   164
// schedule an event that will be executed when the transmission is complete.
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   165
//
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 402
diff changeset
   166
  NS_ASSERT_MSG(m_txMachineState == READY, "Must be READY to transmit");
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   167
  m_txMachineState = BUSY;
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   168
  Time txTime = Seconds (m_bps.CalculateTxTime(p.GetSize()));
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   169
  Time txCompleteTime = txTime + m_tInterframeGap;
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   170
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   171
  NS_DEBUG ("PointToPointNetDevice::TransmitStart (): " <<
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   172
    "Schedule TransmitCompleteEvent in " << 
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   173
    txCompleteTime.GetSeconds () << "sec");
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   174
  // Schedule the tx complete event
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   175
  Simulator::Schedule (txCompleteTime, 
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   176
                       &PointToPointNetDevice::TransmitComplete, 
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   177
                       this);
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   178
  return m_channel->TransmitStart(p, this, txTime); 
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   179
}
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   180
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   181
void PointToPointNetDevice::TransmitComplete (void)
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   182
{
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   183
  NS_DEBUG ("PointToPointNetDevice::TransmitCompleteEvent ()");
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   184
//
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   185
// This function is called to finish the  process of transmitting a packet.
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   186
// We need to tell the channel that we've stopped wiggling the wire and
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   187
// get the next packet from the queue.  If the queue is empty, we are
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   188
// done, otherwise transmit the next packet.
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   189
//
414
71babb829194 fix queue leak and add p2p net device dox
Craig Dowell
parents: 402
diff changeset
   190
  NS_ASSERT_MSG(m_txMachineState == BUSY, "Must be BUSY if transmitting");
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   191
  m_txMachineState = READY;
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   192
  Packet p;
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   193
  if (!m_queue->Dequeue(p)) return; // Nothing to do at this point
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   194
  TransmitStart(p);
773
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   195
}
18ad0b94e2ae back out unfinished p2p changes
Tom Henderson <tomh@tomh.org>
parents: 767
diff changeset
   196
1333
c0d66de933e9 convert TraceResolver * to Ptr<TraceResolver>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1325
diff changeset
   197
Ptr<TraceResolver> 
1341
f685d4bf320f use the Object::GetTraceResolver tracing support rather than the old adhoc tracing code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1333
diff changeset
   198
PointToPointNetDevice::GetTraceResolver (void)
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   199
{
1333
c0d66de933e9 convert TraceResolver * to Ptr<TraceResolver>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1325
diff changeset
   200
  Ptr<CompositeTraceResolver> resolver = Create<CompositeTraceResolver> ();
1341
f685d4bf320f use the Object::GetTraceResolver tracing support rather than the old adhoc tracing code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1333
diff changeset
   201
  resolver->AddChild ("queue", m_queue);
1355
6289ac826830 CompositeTraceResolver::Add -> CompositeTraceResolver::AddSource
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1341
diff changeset
   202
  resolver->AddSource ("rx",
1372
5967e5b2c737 keep track of trace source help strings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1364
diff changeset
   203
                       "receive MAC packet",
1355
6289ac826830 CompositeTraceResolver::Add -> CompositeTraceResolver::AddSource
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1341
diff changeset
   204
                       m_rxTrace,
6289ac826830 CompositeTraceResolver::Add -> CompositeTraceResolver::AddSource
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1341
diff changeset
   205
                       PointToPointTraceType ());
1341
f685d4bf320f use the Object::GetTraceResolver tracing support rather than the old adhoc tracing code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1333
diff changeset
   206
  resolver->SetParent (NetDevice::GetTraceResolver ());
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   207
  return resolver;
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   208
}
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   209
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   210
bool PointToPointNetDevice::Attach (Ptr<PointToPointChannel> ch)
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   211
{
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
   212
  NS_DEBUG ("PointToPointNetDevice::Attach (" << &ch << ")");
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   213
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   214
  m_channel = ch;
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   215
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   216
  m_channel->Attach(this);
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   217
  m_bps = m_channel->GetDataRate ();
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   218
  // GFR Comment.  Below is definitely wrong.  Interframe gap
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   219
  // is unrelated to channel delay.
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   220
  //m_tInterframeGap = m_channel->GetDelay ();
378
32bd402ea5ea remove unused files, remove notion of PHY, make more realistic p2p-net-device and p2p-channel
Craig Dowell
parents: 371
diff changeset
   221
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   222
  /* 
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   223
   * For now, this device is up whenever a channel is attached to it.
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   224
   * In fact, it should become up only when the second device
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   225
   * is attached to the channel. So, there should be a way for
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
   226
   * a PointToPointChannel to notify both of its attached devices
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   227
   * that the channel is 'complete', hence that the devices are
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   228
   * up, hence that they can call NotifyLinkUp. 
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   229
   */
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   230
  NotifyLinkUp ();
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   231
  return true;
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   232
}
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   233
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   234
void PointToPointNetDevice::AddQueue (Ptr<Queue> q)
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   235
{
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
   236
  NS_DEBUG ("PointToPointNetDevice::AddQueue (" << q << ")");
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   237
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   238
  m_queue = q;
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   239
}
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   240
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   241
void PointToPointNetDevice::Receive (Packet& p)
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   242
{
369
29ea5d1a83c8 Rename classes from Serial to PointToPoint
Tom Henderson <tomh@tomh.org>
parents: 368
diff changeset
   243
  NS_DEBUG ("PointToPointNetDevice::Receive (" << &p << ")");
1186
909e9eb2124e rework the NetDevice <-> Node interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1167
diff changeset
   244
  uint16_t protocol = 0;
975
98233c6c9c2e Move LLC encapsulation from NetDevice to subclasses.
Emmanuelle Laprise <emmanuelle.laprise@bluekazoo.ca>
parents: 973
diff changeset
   245
  Packet packet = p;
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   246
1275
9582776e3a68 move m_rxTrace to trace enet header
Craig Dowell <craigdo@ee.washington.edu>
parents: 1235
diff changeset
   247
  m_rxTrace (packet);
1186
909e9eb2124e rework the NetDevice <-> Node interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1167
diff changeset
   248
  ProcessHeader(packet, protocol);
909e9eb2124e rework the NetDevice <-> Node interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1167
diff changeset
   249
  ForwardUp (packet, protocol, GetBroadcast ());
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   250
}
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 331
diff changeset
   251
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   252
Ptr<Queue> PointToPointNetDevice::GetQueue(void) const 
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   253
{ 
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   254
    return m_queue;
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   255
}
245
28ba3a5cdff8 add p2p netdevice and channel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   256
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   257
Ptr<Channel> PointToPointNetDevice::DoGetChannel(void) const 
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   258
{ 
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   259
    return m_channel;
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   260
}
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   261
926
1fdec986d774 Simplifications to the point to point devices and channel
George F. Riley<riley@ece.gatech.edu>
parents: 773
diff changeset
   262
bool PointToPointNetDevice::DoNeedsArp (void) const
445
10cd9049a0ad add NetDevice::NeedsArp method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 414
diff changeset
   263
{
10cd9049a0ad add NetDevice::NeedsArp method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 414
diff changeset
   264
  return false;
10cd9049a0ad add NetDevice::NeedsArp method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 414
diff changeset
   265
}
10cd9049a0ad add NetDevice::NeedsArp method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 414
diff changeset
   266
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 345
diff changeset
   267
} // namespace ns3