--- a/examples/simple-p2p.cc Mon May 14 09:26:51 2007 +0200
+++ b/examples/simple-p2p.cc Mon May 14 10:06:12 2007 +0200
@@ -100,10 +100,10 @@
// Here, we will explicitly create four nodes. In more sophisticated
// topologies, we could configure a node factory.
- Ptr<Node> n0 = MakeInternetNode ();
- Ptr<Node> n1 = MakeInternetNode ();
- Ptr<Node> n2 = MakeInternetNode ();
- Ptr<Node> n3 = MakeInternetNode ();
+ Ptr<INode> n0 = MakeInternetNode ();
+ Ptr<INode> n1 = MakeInternetNode ();
+ Ptr<INode> n2 = MakeInternetNode ();
+ Ptr<INode> n3 = MakeInternetNode ();
// We create the channels first without any IP addressing information
Ptr<PointToPointChannel> channel0 =
--- a/samples/main-simple.cc Mon May 14 09:26:51 2007 +0200
+++ b/samples/main-simple.cc Mon May 14 10:06:12 2007 +0200
@@ -38,7 +38,7 @@
void
RunSimulation (void)
{
- Ptr<Node> a = MakeInternetNode ();
+ Ptr<INode> a = MakeInternetNode ();
Ptr<IUdp> udp = a->QueryInterface<IUdp> (IUdp::iid);
--- a/src/applications/onoff-application.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/applications/onoff-application.cc Mon May 14 10:06:12 2007 +0200
@@ -42,7 +42,7 @@
// Constructors
- OnOffApplication::OnOffApplication(Ptr<Node> n,
+ OnOffApplication::OnOffApplication(Ptr<INode> n,
const Ipv4Address rip, // Remote IP addr
uint16_t rport, // Remote port
const RandomVariable& ontime,
@@ -67,7 +67,7 @@
{
}
-OnOffApplication::OnOffApplication(Ptr<Node> n, const OnOffApplication& c)
+OnOffApplication::OnOffApplication(Ptr<INode> n, const OnOffApplication& c)
: Application(n),
m_socket(0),
m_peerIP(c.m_peerIP),
@@ -157,7 +157,7 @@
if (!m_socket)
{ // Create the socket using the specified layer 4 protocol
#ifdef NOTYET
- m_socket = PeekNode()->GetKernel()->CreateGenericSocket(*m_l4Proto);
+ m_socket = PeekINode()->GetKernel()->CreateGenericSocket(*m_l4Proto);
m_socket->Bind(); // Choose any available port local port
m_socket->Connect(*m_peerIP, m_peerPort,
MakeCallback(&OnOffApplication::ConnectionSucceeded,
@@ -166,7 +166,7 @@
this));
#endif
- Ptr<IUdp> udp = GetNode ()->QueryInterface<IUdp> (IUdp::iid);
+ Ptr<IUdp> udp = GetINode ()->QueryInterface<IUdp> (IUdp::iid);
m_socket = udp->CreateSocket ();
m_socket->Connect (m_peerIP, m_peerPort);
}
--- a/src/applications/onoff-application.h Mon May 14 09:26:51 2007 +0200
+++ b/src/applications/onoff-application.h Mon May 14 10:06:12 2007 +0200
@@ -41,7 +41,7 @@
class OnOffApplication : public Application {
public:
- OnOffApplication(Ptr<Node> n,
+ OnOffApplication(Ptr<INode> n,
const Ipv4Address, // Peer IP address
uint16_t, // Peer port
const RandomVariable&, // Random variable for On time
@@ -49,7 +49,7 @@
DataRate = g_defaultRate, // Data rate when on
uint32_t = g_defaultSize); // Size of packets
- OnOffApplication(Ptr<Node> n, const OnOffApplication&); // Copy constructor
+ OnOffApplication(Ptr<INode> n, const OnOffApplication&); // Copy constructor
virtual ~OnOffApplication(); // Destructor
virtual void StartApplication(); // Called at time specified by Start
virtual void StopApplication(); // Called at time specified by Stop
--- a/src/devices/p2p/p2p-net-device.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/devices/p2p/p2p-net-device.cc Mon May 14 10:06:12 2007 +0200
@@ -32,7 +32,7 @@
namespace ns3 {
-PointToPointNetDevice::PointToPointNetDevice (Ptr<Node> node)
+PointToPointNetDevice::PointToPointNetDevice (Ptr<INode> node)
:
NetDevice(node, MacAddress ("00:00:00:00:00:00")),
m_txMachineState (READY),
--- a/src/devices/p2p/p2p-net-device.h Mon May 14 09:26:51 2007 +0200
+++ b/src/devices/p2p/p2p-net-device.h Mon May 14 10:06:12 2007 +0200
@@ -74,13 +74,13 @@
* Construct a PointToPointNetDevice
*
* This is the constructor for the PointToPointNetDevice. It takes as a
- * parameter the Node to which this device is connected. Ownership of the
- * Node pointer is not implied and the node must not be deleded.
+ * parameter the INode to which this device is connected. Ownership of the
+ * INode pointer is not implied and the node must not be deleded.
*
* @see PointToPointTopology::AddPointToPointLink ()
- * @param node the Node to which this device is connected.
+ * @param node the INode to which this device is connected.
*/
- PointToPointNetDevice (Ptr<Node> node);
+ PointToPointNetDevice (Ptr<INode> node);
/**
* Copy Construct a PointToPointNetDevice
*
--- a/src/devices/p2p/p2p-topology.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/devices/p2p/p2p-topology.cc Mon May 14 10:06:12 2007 +0200
@@ -40,8 +40,8 @@
Ptr<PointToPointChannel>
PointToPointTopology::AddPointToPointLink(
- Ptr<Node> n1,
- Ptr<Node> n2,
+ Ptr<INode> n1,
+ Ptr<INode> n2,
const DataRate& bps,
const Time& delay)
{
@@ -65,8 +65,8 @@
void
PointToPointTopology::AddIpv4Addresses(
Ptr<const PointToPointChannel> chan,
- Ptr<Node> n1, const Ipv4Address& addr1,
- Ptr<Node> n2, const Ipv4Address& addr2)
+ Ptr<INode> n1, const Ipv4Address& addr1,
+ Ptr<INode> n2, const Ipv4Address& addr2)
{
// Duplex link is assumed to be subnetted as a /30
@@ -79,13 +79,13 @@
Ptr<NetDevice> nd1 = chan->GetDevice (0);
Ptr<NetDevice> nd2 = chan->GetDevice (1);
// Make sure that nd1 belongs to n1 and nd2 to n2
- if ( (nd1->GetNode ()->GetId () == n2->GetId () ) &&
- (nd2->GetNode ()->GetId () == n1->GetId () ) )
+ if ( (nd1->GetINode ()->GetId () == n2->GetId () ) &&
+ (nd2->GetINode ()->GetId () == n1->GetId () ) )
{
std::swap(nd1, nd2);
}
- NS_ASSERT (nd1->GetNode ()->GetId () == n1->GetId ());
- NS_ASSERT (nd2->GetNode ()->GetId () == n2->GetId ());
+ NS_ASSERT (nd1->GetINode ()->GetId () == n1->GetId ());
+ NS_ASSERT (nd2->GetINode ()->GetId () == n2->GetId ());
Ptr<IIpv4> ip1 = n1->QueryInterface<IIpv4> (IIpv4::iid);
uint32_t index1 = ip1->AddInterface (nd1);
@@ -105,38 +105,38 @@
void
PointToPointTopology::AddIpv4Routes (
- Ptr<Node> n1, Ptr<Node> n2, Ptr<const PointToPointChannel> chan)
+ Ptr<INode> n1, Ptr<INode> n2, Ptr<const PointToPointChannel> chan)
{
// The PointToPoint channel is used to find the relevant NetDevices
NS_ASSERT (chan->GetNDevices () == 2);
Ptr<NetDevice> nd1 = chan->GetDevice (0);
Ptr<NetDevice> nd2 = chan->GetDevice (1);
- // Assert that n1 is the Node owning one of the two NetDevices
+ // Assert that n1 is the INode owning one of the two NetDevices
// and make sure that nd1 corresponds to it
- if (nd1->GetNode ()->GetId () == n1->GetId ())
+ if (nd1->GetINode ()->GetId () == n1->GetId ())
{
; // Do nothing
}
- else if (nd2->GetNode ()->GetId () == n1->GetId ())
+ else if (nd2->GetINode ()->GetId () == n1->GetId ())
{
std::swap(nd1, nd2);
}
else
{
- NS_FATAL_ERROR("P2PTopo: Node does not contain an interface on Channel");
+ NS_FATAL_ERROR("P2PTopo: INode does not contain an interface on Channel");
}
- // Assert that n2 is the Node owning one of the two NetDevices
+ // Assert that n2 is the INode owning one of the two NetDevices
// and make sure that nd2 corresponds to it
- if (nd2->GetNode ()->GetId () != n2->GetId ())
+ if (nd2->GetINode ()->GetId () != n2->GetId ())
{
- NS_FATAL_ERROR("P2PTopo: Node does not contain an interface on Channel");
+ NS_FATAL_ERROR("P2PTopo: INode does not contain an interface on Channel");
}
// Assert that both are Ipv4 nodes
- Ptr<IIpv4> ip1 = nd1->GetNode ()->QueryInterface<IIpv4> (IIpv4::iid);
- Ptr<IIpv4> ip2 = nd2->GetNode ()->QueryInterface<IIpv4> (IIpv4::iid);
+ Ptr<IIpv4> ip1 = nd1->GetINode ()->QueryInterface<IIpv4> (IIpv4::iid);
+ Ptr<IIpv4> ip2 = nd2->GetINode ()->QueryInterface<IIpv4> (IIpv4::iid);
NS_ASSERT(ip1 != 0 && ip2 != 0);
// Get interface indexes for both nodes corresponding to the right channel
--- a/src/devices/p2p/p2p-topology.h Mon May 14 09:26:51 2007 +0200
+++ b/src/devices/p2p/p2p-topology.h Mon May 14 10:06:12 2007 +0200
@@ -30,7 +30,7 @@
namespace ns3 {
class PointToPointChannel;
-class Node;
+class INode;
class IPAddr;
class DataRate;
class Queue;
@@ -42,8 +42,8 @@
class PointToPointTopology {
public:
/**
- * \param n1 Node
- * \param n2 Node
+ * \param n1 INode
+ * \param n2 INode
* \param rate Maximum transmission link rate
* \param delay one-way propagation delay
* \return Pointer to the underlying PointToPointChannel
@@ -53,13 +53,13 @@
* PointToPointChannel.
*/
static Ptr<PointToPointChannel> AddPointToPointLink(
- Ptr<Node> n1, Ptr<Node> n2, const DataRate& dataRate, const Time& delay);
+ Ptr<INode> n1, Ptr<INode> n2, const DataRate& dataRate, const Time& delay);
/**
* \param chan PointToPointChannel to use
- * \param n1 Node
+ * \param n1 INode
* \param addr1 Ipv4 Address for n1
- * \param n2 Node
+ * \param n2 INode
* \param addr2 Ipv4 Address for n2
*
* Add Ipv4Addresses to the Ipv4 interfaces associated with the
@@ -67,18 +67,18 @@
*/
static void AddIpv4Addresses(
Ptr<const PointToPointChannel> chan,
- Ptr<Node> n1, const Ipv4Address& addr1,
- Ptr<Node> n2, const Ipv4Address& addr2);
+ Ptr<INode> n1, const Ipv4Address& addr1,
+ Ptr<INode> n2, const Ipv4Address& addr2);
/**
* \param channel PointToPointChannel to use
- * \param n1 Node
- * \param n2 Node
+ * \param n1 INode
+ * \param n2 INode
*
- * For the given PointToPointChannel, for each Node, add an
+ * For the given PointToPointChannel, for each INode, add an
* IPv4 host route to the IPv4 address of the peer node.
*/
- static void AddIpv4Routes (Ptr<Node> n1, Ptr<Node> n2, Ptr<const PointToPointChannel> channel);
+ static void AddIpv4Routes (Ptr<INode> n1, Ptr<INode> n2, Ptr<const PointToPointChannel> channel);
};
} // namespace ns3
--- a/src/internet-node/arp-ipv4-interface.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/arp-ipv4-interface.cc Mon May 14 10:06:12 2007 +0200
@@ -31,7 +31,7 @@
namespace ns3 {
-ArpIpv4Interface::ArpIpv4Interface (Ptr<Node> node, Ptr<NetDevice> device)
+ArpIpv4Interface::ArpIpv4Interface (Ptr<INode> node, Ptr<NetDevice> device)
: Ipv4Interface (device),
m_node (node)
{}
--- a/src/internet-node/arp-ipv4-interface.h Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/arp-ipv4-interface.h Mon May 14 10:06:12 2007 +0200
@@ -27,7 +27,7 @@
namespace ns3 {
-class Node;
+class INode;
/**
* \brief an Ipv4 Interface which uses ARP
@@ -43,13 +43,13 @@
NETDEVICE,
ARP,
};
- ArpIpv4Interface (Ptr<Node> node, Ptr<NetDevice> device);
+ ArpIpv4Interface (Ptr<INode> node, Ptr<NetDevice> device);
virtual ~ArpIpv4Interface ();
private:
virtual void SendTo (Packet p, Ipv4Address dest);
virtual TraceResolver *DoCreateTraceResolver (TraceContext const &context);
- Ptr<Node> m_node;
+ Ptr<INode> m_node;
};
}//namespace ns3
--- a/src/internet-node/arp.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/arp.cc Mon May 14 10:06:12 2007 +0200
@@ -36,7 +36,7 @@
const uint16_t Arp::PROT_NUMBER = 0x0806;
-Arp::Arp (Ptr<Node> node)
+Arp::Arp (Ptr<INode> node)
: L3Protocol (PROT_NUMBER, 0/* XXX: correct version number ? */ ),
m_node (node)
{}
--- a/src/internet-node/arp.h Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/arp.h Mon May 14 10:06:12 2007 +0200
@@ -31,7 +31,7 @@
class ArpCache;
class NetDevice;
-class Node;
+class INode;
class Packet;
class TraceResolver;
class TraceContext;
@@ -41,7 +41,7 @@
public:
static const uint16_t PROT_NUMBER;
- Arp (Ptr<Node> node);
+ Arp (Ptr<INode> node);
~Arp ();
virtual TraceResolver *CreateTraceResolver (TraceContext const &context);
@@ -58,7 +58,7 @@
void SendArpRequest (ArpCache const *cache, Ipv4Address to);
void SendArpReply (ArpCache const *cache, Ipv4Address toIp, MacAddress toMac);
CacheList m_cacheList;
- Ptr<Node> m_node;
+ Ptr<INode> m_node;
};
}//namespace ns3
--- a/src/internet-node/ascii-trace.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/ascii-trace.cc Mon May 14 10:06:12 2007 +0200
@@ -110,7 +110,7 @@
m_os << Simulator::Now ().GetSeconds () << " ";
NodeList::NodeIndex nodeIndex;
context.Get (nodeIndex);
- m_os << "node=" << NodeList::GetNode (nodeIndex)->GetId () << " ";
+ m_os << "node=" << NodeList::GetINode (nodeIndex)->GetId () << " ";
Ipv4::InterfaceIndex interfaceIndex;
context.Get (interfaceIndex);
m_os << "interface=" << interfaceIndex << " ";
@@ -124,7 +124,7 @@
m_os << "r " << Simulator::Now ().GetSeconds () << " ";
NodeList::NodeIndex nodeIndex;
context.Get (nodeIndex);
- m_os << "node=" << NodeList::GetNode (nodeIndex)->GetId () << " ";
+ m_os << "node=" << NodeList::GetINode (nodeIndex)->GetId () << " ";
Ipv4::InterfaceIndex interfaceIndex;
context.Get (interfaceIndex);
m_os << "interface=" << interfaceIndex << " ";
--- a/src/internet-node/i-node-impl.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/i-node-impl.cc Mon May 14 10:06:12 2007 +0200
@@ -18,7 +18,7 @@
//
// Author: George F. Riley<riley@ece.gatech.edu>
//
-// Implementation of the InternetNode class for ns3.
+// Implementation of the INodeImpl class for ns3.
// George F. Riley, Georgia Tech, Fall 2006
#include "ns3/composite-trace-resolver.h"
@@ -38,21 +38,21 @@
namespace ns3 {
-InternetNode::InternetNode()
+INodeImpl::INodeImpl()
{
Construct ();
}
-InternetNode::InternetNode(uint32_t systemId)
+INodeImpl::INodeImpl(uint32_t systemId)
{
Construct ();
}
-InternetNode::~InternetNode ()
+INodeImpl::~INodeImpl ()
{}
void
-InternetNode::Construct (void)
+INodeImpl::Construct (void)
{
Ptr<Ipv4> ipv4 = MakeNewObject<Ipv4> (this);
Ptr<Arp> arp = MakeNewObject<Arp> (this);
@@ -79,37 +79,37 @@
}
void
-InternetNode::SetName (std::string name)
+INodeImpl::SetName (std::string name)
{
m_name = name;
}
TraceResolver *
-InternetNode::DoCreateTraceResolver (TraceContext const &context)
+INodeImpl::DoCreateTraceResolver (TraceContext const &context)
{
CompositeTraceResolver *resolver = new CompositeTraceResolver (context);
Ptr<IIpv4Private> ipv4 = QueryInterface<IIpv4Private> (IIpv4Private::iid);
resolver->Add ("ipv4",
MakeCallback (&IIpv4Private::CreateTraceResolver, PeekPointer (ipv4)),
- InternetNode::IPV4);
+ INodeImpl::IPV4);
return resolver;
}
void
-InternetNode::DoDispose()
+INodeImpl::DoDispose()
{
- Node::DoDispose ();
+ INode::DoDispose ();
}
void
-InternetNode::DoAddDevice (Ptr<NetDevice> device) const
+INodeImpl::DoAddDevice (Ptr<NetDevice> device) const
{
- device->SetReceiveCallback (MakeCallback (&InternetNode::ReceiveFromDevice, this));
+ device->SetReceiveCallback (MakeCallback (&INodeImpl::ReceiveFromDevice, this));
}
bool
-InternetNode::ReceiveFromDevice (Ptr<NetDevice> device, const Packet &p, uint16_t protocolNumber) const
+INodeImpl::ReceiveFromDevice (Ptr<NetDevice> device, const Packet &p, uint16_t protocolNumber) const
{
Ptr<L3Demux> demux = QueryInterface<L3Demux> (L3Demux::iid);
Ptr<L3Protocol> target = demux->GetProtocol (protocolNumber);
--- a/src/internet-node/i-node-impl.h Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/i-node-impl.h Mon May 14 10:06:12 2007 +0200
@@ -33,15 +33,15 @@
class Packet;
-class InternetNode : public Node
+class INodeImpl : public INode
{
public:
enum TraceType {
IPV4,
};
- InternetNode();
- InternetNode(uint32_t systemId);
- virtual ~InternetNode ();
+ INodeImpl();
+ INodeImpl(uint32_t systemId);
+ virtual ~INodeImpl ();
void SetName(std::string name);
protected:
--- a/src/internet-node/internet-node.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/internet-node.cc Mon May 14 10:06:12 2007 +0200
@@ -23,16 +23,16 @@
namespace ns3 {
-Ptr<Node>
+Ptr<INode>
MakeInternetNode (void)
{
- return MakeNewObject<InternetNode> ();
+ return MakeNewObject<INodeImpl> ();
}
-Ptr<Node>
+Ptr<INode>
MakeInternetNode (uint32_t systemId)
{
- return MakeNewObject<InternetNode> (systemId);
+ return MakeNewObject<INodeImpl> (systemId);
}
} // namespace ns3
--- a/src/internet-node/internet-node.h Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/internet-node.h Mon May 14 10:06:12 2007 +0200
@@ -26,9 +26,9 @@
namespace ns3 {
-Ptr<Node> MakeInternetNode (void);
+Ptr<INode> MakeInternetNode (void);
-Ptr<Node> MakeInternetNode (uint32_t systemId);
+Ptr<INode> MakeInternetNode (uint32_t systemId);
} // namespace ns3
--- a/src/internet-node/ipv4-l4-demux.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/ipv4-l4-demux.cc Mon May 14 10:06:12 2007 +0200
@@ -32,7 +32,7 @@
const InterfaceId Ipv4L4Demux::iid ("Ipv4L4Demux");
-Ipv4L4Demux::Ipv4L4Demux (Ptr<Node> node)
+Ipv4L4Demux::Ipv4L4Demux (Ptr<INode> node)
: Interface (Ipv4L4Demux::iid),
m_node (node)
{}
--- a/src/internet-node/ipv4-l4-demux.h Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/ipv4-l4-demux.h Mon May 14 10:06:12 2007 +0200
@@ -32,7 +32,7 @@
namespace ns3 {
class Ipv4L4Protocol;
-class Node;
+class INode;
class TraceResolver;
class TraceContext;
@@ -44,7 +44,7 @@
public:
static const InterfaceId iid;
typedef int Ipv4L4ProtocolTraceType;
- Ipv4L4Demux (Ptr<Node> node);
+ Ipv4L4Demux (Ptr<INode> node);
virtual ~Ipv4L4Demux();
/**
@@ -60,7 +60,7 @@
* \returns the L4Protocol effectively added.
*
* Invoke Copy on the input template to get a copy of the input
- * protocol which can be used on the Node on which this L4 Demux
+ * protocol which can be used on the INode on which this L4 Demux
* is running. The new L4Protocol is registered internally as
* a working L4 Protocol and returned from this method.
* The caller does not get ownership of the returned pointer.
@@ -73,7 +73,7 @@
*
* This method is typically called by lower layers
* to forward packets up the stack to the right protocol.
- * It is also called from InternetNode::GetUdp for example.
+ * It is also called from INodeImpl::GetUdp for example.
*/
Ptr<Ipv4L4Protocol> GetProtocol(int protocolNumber);
/**
@@ -87,7 +87,7 @@
virtual void DoDispose (void);
typedef std::list<Ptr<Ipv4L4Protocol> > L4List_t;
L4List_t m_protocols;
- Ptr<Node> m_node;
+ Ptr<INode> m_node;
};
} //namespace ns3
--- a/src/internet-node/ipv4-loopback-interface.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/ipv4-loopback-interface.cc Mon May 14 10:06:12 2007 +0200
@@ -27,7 +27,7 @@
namespace ns3 {
-Ipv4LoopbackInterface::Ipv4LoopbackInterface (Ptr<Node> node)
+Ipv4LoopbackInterface::Ipv4LoopbackInterface (Ptr<INode> node)
: Ipv4Interface (0),
m_node (node)
{}
--- a/src/internet-node/ipv4-loopback-interface.h Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/ipv4-loopback-interface.h Mon May 14 10:06:12 2007 +0200
@@ -27,19 +27,19 @@
namespace ns3 {
-class Node;
+class INode;
class Ipv4LoopbackInterface : public Ipv4Interface
{
public:
- Ipv4LoopbackInterface (Ptr<Node> node);
+ Ipv4LoopbackInterface (Ptr<INode> node);
virtual ~Ipv4LoopbackInterface ();
private:
virtual void SendTo (Packet p, Ipv4Address dest);
virtual TraceResolver *DoCreateTraceResolver (TraceContext const &context);
- Ptr<Node> m_node;
+ Ptr<INode> m_node;
};
}//namespace ns3
--- a/src/internet-node/ipv4.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/ipv4.cc Mon May 14 10:06:12 2007 +0200
@@ -43,7 +43,7 @@
const uint16_t Ipv4::PROT_NUMBER = 0x0800;
-Ipv4::Ipv4(Ptr<Node> node)
+Ipv4::Ipv4(Ptr<INode> node)
: L3Protocol (PROT_NUMBER, 4),
m_nInterfaces (0),
m_defaultTtl (64),
--- a/src/internet-node/ipv4.h Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/ipv4.h Mon May 14 10:06:12 2007 +0200
@@ -38,7 +38,7 @@
class Ipv4Address;
class Ipv4Header;
class Ipv4Route;
-class Node;
+class INode;
class TraceResolver;
class TraceContext;
@@ -59,7 +59,7 @@
};
typedef ArrayTraceResolver<Ipv4Interface>::Index InterfaceIndex;
- Ipv4(Ptr<Node> node);
+ Ipv4(Ptr<INode> node);
virtual ~Ipv4 ();
/**
@@ -241,7 +241,7 @@
HostRoutes m_hostRoutes;
NetworkRoutes m_networkRoutes;
Ipv4Route *m_defaultRoute;
- Ptr<Node> m_node;
+ Ptr<INode> m_node;
CallbackTraceSource<Packet const &, uint32_t> m_txTrace;
CallbackTraceSource<Packet const &, uint32_t> m_rxTrace;
CallbackTraceSource<Packet const &> m_dropTrace;
--- a/src/internet-node/l3-demux.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/l3-demux.cc Mon May 14 10:06:12 2007 +0200
@@ -31,7 +31,7 @@
const InterfaceId L3Demux::iid ("L3Demux");
-L3Demux::L3Demux (Ptr<Node> node)
+L3Demux::L3Demux (Ptr<INode> node)
: Interface (L3Demux::iid),
m_node (node)
{}
--- a/src/internet-node/l3-demux.h Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/l3-demux.h Mon May 14 10:06:12 2007 +0200
@@ -34,7 +34,7 @@
namespace ns3 {
class L3Protocol;
-class Node;
+class INode;
class TraceResolver;
class TraceContext;
@@ -46,7 +46,7 @@
public:
static const InterfaceId iid;
typedef int ProtocolTraceType;
- L3Demux(Ptr<Node> node);
+ L3Demux(Ptr<INode> node);
virtual ~L3Demux();
/**
@@ -63,7 +63,7 @@
* \param protocol a template for the protocol to add to this L3 Demux.
*
* Invoke Copy on the input template to get a copy of the input
- * protocol which can be used on the Node on which this L3 Demux
+ * protocol which can be used on the INode on which this L3 Demux
* is running. The new L3Protocol is registered internally as
* a working L3 Protocol and returned from this method.
* The caller does not get ownership of the returned pointer.
@@ -76,7 +76,7 @@
*
* This method is typically called by lower layers
* to forward packets up the stack to the right protocol.
- * It is also called from InternetNode::GetIpv4 for example.
+ * It is also called from INodeImpl::GetIpv4 for example.
*/
Ptr<L3Protocol> GetProtocol (int protocolNumber);
protected:
@@ -84,7 +84,7 @@
private:
typedef std::map<int, Ptr<ns3::L3Protocol> > L3Map_t;
- Ptr<Node> m_node;
+ Ptr<INode> m_node;
L3Map_t m_protocols;
};
--- a/src/internet-node/pcap-trace.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/pcap-trace.cc Mon May 14 10:06:12 2007 +0200
@@ -84,7 +84,7 @@
{
NodeList::NodeIndex nodeIndex;
context.Get (nodeIndex);
- uint32_t nodeId = NodeList::GetNode (nodeIndex)->GetId ();
+ uint32_t nodeId = NodeList::GetINode (nodeIndex)->GetId ();
PcapWriter *writer = GetStream (nodeId, interfaceIndex);
writer->WritePacket (p);
}
--- a/src/internet-node/udp-socket.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/udp-socket.cc Mon May 14 10:06:12 2007 +0200
@@ -26,7 +26,7 @@
namespace ns3 {
-UdpSocket::UdpSocket (Ptr<Node> node, Ptr<Udp> udp)
+UdpSocket::UdpSocket (Ptr<INode> node, Ptr<Udp> udp)
: m_endPoint (0),
m_node (node),
m_udp (udp),
@@ -56,8 +56,8 @@
m_udp = 0;
}
-Ptr<Node>
-UdpSocket::GetNode (void) const
+Ptr<INode>
+UdpSocket::GetINode (void) const
{
return m_node;
}
--- a/src/internet-node/udp-socket.h Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/udp-socket.h Mon May 14 10:06:12 2007 +0200
@@ -29,7 +29,7 @@
namespace ns3 {
class Ipv4EndPoint;
-class Node;
+class INode;
class Packet;
class Udp;
@@ -39,11 +39,11 @@
/**
* Create an unbound udp socket.
*/
- UdpSocket (Ptr<Node> node, Ptr<Udp> udp);
+ UdpSocket (Ptr<INode> node, Ptr<Udp> udp);
virtual ~UdpSocket ();
virtual enum SocketErrno GetErrno (void) const;
- virtual Ptr<Node> GetNode (void) const;
+ virtual Ptr<INode> GetINode (void) const;
virtual int Bind (void);
virtual int Bind (Ipv4Address address);
virtual int Bind (uint16_t port);
@@ -82,7 +82,7 @@
ns3::Callback<void, Ptr<Socket>, uint32_t> dataSent);
Ipv4EndPoint *m_endPoint;
- Ptr<Node> m_node;
+ Ptr<INode> m_node;
Ptr<Udp> m_udp;
Ipv4Address m_defaultAddress;
uint16_t m_defaultPort;
--- a/src/internet-node/udp.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/udp.cc Mon May 14 10:06:12 2007 +0200
@@ -38,7 +38,7 @@
/* see http://www.iana.org/assignments/protocol-numbers */
const uint8_t Udp::PROT_NUMBER = 17;
-Udp::Udp (Ptr<Node> node)
+Udp::Udp (Ptr<INode> node)
: Ipv4L4Protocol (PROT_NUMBER, 2),
m_node (node),
m_endPoints (new Ipv4EndPointDemux ())
--- a/src/internet-node/udp.h Mon May 14 09:26:51 2007 +0200
+++ b/src/internet-node/udp.h Mon May 14 10:06:12 2007 +0200
@@ -32,7 +32,7 @@
namespace ns3 {
-class Node;
+class INode;
class TraceResolver;
class TraceContext;
class Socket;
@@ -41,7 +41,7 @@
public:
static const uint8_t PROT_NUMBER;
- Udp (Ptr<Node> node);
+ Udp (Ptr<INode> node);
virtual ~Udp ();
virtual TraceResolver *CreateTraceResolver (TraceContext const &context);
@@ -68,7 +68,7 @@
protected:
virtual void DoDispose (void);
private:
- Ptr<Node> m_node;
+ Ptr<INode> m_node;
Ipv4EndPointDemux *m_endPoints;
};
--- a/src/node/application.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/node/application.cc Mon May 14 10:06:12 2007 +0200
@@ -34,7 +34,7 @@
// Application Methods
// \brief Application Constructor
-Application::Application(Ptr<Node> n)
+Application::Application(Ptr<INode> n)
: m_node (n)
{
m_node->AddApplication (this);
@@ -77,7 +77,7 @@
delete v;
}
-Ptr<Node> Application::GetNode() const
+Ptr<INode> Application::GetINode() const
{
return m_node;
}
--- a/src/node/application.h Mon May 14 09:26:51 2007 +0200
+++ b/src/node/application.h Mon May 14 10:06:12 2007 +0200
@@ -29,7 +29,7 @@
namespace ns3 {
-class Node;
+class INode;
class RandomVariable;
/**
@@ -52,7 +52,7 @@
class Application : public Object
{
public:
- Application(Ptr<Node>);
+ Application(Ptr<INode>);
virtual ~Application();
/**
@@ -98,9 +98,9 @@
void Stop(const RandomVariable& stopVariable);
/**
- * \returns the Node to which this Application object is attached.
+ * \returns the INode to which this Application object is attached.
*/
- Ptr<Node> GetNode() const;
+ Ptr<INode> GetINode() const;
private:
/**
@@ -128,7 +128,7 @@
EventId m_startEvent;
EventId m_stopEvent;
- Ptr<Node> m_node;
+ Ptr<INode> m_node;
};
} //namespace ns3
--- a/src/node/i-node.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/node/i-node.cc Mon May 14 10:06:12 2007 +0200
@@ -19,7 +19,7 @@
// Author: George F. Riley<riley@ece.gatech.edu>
//
-// Implement the basic Node object for ns3.
+// Implement the basic INode object for ns3.
// George F. Riley, Georgia Tech, Fall 2006
#include "i-node.h"
@@ -30,47 +30,47 @@
namespace ns3{
-const InterfaceId Node::iid ("Node");
+const InterfaceId INode::iid ("INode");
-Node::Node()
- : Interface (Node::iid),
+INode::INode()
+ : Interface (INode::iid),
m_id(0),
m_sid(0)
{
m_id = NodeList::Add (this);
}
-Node::Node(uint32_t sid)
- : Interface (Node::iid),
+INode::INode(uint32_t sid)
+ : Interface (INode::iid),
m_id(0),
m_sid(sid)
{
m_id = NodeList::Add (this);
}
-Node::~Node ()
+INode::~INode ()
{}
TraceResolver *
-Node::CreateTraceResolver (TraceContext const &context)
+INode::CreateTraceResolver (TraceContext const &context)
{
return DoCreateTraceResolver (context);
}
uint32_t
-Node::GetId (void) const
+INode::GetId (void) const
{
return m_id;
}
uint32_t
-Node::GetSystemId (void) const
+INode::GetSystemId (void) const
{
return m_sid;
}
uint32_t
-Node::AddDevice (Ptr<NetDevice> device)
+INode::AddDevice (Ptr<NetDevice> device)
{
uint32_t index = m_devices.size ();
m_devices.push_back (device);
@@ -79,36 +79,36 @@
return index;
}
Ptr<NetDevice>
-Node::GetDevice (uint32_t index) const
+INode::GetDevice (uint32_t index) const
{
return m_devices[index];
}
uint32_t
-Node::GetNDevices (void) const
+INode::GetNDevices (void) const
{
return m_devices.size ();
}
uint32_t
-Node::AddApplication (Ptr<Application> application)
+INode::AddApplication (Ptr<Application> application)
{
uint32_t index = m_applications.size ();
m_applications.push_back (application);
return index;
}
Ptr<Application>
-Node::GetApplication (uint32_t index) const
+INode::GetApplication (uint32_t index) const
{
return m_applications[index];
}
uint32_t
-Node::GetNApplications (void) const
+INode::GetNApplications (void) const
{
return m_applications.size ();
}
-void Node::DoDispose()
+void INode::DoDispose()
{
for (std::vector<Ptr<NetDevice> >::iterator i = m_devices.begin ();
i != m_devices.end (); i++)
--- a/src/node/i-node.h Mon May 14 09:26:51 2007 +0200
+++ b/src/node/i-node.h Mon May 14 10:06:12 2007 +0200
@@ -19,7 +19,7 @@
// Author: George F. Riley<riley@ece.gatech.edu>
//
-// Define the basic Node object for ns3.
+// Define the basic INode object for ns3.
// George F. Riley, Georgia Tech, Fall 2006
#ifndef I_NODE_H
@@ -37,35 +37,35 @@
class Application;
/**
- * \brief A network Node.
+ * \brief A network INode.
*
* This class holds together:
* - a list of NetDevice objects which represent the network interfaces
- * of this node which are connected to other Node instances through
+ * of this node which are connected to other INode instances through
* Channel instances.
* - a list of Application objects which represent the userspace
- * traffic generation applications which interact with the Node
+ * traffic generation applications which interact with the INode
* through the Socket API.
* - a node Id: a unique per-node identifier.
* - a system Id: a unique Id used for parallel simulations.
* - a trace resolver which can be used to connect user trace sinks
* to the node's trace sources.
*
- * Every Node created is added to the NodeList automatically.
+ * Every INode created is added to the NodeList automatically.
*/
-class Node : public Interface
+class INode : public Interface
{
public:
static const InterfaceId iid;
- virtual ~Node();
+ virtual ~INode();
/**
* \param context the trace context for the TraceResolver to create
* \returns a newly-created TraceResolver. The caller takes
* ownership of the returned pointer.
*
- * Request the Node to create a trace resolver. This method
+ * Request the INode to create a trace resolver. This method
* could be used directly by a user who needs access to very low-level
* trace configuration.
*/
@@ -74,7 +74,7 @@
/**
* \returns the unique id of this node.
*
- * This unique id happens to be also the index of the Node into
+ * This unique id happens to be also the index of the INode into
* the NodeList.
*/
uint32_t GetId (void) const;
@@ -87,7 +87,7 @@
/**
* \param device NetDevice to associate to this node.
- * \returns the index of the NetDevice into the Node's list of
+ * \returns the index of the NetDevice into the INode's list of
* NetDevice.
*
* Associate this device to this node.
@@ -97,21 +97,21 @@
uint32_t AddDevice (Ptr<NetDevice> device);
/**
* \param index the index of the requested NetDevice
- * \returns the requested NetDevice associated to this Node.
+ * \returns the requested NetDevice associated to this INode.
*/
Ptr<NetDevice> GetDevice (uint32_t index) const;
/**
* \returns the number of NetDevice instances associated
- * to this Node.
+ * to this INode.
*/
uint32_t GetNDevices (void) const;
/**
* \param application Application to associate to this node.
- * \returns the index of the Application within the Node's list
+ * \returns the index of the Application within the INode's list
* of Application.
*
- * Associated this Application to this Node. This method is called
+ * Associated this Application to this INode. This method is called
* automatically from Application::Application so the user
* has little reasons to call this method directly.
*/
@@ -119,11 +119,11 @@
/**
* \param index
* \returns the application associated to this requested index
- * within this Node.
+ * within this INode.
*/
Ptr<Application> GetApplication (uint32_t index) const;
/**
- * \returns the number of applications associated to this Node.
+ * \returns the number of applications associated to this INode.
*/
uint32_t GetNApplications (void) const;
@@ -131,16 +131,16 @@
/**
* Must be invoked by subclasses only.
*/
- Node();
+ INode();
/**
* \param systemId a unique integer used for parallel simulations.
*
* Must be invoked by subclasses only.
*/
- Node(uint32_t systemId);
+ INode(uint32_t systemId);
/**
* The dispose method. Subclasses must override this method
- * and must chain up to it by calling Node::DoDispose at the
+ * and must chain up to it by calling INode::DoDispose at the
* end of their own DoDispose method.
*/
virtual void DoDispose (void);
@@ -153,16 +153,16 @@
*/
virtual TraceResolver *DoCreateTraceResolver (TraceContext const &context) = 0;
/**
- * \param device the device added to this Node.
+ * \param device the device added to this INode.
*
- * This method is invoked whenever a user calls Node::AddDevice.
+ * This method is invoked whenever a user calls INode::AddDevice.
* Subclasses are expected to call NetDevice::SetReceiveCallback
* at this point to setup the node's receive function for
* the NetDevice packets.
*/
virtual void DoAddDevice (Ptr<NetDevice> device) const = 0;
- uint32_t m_id; // Node id for this node
+ uint32_t m_id; // INode id for this node
uint32_t m_sid; // System id for this node
std::vector<Ptr<NetDevice> > m_devices;
std::vector<Ptr<Application> > m_applications;
--- a/src/node/net-device.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/node/net-device.cc Mon May 14 10:06:12 2007 +0200
@@ -32,7 +32,7 @@
const InterfaceId NetDevice::iid ("NetDevice");
-NetDevice::NetDevice(Ptr<Node> node, const MacAddress& addr) :
+NetDevice::NetDevice(Ptr<INode> node, const MacAddress& addr) :
Interface (NetDevice::iid),
m_node (node),
m_name(""),
@@ -229,8 +229,8 @@
}
}
-Ptr<Node>
-NetDevice::GetNode (void) const
+Ptr<INode>
+NetDevice::GetINode (void) const
{
return m_node;
}
--- a/src/node/net-device.h Mon May 14 09:26:51 2007 +0200
+++ b/src/node/net-device.h Mon May 14 10:06:12 2007 +0200
@@ -31,7 +31,7 @@
namespace ns3 {
-class Node;
+class INode;
class TraceResolver;
class TraceContext;
class Channel;
@@ -166,7 +166,7 @@
* base class to print the nodeid for example, it can invoke
* this method.
*/
- Ptr<Node> GetNode (void) const;
+ Ptr<INode> GetINode (void) const;
/**
* \returns true if ARP is needed, false otherwise.
@@ -187,7 +187,7 @@
* \param node base class node pointer of device's node
* \param addr MAC address of this device.
*/
- NetDevice(Ptr<Node> node, const MacAddress& addr);
+ NetDevice(Ptr<INode> node, const MacAddress& addr);
/**
* Enable broadcast support. This method should be
* called by subclasses from their constructor
@@ -279,7 +279,7 @@
*/
virtual Ptr<Channel> DoGetChannel (void) const = 0;
- Ptr<Node> m_node;
+ Ptr<INode> m_node;
std::string m_name;
uint16_t m_ifIndex;
MacAddress m_address;
--- a/src/node/node-list.cc Mon May 14 09:26:51 2007 +0200
+++ b/src/node/node-list.cc Mon May 14 10:06:12 2007 +0200
@@ -49,26 +49,26 @@
NodeListPriv ();
~NodeListPriv ();
- uint32_t Add (Ptr<Node> node);
+ uint32_t Add (Ptr<INode> node);
NodeList::Iterator Begin (void);
NodeList::Iterator End (void);
TraceResolver *CreateTraceResolver (TraceContext const &context);
- Node *PeekNode (uint32_t n);
- Ptr<Node> GetNode (uint32_t n);
- uint32_t GetNNodes (void);
+ INode *PeekINode (uint32_t n);
+ Ptr<INode> GetINode (uint32_t n);
+ uint32_t GetNINodes (void);
private:
- std::vector<Ptr<Node> > m_nodes;
+ std::vector<Ptr<INode> > m_nodes;
};
NodeListPriv::NodeListPriv ()
{}
NodeListPriv::~NodeListPriv ()
{
- for (std::vector<Ptr<Node> >::iterator i = m_nodes.begin ();
+ for (std::vector<Ptr<INode> >::iterator i = m_nodes.begin ();
i != m_nodes.end (); i++)
{
- Ptr<Node> node = *i;
+ Ptr<INode> node = *i;
node->Dispose ();
*i = 0;
}
@@ -77,7 +77,7 @@
uint32_t
-NodeListPriv::Add (Ptr<Node> node)
+NodeListPriv::Add (Ptr<INode> node)
{
uint32_t index = m_nodes.size ();
m_nodes.push_back (node);
@@ -95,18 +95,18 @@
return m_nodes.end ();
}
uint32_t
-NodeListPriv::GetNNodes (void)
+NodeListPriv::GetNINodes (void)
{
return m_nodes.size ();
}
-Node *
-NodeListPriv::PeekNode (uint32_t n)
+INode *
+NodeListPriv::PeekINode (uint32_t n)
{
return PeekPointer (m_nodes[n]);
}
-Ptr<Node>
-NodeListPriv::GetNode (uint32_t n)
+Ptr<INode>
+NodeListPriv::GetINode (uint32_t n)
{
return m_nodes[n];
}
@@ -115,11 +115,11 @@
TraceResolver *
NodeListPriv::CreateTraceResolver (TraceContext const &context)
{
- ArrayTraceResolver<Node> *resolver =
- new ArrayTraceResolver<Node>
+ ArrayTraceResolver<INode> *resolver =
+ new ArrayTraceResolver<INode>
(context,
- MakeCallback (&NodeListPriv::GetNNodes, this),
- MakeCallback (&NodeListPriv::PeekNode, this));
+ MakeCallback (&NodeListPriv::GetNINodes, this),
+ MakeCallback (&NodeListPriv::PeekINode, this));
return resolver;
}
@@ -133,7 +133,7 @@
namespace ns3 {
uint32_t
-NodeList::Add (Ptr<Node> node)
+NodeList::Add (Ptr<INode> node)
{
return SimulationSingleton<NodeListPriv>::Get ()->Add (node);
}
@@ -152,10 +152,10 @@
{
return SimulationSingleton<NodeListPriv>::Get ()->CreateTraceResolver (context);
}
-Ptr<Node>
-NodeList::GetNode (uint32_t n)
+Ptr<INode>
+NodeList::GetINode (uint32_t n)
{
- return SimulationSingleton<NodeListPriv>::Get ()->GetNode (n);
+ return SimulationSingleton<NodeListPriv>::Get ()->GetINode (n);
}
--- a/src/node/node-list.h Mon May 14 09:26:51 2007 +0200
+++ b/src/node/node-list.h Mon May 14 10:06:12 2007 +0200
@@ -28,29 +28,29 @@
namespace ns3 {
-class Node;
+class INode;
class TraceResolver;
class TraceContext;
/**
* \brief the list of simulation nodes.
*
- * Every Node created is automatically added to this list.
+ * Every INode created is automatically added to this list.
*/
class NodeList
{
public:
- typedef ArrayTraceResolver<Node>::Index NodeIndex;
- typedef std::vector< Ptr<Node> >::iterator Iterator;
+ typedef ArrayTraceResolver<INode>::Index NodeIndex;
+ typedef std::vector< Ptr<INode> >::iterator Iterator;
/**
* \param node node to add
* \returns index of node in list.
*
- * This method is called automatically from Node::Node so
+ * This method is called automatically from INode::INode so
* the user has little reason to call it himself.
*/
- static uint32_t Add (Ptr<Node> node);
+ static uint32_t Add (Ptr<INode> node);
/**
* \returns a C++ iterator located at the beginning of this
* list.
@@ -71,9 +71,9 @@
/**
* \param n index of requested node.
- * \returns the Node associated to index n.
+ * \returns the INode associated to index n.
*/
- static Ptr<Node> GetNode (uint32_t n);
+ static Ptr<INode> GetINode (uint32_t n);
};
}//namespace ns3
--- a/src/node/socket.h Mon May 14 09:26:51 2007 +0200
+++ b/src/node/socket.h Mon May 14 10:06:12 2007 +0200
@@ -29,7 +29,7 @@
namespace ns3 {
-class Node;
+class INode;
/**
* \brief Define a Socket API based on the BSD Socket API.
@@ -66,7 +66,7 @@
/**
* \returns the node this socket is associated with.
*/
- virtual Ptr<Node> GetNode (void) const = 0;
+ virtual Ptr<INode> GetINode (void) const = 0;
/**
* Allocate a free port number and