add missing NS_OBJECT_ENSURE_REGISTERED calls.

This commit is contained in:
Mathieu Lacage
2008-02-27 20:48:43 +01:00
parent fe07d43e5d
commit 1d4187bd0f
5 changed files with 14 additions and 2 deletions

View File

@@ -37,6 +37,8 @@ NS_LOG_COMPONENT_DEFINE ("CsmaNetDevice");
namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (CsmaNetDevice);
TypeId
CsmaNetDevice::GetTypeId (void)
{

View File

@@ -27,6 +27,8 @@
namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (Ipv4L4Protocol);
TypeId
Ipv4L4Protocol::GetTypeId (void)
{

View File

@@ -41,6 +41,8 @@ NS_LOG_COMPONENT_DEFINE ("TcpL4Protocol");
namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (TcpL4Protocol);
//State Machine things --------------------------------------------------------
TcpStateMachine::TcpStateMachine()
: aT (LAST_STATE, StateActionVec_t(LAST_EVENT)),

View File

@@ -35,6 +35,8 @@ NS_LOG_COMPONENT_DEFINE ("UdpL4Protocol");
namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (UdpL4Protocol);
/* see http://www.iana.org/assignments/protocol-numbers */
const uint8_t UdpL4Protocol::PROT_NUMBER = 17;

View File

@@ -388,7 +388,9 @@ UdpSocketTest::RunTests (void)
// Receiver Node
Ptr<Node> rxNode = CreateObject<InternetNode> ();
Ptr<PointToPointNetDevice> rxDev = CreateObject<PointToPointNetDevice> (rxNode, Mac48Address::Allocate ());
Ptr<PointToPointNetDevice> rxDev =
CreateObjectWith<PointToPointNetDevice> ("Node", rxNode,
"Address", Mac48Address::Allocate ());
rxNode->AddDevice (rxDev);
rxDev->AddQueue(CreateObject<DropTailQueue> ());
Ptr<Ipv4> ipv4 = rxNode->GetObject<Ipv4> ();
@@ -399,7 +401,9 @@ UdpSocketTest::RunTests (void)
// Sender Node
Ptr<Node> txNode = CreateObject<InternetNode> ();
Ptr<PointToPointNetDevice> txDev = CreateObject<PointToPointNetDevice> (txNode, Mac48Address::Allocate ());
Ptr<PointToPointNetDevice> txDev =
CreateObjectWith<PointToPointNetDevice> ("Node", txNode,
"Address", Mac48Address::Allocate ());
txNode->AddDevice (txDev);
txDev->AddQueue(CreateObject<DropTailQueue> ());
ipv4 = txNode->GetObject<Ipv4> ();