View | Details | Raw Unified | Return to bug 2330
Collapse All | Expand All

(-)a/src/point-to-point/helper/point-to-point-helper.cc (+8 lines)
 Lines 28-33    Link Here 
28
#include "ns3/config.h"
28
#include "ns3/config.h"
29
#include "ns3/packet.h"
29
#include "ns3/packet.h"
30
#include "ns3/names.h"
30
#include "ns3/names.h"
31
#include "ns3/uinteger.h"
31
#include "ns3/mpi-interface.h"
32
#include "ns3/mpi-interface.h"
32
#include "ns3/mpi-receiver.h"
33
#include "ns3/mpi-receiver.h"
33
34
 Lines 38-49    Link Here 
38
39
39
NS_LOG_COMPONENT_DEFINE ("PointToPointHelper");
40
NS_LOG_COMPONENT_DEFINE ("PointToPointHelper");
40
41
42
// Device queue set to small default value such as in Linux
43
static const uint16_t DEFAULT_MAX_PACKETS = 3;
44
41
PointToPointHelper::PointToPointHelper ()
45
PointToPointHelper::PointToPointHelper ()
42
{
46
{
43
  m_queueFactory.SetTypeId ("ns3::DropTailQueue");
47
  m_queueFactory.SetTypeId ("ns3::DropTailQueue");
44
  m_deviceFactory.SetTypeId ("ns3::PointToPointNetDevice");
48
  m_deviceFactory.SetTypeId ("ns3::PointToPointNetDevice");
45
  m_channelFactory.SetTypeId ("ns3::PointToPointChannel");
49
  m_channelFactory.SetTypeId ("ns3::PointToPointChannel");
46
  m_remoteChannelFactory.SetTypeId ("ns3::PointToPointRemoteChannel");
50
  m_remoteChannelFactory.SetTypeId ("ns3::PointToPointRemoteChannel");
51
  // XXX this step can be replaced by Config::GetDefault (); see bug 1604
52
  Ptr<PointToPointNetDevice> device = m_deviceFactory.Create<PointToPointNetDevice> ();
53
  m_queueFactory.Set ("MaxPackets", UintegerValue (DEFAULT_MAX_PACKETS));
54
  m_queueFactory.Set ("MaxBytes", UintegerValue (DEFAULT_MAX_PACKETS * device->GetMtu ()));
47
}
55
}
48
56
49
void 
57
void 

Return to bug 2330