--- a/examples/simple-p2p.cc Fri May 25 21:53:24 2007 +0200
+++ b/examples/simple-p2p.cc Mon Jun 04 16:17:01 2007 +0200
@@ -103,10 +103,10 @@
// Here, we will explicitly create four nodes. In more sophisticated
// topologies, we could configure a node factory.
- Ptr<INode> n0 = MakeInternetNode ();
- Ptr<INode> n1 = MakeInternetNode ();
- Ptr<INode> n2 = MakeInternetNode ();
- Ptr<INode> n3 = MakeInternetNode ();
+ Ptr<Node> n0 = MakeInternetNode ();
+ Ptr<Node> n1 = MakeInternetNode ();
+ Ptr<Node> n2 = MakeInternetNode ();
+ Ptr<Node> n3 = MakeInternetNode ();
// We create the channels first without any IP addressing information
Ptr<PointToPointChannel> channel0 =
--- a/samples/main-simple.cc Fri May 25 21:53:24 2007 +0200
+++ b/samples/main-simple.cc Mon Jun 04 16:17:01 2007 +0200
@@ -38,7 +38,7 @@
void
RunSimulation (void)
{
- Ptr<INode> a = MakeInternetNode ();
+ Ptr<Node> a = MakeInternetNode ();
InterfaceId iid = InterfaceId::LookupByName ("IUdp");
Ptr<ISocketFactory> socketFactory = a->QueryInterface<ISocketFactory> (iid);
--- a/src/applications/onoff-application.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/applications/onoff-application.cc Mon Jun 04 16:17:01 2007 +0200
@@ -46,7 +46,7 @@
512, 1);
// Constructors
-OnOffApplication::OnOffApplication(Ptr<INode> n,
+OnOffApplication::OnOffApplication(Ptr<Node> n,
const Ipv4Address rip,
uint16_t rport,
std::string iid,
@@ -60,7 +60,7 @@
g_defaultSize.GetValue ());
}
-OnOffApplication::OnOffApplication(Ptr<INode> n,
+OnOffApplication::OnOffApplication(Ptr<Node> n,
const Ipv4Address rip,
uint16_t rport,
std::string iid,
@@ -76,7 +76,7 @@
}
void
-OnOffApplication::Construct (Ptr<INode> n,
+OnOffApplication::Construct (Ptr<Node> n,
const Ipv4Address rip,
uint16_t rport,
std::string iid,
@@ -141,7 +141,7 @@
if (!m_socket)
{
InterfaceId iid = InterfaceId::LookupByName (m_iid);
- Ptr<ISocketFactory> socketFactory = GetINode ()->QueryInterface<ISocketFactory> (iid);
+ Ptr<ISocketFactory> socketFactory = GetNode ()->QueryInterface<ISocketFactory> (iid);
m_socket = socketFactory->CreateSocket ();
m_socket->Bind ();
m_socket->Connect (m_peerIp, m_peerPort);
--- a/src/applications/onoff-application.h Fri May 25 21:53:24 2007 +0200
+++ b/src/applications/onoff-application.h Mon Jun 04 16:17:01 2007 +0200
@@ -58,7 +58,7 @@
* \param ontime on time random variable
* \param offtime off time random variable
*/
- OnOffApplication(Ptr<INode> n,
+ OnOffApplication(Ptr<Node> n,
const Ipv4Address rip,
uint16_t rport,
std::string iid,
@@ -75,7 +75,7 @@
* \param rate data rate when on
* \param size size of packets when sending data.
*/
- OnOffApplication(Ptr<INode> n,
+ OnOffApplication(Ptr<Node> n,
const Ipv4Address rip,
uint16_t rport,
std::string iid,
@@ -111,7 +111,7 @@
virtual void StartApplication (void); // Called at time specified by Start
virtual void StopApplication (void); // Called at time specified by Stop
- void Construct (Ptr<INode> n,
+ void Construct (Ptr<Node> n,
const Ipv4Address rip,
uint16_t rport,
std::string iid,
--- a/src/devices/p2p/p2p-net-device.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/devices/p2p/p2p-net-device.cc Mon Jun 04 16:17:01 2007 +0200
@@ -32,7 +32,7 @@
namespace ns3 {
-PointToPointNetDevice::PointToPointNetDevice (Ptr<INode> node)
+PointToPointNetDevice::PointToPointNetDevice (Ptr<Node> node)
:
NetDevice(node, MacAddress ("00:00:00:00:00:00")),
m_txMachineState (READY),
--- a/src/devices/p2p/p2p-net-device.h Fri May 25 21:53:24 2007 +0200
+++ b/src/devices/p2p/p2p-net-device.h Mon Jun 04 16:17:01 2007 +0200
@@ -74,13 +74,13 @@
* Construct a PointToPointNetDevice
*
* This is the constructor for the PointToPointNetDevice. It takes as a
- * parameter the INode to which this device is connected. Ownership of the
- * INode pointer is not implied and the node must not be deleded.
+ * parameter the Node to which this device is connected. Ownership of the
+ * Node pointer is not implied and the node must not be deleded.
*
* @see PointToPointTopology::AddPointToPointLink ()
- * @param node the INode to which this device is connected.
+ * @param node the Node to which this device is connected.
*/
- PointToPointNetDevice (Ptr<INode> node);
+ PointToPointNetDevice (Ptr<Node> node);
/**
* Copy Construct a PointToPointNetDevice
*
--- a/src/devices/p2p/p2p-topology.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/devices/p2p/p2p-topology.cc Mon Jun 04 16:17:01 2007 +0200
@@ -40,8 +40,8 @@
Ptr<PointToPointChannel>
PointToPointTopology::AddPointToPointLink(
- Ptr<INode> n1,
- Ptr<INode> n2,
+ Ptr<Node> n1,
+ Ptr<Node> n2,
const DataRate& bps,
const Time& delay)
{
@@ -65,8 +65,8 @@
void
PointToPointTopology::AddIpv4Addresses(
Ptr<const PointToPointChannel> chan,
- Ptr<INode> n1, const Ipv4Address& addr1,
- Ptr<INode> n2, const Ipv4Address& addr2)
+ Ptr<Node> n1, const Ipv4Address& addr1,
+ Ptr<Node> 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->GetINode ()->GetId () == n2->GetId () ) &&
- (nd2->GetINode ()->GetId () == n1->GetId () ) )
+ if ( (nd1->GetNode ()->GetId () == n2->GetId () ) &&
+ (nd2->GetNode ()->GetId () == n1->GetId () ) )
{
std::swap(nd1, nd2);
}
- NS_ASSERT (nd1->GetINode ()->GetId () == n1->GetId ());
- NS_ASSERT (nd2->GetINode ()->GetId () == n2->GetId ());
+ NS_ASSERT (nd1->GetNode ()->GetId () == n1->GetId ());
+ NS_ASSERT (nd2->GetNode ()->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<INode> n1, Ptr<INode> n2, Ptr<const PointToPointChannel> chan)
+ Ptr<Node> n1, Ptr<Node> 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 INode owning one of the two NetDevices
+ // Assert that n1 is the Node owning one of the two NetDevices
// and make sure that nd1 corresponds to it
- if (nd1->GetINode ()->GetId () == n1->GetId ())
+ if (nd1->GetNode ()->GetId () == n1->GetId ())
{
; // Do nothing
}
- else if (nd2->GetINode ()->GetId () == n1->GetId ())
+ else if (nd2->GetNode ()->GetId () == n1->GetId ())
{
std::swap(nd1, nd2);
}
else
{
- NS_FATAL_ERROR("P2PTopo: INode does not contain an interface on Channel");
+ NS_FATAL_ERROR("P2PTopo: Node does not contain an interface on Channel");
}
- // Assert that n2 is the INode owning one of the two NetDevices
+ // Assert that n2 is the Node owning one of the two NetDevices
// and make sure that nd2 corresponds to it
- if (nd2->GetINode ()->GetId () != n2->GetId ())
+ if (nd2->GetNode ()->GetId () != n2->GetId ())
{
- NS_FATAL_ERROR("P2PTopo: INode does not contain an interface on Channel");
+ NS_FATAL_ERROR("P2PTopo: Node does not contain an interface on Channel");
}
// Assert that both are Ipv4 nodes
- Ptr<IIpv4> ip1 = nd1->GetINode ()->QueryInterface<IIpv4> (IIpv4::iid);
- Ptr<IIpv4> ip2 = nd2->GetINode ()->QueryInterface<IIpv4> (IIpv4::iid);
+ Ptr<IIpv4> ip1 = nd1->GetNode ()->QueryInterface<IIpv4> (IIpv4::iid);
+ Ptr<IIpv4> ip2 = nd2->GetNode ()->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 Fri May 25 21:53:24 2007 +0200
+++ b/src/devices/p2p/p2p-topology.h Mon Jun 04 16:17:01 2007 +0200
@@ -30,7 +30,7 @@
namespace ns3 {
class PointToPointChannel;
-class INode;
+class Node;
class IPAddr;
class DataRate;
class Queue;
@@ -42,8 +42,8 @@
class PointToPointTopology {
public:
/**
- * \param n1 INode
- * \param n2 INode
+ * \param n1 Node
+ * \param n2 Node
* \param dataRate 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<INode> n1, Ptr<INode> n2, const DataRate& dataRate, const Time& delay);
+ Ptr<Node> n1, Ptr<Node> n2, const DataRate& dataRate, const Time& delay);
/**
* \param chan PointToPointChannel to use
- * \param n1 INode
+ * \param n1 Node
* \param addr1 Ipv4 Address for n1
- * \param n2 INode
+ * \param n2 Node
* \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<INode> n1, const Ipv4Address& addr1,
- Ptr<INode> n2, const Ipv4Address& addr2);
+ Ptr<Node> n1, const Ipv4Address& addr1,
+ Ptr<Node> n2, const Ipv4Address& addr2);
/**
* \param channel PointToPointChannel to use
- * \param n1 INode
- * \param n2 INode
+ * \param n1 Node
+ * \param n2 Node
*
- * For the given PointToPointChannel, for each INode, add an
+ * For the given PointToPointChannel, for each Node, add an
* IPv4 host route to the IPv4 address of the peer node.
*/
- static void AddIpv4Routes (Ptr<INode> n1, Ptr<INode> n2, Ptr<const PointToPointChannel> channel);
+ static void AddIpv4Routes (Ptr<Node> n1, Ptr<Node> n2, Ptr<const PointToPointChannel> channel);
};
} // namespace ns3
--- a/src/internet-node/arp-ipv4-interface.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/arp-ipv4-interface.cc Mon Jun 04 16:17:01 2007 +0200
@@ -31,7 +31,7 @@
namespace ns3 {
-ArpIpv4Interface::ArpIpv4Interface (Ptr<INode> node, Ptr<NetDevice> device)
+ArpIpv4Interface::ArpIpv4Interface (Ptr<Node> node, Ptr<NetDevice> device)
: Ipv4Interface (device),
m_node (node)
{}
--- a/src/internet-node/arp-ipv4-interface.h Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/arp-ipv4-interface.h Mon Jun 04 16:17:01 2007 +0200
@@ -27,7 +27,7 @@
namespace ns3 {
-class INode;
+class Node;
/**
* \brief an Ipv4 Interface which uses ARP
@@ -43,13 +43,13 @@
NETDEVICE,
ARP,
};
- ArpIpv4Interface (Ptr<INode> node, Ptr<NetDevice> device);
+ ArpIpv4Interface (Ptr<Node> node, Ptr<NetDevice> device);
virtual ~ArpIpv4Interface ();
private:
virtual void SendTo (Packet p, Ipv4Address dest);
virtual TraceResolver *DoCreateTraceResolver (TraceContext const &context);
- Ptr<INode> m_node;
+ Ptr<Node> m_node;
};
}//namespace ns3
--- a/src/internet-node/arp.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/arp.cc Mon Jun 04 16:17:01 2007 +0200
@@ -36,7 +36,7 @@
const uint16_t Arp::PROT_NUMBER = 0x0806;
-Arp::Arp (Ptr<INode> node)
+Arp::Arp (Ptr<Node> node)
: L3Protocol (PROT_NUMBER, 0/* XXX: correct version number ? */ ),
m_node (node)
{}
--- a/src/internet-node/arp.h Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/arp.h Mon Jun 04 16:17:01 2007 +0200
@@ -31,7 +31,7 @@
class ArpCache;
class NetDevice;
-class INode;
+class Node;
class Packet;
class TraceResolver;
class TraceContext;
@@ -46,7 +46,7 @@
* \brief Constructor
* \param node The node which this ARP object is associated with
*/
- Arp (Ptr<INode> node);
+ Arp (Ptr<Node> node);
~Arp ();
virtual TraceResolver *CreateTraceResolver (TraceContext const &context);
@@ -73,7 +73,7 @@
void SendArpRequest (ArpCache const *cache, Ipv4Address to);
void SendArpReply (ArpCache const *cache, Ipv4Address toIp, MacAddress toMac);
CacheList m_cacheList;
- Ptr<INode> m_node;
+ Ptr<Node> m_node;
};
}//namespace ns3
--- a/src/internet-node/ascii-trace.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/ascii-trace.cc Mon Jun 04 16:17:01 2007 +0200
@@ -110,7 +110,7 @@
m_os << Simulator::Now ().GetSeconds () << " ";
NodeList::NodeIndex nodeIndex;
context.Get (nodeIndex);
- m_os << "node=" << NodeList::GetINode (nodeIndex)->GetId () << " ";
+ m_os << "node=" << NodeList::GetNode (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::GetINode (nodeIndex)->GetId () << " ";
+ m_os << "node=" << NodeList::GetNode (nodeIndex)->GetId () << " ";
Ipv4::InterfaceIndex interfaceIndex;
context.Get (interfaceIndex);
m_os << "interface=" << interfaceIndex << " ";
--- a/src/internet-node/i-node-impl.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/i-node-impl.cc Mon Jun 04 16:17:01 2007 +0200
@@ -18,7 +18,7 @@
//
// Author: George F. Riley<riley@ece.gatech.edu>
//
-// Implementation of the INodeImpl class for ns3.
+// Implementation of the NodeImpl class for ns3.
// George F. Riley, Georgia Tech, Fall 2006
#include "ns3/composite-trace-resolver.h"
@@ -38,21 +38,21 @@
namespace ns3 {
-INodeImpl::INodeImpl()
+NodeImpl::NodeImpl()
{
Construct ();
}
-INodeImpl::INodeImpl(uint32_t systemId)
+NodeImpl::NodeImpl(uint32_t systemId)
{
Construct ();
}
-INodeImpl::~INodeImpl ()
+NodeImpl::~NodeImpl ()
{}
void
-INodeImpl::Construct (void)
+NodeImpl::Construct (void)
{
Ptr<Ipv4> ipv4 = MakeNewObject<Ipv4> (this);
Ptr<Arp> arp = MakeNewObject<Arp> (this);
@@ -80,31 +80,31 @@
TraceResolver *
-INodeImpl::DoCreateTraceResolver (TraceContext const &context)
+NodeImpl::DoCreateTraceResolver (TraceContext const &context)
{
CompositeTraceResolver *resolver = new CompositeTraceResolver (context);
Ptr<IIpv4Private> ipv4 = QueryInterface<IIpv4Private> (IIpv4Private::iid);
resolver->Add ("ipv4",
MakeCallback (&IIpv4Private::CreateTraceResolver, PeekPointer (ipv4)),
- INodeImpl::IPV4);
+ NodeImpl::IPV4);
return resolver;
}
void
-INodeImpl::DoDispose()
+NodeImpl::DoDispose()
{
- INode::DoDispose ();
+ Node::DoDispose ();
}
void
-INodeImpl::DoAddDevice (Ptr<NetDevice> device) const
+NodeImpl::DoAddDevice (Ptr<NetDevice> device) const
{
- device->SetReceiveCallback (MakeCallback (&INodeImpl::ReceiveFromDevice, this));
+ device->SetReceiveCallback (MakeCallback (&NodeImpl::ReceiveFromDevice, this));
}
bool
-INodeImpl::ReceiveFromDevice (Ptr<NetDevice> device, const Packet &p, uint16_t protocolNumber) const
+NodeImpl::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 Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/i-node-impl.h Mon Jun 04 16:17:01 2007 +0200
@@ -33,15 +33,15 @@
class Packet;
-class INodeImpl : public INode
+class NodeImpl : public Node
{
public:
enum TraceType {
IPV4,
};
- INodeImpl();
- INodeImpl(uint32_t systemId);
- virtual ~INodeImpl ();
+ NodeImpl();
+ NodeImpl(uint32_t systemId);
+ virtual ~NodeImpl ();
protected:
virtual void DoDispose(void);
--- a/src/internet-node/internet-node.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/internet-node.cc Mon Jun 04 16:17:01 2007 +0200
@@ -23,16 +23,16 @@
namespace ns3 {
-Ptr<INode>
+Ptr<Node>
MakeInternetNode (void)
{
- return MakeNewObject<INodeImpl> ();
+ return MakeNewObject<NodeImpl> ();
}
-Ptr<INode>
+Ptr<Node>
MakeInternetNode (uint32_t systemId)
{
- return MakeNewObject<INodeImpl> (systemId);
+ return MakeNewObject<NodeImpl> (systemId);
}
} // namespace ns3
--- a/src/internet-node/internet-node.h Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/internet-node.h Mon Jun 04 16:17:01 2007 +0200
@@ -29,13 +29,13 @@
/**
* \returns a newly-created Node which supports the Ipv4 interfaces
*/
-Ptr<INode> MakeInternetNode (void);
+Ptr<Node> MakeInternetNode (void);
/**
* \param systemId a systemId for parallel simulations.
* \returns a newly-created Node which supports the Ipv4 interfaces
*/
-Ptr<INode> MakeInternetNode (uint32_t systemId);
+Ptr<Node> MakeInternetNode (uint32_t systemId);
} // namespace ns3
--- a/src/internet-node/ipv4-l4-demux.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/ipv4-l4-demux.cc Mon Jun 04 16:17:01 2007 +0200
@@ -32,7 +32,7 @@
const InterfaceId Ipv4L4Demux::iid = MakeInterfaceId ("Ipv4L4Demux", Object::iid);
-Ipv4L4Demux::Ipv4L4Demux (Ptr<INode> node)
+Ipv4L4Demux::Ipv4L4Demux (Ptr<Node> node)
: m_node (node)
{
SetInterfaceId (Ipv4L4Demux::iid);
--- a/src/internet-node/ipv4-l4-demux.h Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/ipv4-l4-demux.h Mon Jun 04 16:17:01 2007 +0200
@@ -32,7 +32,7 @@
namespace ns3 {
class Ipv4L4Protocol;
-class INode;
+class Node;
class TraceResolver;
class TraceContext;
@@ -44,7 +44,7 @@
public:
static const InterfaceId iid;
typedef int Ipv4L4ProtocolTraceType;
- Ipv4L4Demux (Ptr<INode> node);
+ Ipv4L4Demux (Ptr<Node> 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 INode on which this L4 Demux
+ * protocol which can be used on the Node 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 INodeImpl::GetUdp for example.
+ * It is also called from NodeImpl::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<INode> m_node;
+ Ptr<Node> m_node;
};
} //namespace ns3
--- a/src/internet-node/ipv4-loopback-interface.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/ipv4-loopback-interface.cc Mon Jun 04 16:17:01 2007 +0200
@@ -27,7 +27,7 @@
namespace ns3 {
-Ipv4LoopbackInterface::Ipv4LoopbackInterface (Ptr<INode> node)
+Ipv4LoopbackInterface::Ipv4LoopbackInterface (Ptr<Node> node)
: Ipv4Interface (0),
m_node (node)
{}
--- a/src/internet-node/ipv4-loopback-interface.h Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/ipv4-loopback-interface.h Mon Jun 04 16:17:01 2007 +0200
@@ -27,7 +27,7 @@
namespace ns3 {
-class INode;
+class Node;
/**
* \brief An IPv4 loopback interface
*/
@@ -38,14 +38,14 @@
* \brief Constructor
* \param node Pointer to a node associated with this IPv4 interface
*/
- Ipv4LoopbackInterface (Ptr<INode> node);
+ Ipv4LoopbackInterface (Ptr<Node> node);
virtual ~Ipv4LoopbackInterface ();
private:
virtual void SendTo (Packet p, Ipv4Address dest);
virtual TraceResolver *DoCreateTraceResolver (TraceContext const &context);
- Ptr<INode> m_node;
+ Ptr<Node> m_node;
};
}//namespace ns3
--- a/src/internet-node/ipv4.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/ipv4.cc Mon Jun 04 16:17:01 2007 +0200
@@ -43,7 +43,7 @@
const uint16_t Ipv4::PROT_NUMBER = 0x0800;
-Ipv4::Ipv4(Ptr<INode> node)
+Ipv4::Ipv4(Ptr<Node> node)
: L3Protocol (PROT_NUMBER, 4),
m_nInterfaces (0),
m_defaultTtl (64),
--- a/src/internet-node/ipv4.h Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/ipv4.h Mon Jun 04 16:17:01 2007 +0200
@@ -38,7 +38,7 @@
class Ipv4Address;
class Ipv4Header;
class Ipv4Route;
-class INode;
+class Node;
class TraceResolver;
class TraceContext;
@@ -56,7 +56,7 @@
};
typedef ArrayTraceResolver<Ipv4Interface>::Index InterfaceIndex;
- Ipv4(Ptr<INode> node);
+ Ipv4(Ptr<Node> node);
virtual ~Ipv4 ();
/**
@@ -169,7 +169,7 @@
HostRoutes m_hostRoutes;
NetworkRoutes m_networkRoutes;
Ipv4Route *m_defaultRoute;
- Ptr<INode> m_node;
+ Ptr<Node> 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 Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/l3-demux.cc Mon Jun 04 16:17:01 2007 +0200
@@ -31,7 +31,7 @@
const InterfaceId L3Demux::iid = MakeInterfaceId ("L3Demux", Object::iid);
-L3Demux::L3Demux (Ptr<INode> node)
+L3Demux::L3Demux (Ptr<Node> node)
: m_node (node)
{
SetInterfaceId (L3Demux::iid);
--- a/src/internet-node/l3-demux.h Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/l3-demux.h Mon Jun 04 16:17:01 2007 +0200
@@ -34,7 +34,7 @@
namespace ns3 {
class L3Protocol;
-class INode;
+class Node;
class TraceResolver;
class TraceContext;
@@ -46,7 +46,7 @@
public:
static const InterfaceId iid;
typedef int ProtocolTraceType;
- L3Demux(Ptr<INode> node);
+ L3Demux(Ptr<Node> 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 INode on which this L3 Demux
+ * protocol which can be used on the Node 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 INodeImpl::GetIpv4 for example.
+ * It is also called from NodeImpl::GetIpv4 for example.
*/
Ptr<L3Protocol> GetProtocol (int protocolNumber);
protected:
@@ -84,7 +84,7 @@
private:
typedef std::map<int, Ptr<ns3::L3Protocol> > L3Map_t;
- Ptr<INode> m_node;
+ Ptr<Node> m_node;
L3Map_t m_protocols;
};
--- a/src/internet-node/pcap-trace.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/pcap-trace.cc Mon Jun 04 16:17:01 2007 +0200
@@ -84,7 +84,7 @@
{
NodeList::NodeIndex nodeIndex;
context.Get (nodeIndex);
- uint32_t nodeId = NodeList::GetINode (nodeIndex)->GetId ();
+ uint32_t nodeId = NodeList::GetNode (nodeIndex)->GetId ();
PcapWriter *writer = GetStream (nodeId, interfaceIndex);
writer->WritePacket (p);
}
--- a/src/internet-node/udp-socket.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/udp-socket.cc Mon Jun 04 16:17:01 2007 +0200
@@ -26,7 +26,7 @@
namespace ns3 {
-UdpSocket::UdpSocket (Ptr<INode> node, Ptr<Udp> udp)
+UdpSocket::UdpSocket (Ptr<Node> node, Ptr<Udp> udp)
: m_endPoint (0),
m_node (node),
m_udp (udp),
@@ -56,8 +56,8 @@
m_udp = 0;
}
-Ptr<INode>
-UdpSocket::GetINode (void) const
+Ptr<Node>
+UdpSocket::GetNode (void) const
{
return m_node;
}
--- a/src/internet-node/udp-socket.h Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/udp-socket.h Mon Jun 04 16:17:01 2007 +0200
@@ -29,7 +29,7 @@
namespace ns3 {
class Ipv4EndPoint;
-class INode;
+class Node;
class Packet;
class Udp;
@@ -39,11 +39,11 @@
/**
* Create an unbound udp socket.
*/
- UdpSocket (Ptr<INode> node, Ptr<Udp> udp);
+ UdpSocket (Ptr<Node> node, Ptr<Udp> udp);
virtual ~UdpSocket ();
virtual enum SocketErrno GetErrno (void) const;
- virtual Ptr<INode> GetINode (void) const;
+ virtual Ptr<Node> GetNode (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<INode> m_node;
+ Ptr<Node> m_node;
Ptr<Udp> m_udp;
Ipv4Address m_defaultAddress;
uint16_t m_defaultPort;
--- a/src/internet-node/udp.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/udp.cc Mon Jun 04 16:17:01 2007 +0200
@@ -38,7 +38,7 @@
/* see http://www.iana.org/assignments/protocol-numbers */
const uint8_t Udp::PROT_NUMBER = 17;
-Udp::Udp (Ptr<INode> node)
+Udp::Udp (Ptr<Node> node)
: Ipv4L4Protocol (PROT_NUMBER, 2),
m_node (node),
m_endPoints (new Ipv4EndPointDemux ())
--- a/src/internet-node/udp.h Fri May 25 21:53:24 2007 +0200
+++ b/src/internet-node/udp.h Mon Jun 04 16:17:01 2007 +0200
@@ -32,7 +32,7 @@
namespace ns3 {
-class INode;
+class Node;
class TraceResolver;
class TraceContext;
class Socket;
@@ -46,7 +46,7 @@
* \brief Constructor
* \param node The node this protocol is associated with
*/
- Udp (Ptr<INode> node);
+ Udp (Ptr<Node> node);
virtual ~Udp ();
virtual TraceResolver *CreateTraceResolver (TraceContext const &context);
@@ -90,7 +90,7 @@
protected:
virtual void DoDispose (void);
private:
- Ptr<INode> m_node;
+ Ptr<Node> m_node;
Ipv4EndPointDemux *m_endPoints;
};
--- a/src/node/application.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/node/application.cc Mon Jun 04 16:17:01 2007 +0200
@@ -34,7 +34,7 @@
// Application Methods
// \brief Application Constructor
-Application::Application(Ptr<INode> n)
+Application::Application(Ptr<Node> n)
: m_node (n)
{
m_node->AddApplication (this);
@@ -77,7 +77,7 @@
delete v;
}
-Ptr<INode> Application::GetINode() const
+Ptr<Node> Application::GetNode() const
{
return m_node;
}
--- a/src/node/application.h Fri May 25 21:53:24 2007 +0200
+++ b/src/node/application.h Mon Jun 04 16:17:01 2007 +0200
@@ -29,7 +29,7 @@
namespace ns3 {
-class INode;
+class Node;
class RandomVariable;
/**
@@ -52,7 +52,7 @@
class Application : public Object
{
public:
- Application(Ptr<INode>);
+ Application(Ptr<Node>);
virtual ~Application();
/**
@@ -98,9 +98,9 @@
void Stop(const RandomVariable& stopVariable);
/**
- * \returns the INode to which this Application object is attached.
+ * \returns the Node to which this Application object is attached.
*/
- Ptr<INode> GetINode() const;
+ Ptr<Node> GetNode() const;
private:
/**
@@ -128,7 +128,7 @@
EventId m_startEvent;
EventId m_stopEvent;
- Ptr<INode> m_node;
+ Ptr<Node> m_node;
};
} //namespace ns3
--- a/src/node/i-node.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/node/i-node.cc Mon Jun 04 16:17:01 2007 +0200
@@ -19,7 +19,7 @@
// Author: George F. Riley<riley@ece.gatech.edu>
//
-// Implement the basic INode object for ns3.
+// Implement the basic Node object for ns3.
// George F. Riley, Georgia Tech, Fall 2006
#include "i-node.h"
@@ -30,47 +30,47 @@
namespace ns3{
-const InterfaceId INode::iid = MakeInterfaceId ("INode", Object::iid);
+const InterfaceId Node::iid = MakeInterfaceId ("Node", Object::iid);
-INode::INode()
+Node::Node()
: m_id(0),
m_sid(0)
{
- SetInterfaceId (INode::iid);
+ SetInterfaceId (Node::iid);
m_id = NodeList::Add (this);
}
-INode::INode(uint32_t sid)
+Node::Node(uint32_t sid)
: m_id(0),
m_sid(sid)
{
- SetInterfaceId (INode::iid);
+ SetInterfaceId (Node::iid);
m_id = NodeList::Add (this);
}
-INode::~INode ()
+Node::~Node ()
{}
TraceResolver *
-INode::CreateTraceResolver (TraceContext const &context)
+Node::CreateTraceResolver (TraceContext const &context)
{
return DoCreateTraceResolver (context);
}
uint32_t
-INode::GetId (void) const
+Node::GetId (void) const
{
return m_id;
}
uint32_t
-INode::GetSystemId (void) const
+Node::GetSystemId (void) const
{
return m_sid;
}
uint32_t
-INode::AddDevice (Ptr<NetDevice> device)
+Node::AddDevice (Ptr<NetDevice> device)
{
uint32_t index = m_devices.size ();
m_devices.push_back (device);
@@ -79,36 +79,36 @@
return index;
}
Ptr<NetDevice>
-INode::GetDevice (uint32_t index) const
+Node::GetDevice (uint32_t index) const
{
return m_devices[index];
}
uint32_t
-INode::GetNDevices (void) const
+Node::GetNDevices (void) const
{
return m_devices.size ();
}
uint32_t
-INode::AddApplication (Ptr<Application> application)
+Node::AddApplication (Ptr<Application> application)
{
uint32_t index = m_applications.size ();
m_applications.push_back (application);
return index;
}
Ptr<Application>
-INode::GetApplication (uint32_t index) const
+Node::GetApplication (uint32_t index) const
{
return m_applications[index];
}
uint32_t
-INode::GetNApplications (void) const
+Node::GetNApplications (void) const
{
return m_applications.size ();
}
-void INode::DoDispose()
+void Node::DoDispose()
{
for (std::vector<Ptr<NetDevice> >::iterator i = m_devices.begin ();
i != m_devices.end (); i++)
--- a/src/node/i-node.h Fri May 25 21:53:24 2007 +0200
+++ b/src/node/i-node.h Mon Jun 04 16:17:01 2007 +0200
@@ -19,7 +19,7 @@
// Author: George F. Riley<riley@ece.gatech.edu>
//
-// Define the basic INode object for ns3.
+// Define the basic Node object for ns3.
// George F. Riley, Georgia Tech, Fall 2006
#ifndef I_NODE_H
@@ -37,35 +37,35 @@
class Application;
/**
- * \brief A network INode.
+ * \brief A network Node.
*
* This class holds together:
* - a list of NetDevice objects which represent the network interfaces
- * of this node which are connected to other INode instances through
+ * of this node which are connected to other Node instances through
* Channel instances.
* - a list of Application objects which represent the userspace
- * traffic generation applications which interact with the INode
+ * traffic generation applications which interact with the Node
* 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 INode created is added to the NodeList automatically.
+ * Every Node created is added to the NodeList automatically.
*/
-class INode : public Object
+class Node : public Object
{
public:
static const InterfaceId iid;
- virtual ~INode();
+ virtual ~Node();
/**
* \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 INode to create a trace resolver. This method
+ * Request the Node 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 INode into
+ * This unique id happens to be also the index of the Node 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 INode's list of
+ * \returns the index of the NetDevice into the Node'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 INode.
+ * \returns the requested NetDevice associated to this Node.
*/
Ptr<NetDevice> GetDevice (uint32_t index) const;
/**
* \returns the number of NetDevice instances associated
- * to this INode.
+ * to this Node.
*/
uint32_t GetNDevices (void) const;
/**
* \param application Application to associate to this node.
- * \returns the index of the Application within the INode's list
+ * \returns the index of the Application within the Node's list
* of Application.
*
- * Associated this Application to this INode. This method is called
+ * Associated this Application to this Node. 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 INode.
+ * within this Node.
*/
Ptr<Application> GetApplication (uint32_t index) const;
/**
- * \returns the number of applications associated to this INode.
+ * \returns the number of applications associated to this Node.
*/
uint32_t GetNApplications (void) const;
@@ -131,16 +131,16 @@
/**
* Must be invoked by subclasses only.
*/
- INode();
+ Node();
/**
* \param systemId a unique integer used for parallel simulations.
*
* Must be invoked by subclasses only.
*/
- INode(uint32_t systemId);
+ Node(uint32_t systemId);
/**
* The dispose method. Subclasses must override this method
- * and must chain up to it by calling INode::DoDispose at the
+ * and must chain up to it by calling Node::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 INode.
+ * \param device the device added to this Node.
*
- * This method is invoked whenever a user calls INode::AddDevice.
+ * This method is invoked whenever a user calls Node::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; // INode id for this node
+ uint32_t m_id; // Node 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 Fri May 25 21:53:24 2007 +0200
+++ b/src/node/net-device.cc Mon Jun 04 16:17:01 2007 +0200
@@ -32,7 +32,7 @@
const InterfaceId NetDevice::iid = MakeInterfaceId ("NetDevice", Object::iid);
-NetDevice::NetDevice(Ptr<INode> node, const MacAddress& addr) :
+NetDevice::NetDevice(Ptr<Node> node, const MacAddress& addr) :
m_node (node),
m_name(""),
m_ifIndex (0),
@@ -229,8 +229,8 @@
}
}
-Ptr<INode>
-NetDevice::GetINode (void) const
+Ptr<Node>
+NetDevice::GetNode (void) const
{
return m_node;
}
--- a/src/node/net-device.h Fri May 25 21:53:24 2007 +0200
+++ b/src/node/net-device.h Mon Jun 04 16:17:01 2007 +0200
@@ -31,7 +31,7 @@
namespace ns3 {
-class INode;
+class Node;
class TraceResolver;
class TraceContext;
class Channel;
@@ -166,7 +166,7 @@
* base class to print the nodeid for example, it can invoke
* this method.
*/
- Ptr<INode> GetINode (void) const;
+ Ptr<Node> GetNode (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<INode> node, const MacAddress& addr);
+ NetDevice(Ptr<Node> 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<INode> m_node;
+ Ptr<Node> m_node;
std::string m_name;
uint16_t m_ifIndex;
MacAddress m_address;
--- a/src/node/node-list.cc Fri May 25 21:53:24 2007 +0200
+++ b/src/node/node-list.cc Mon Jun 04 16:17:01 2007 +0200
@@ -49,26 +49,26 @@
NodeListPriv ();
~NodeListPriv ();
- uint32_t Add (Ptr<INode> node);
+ uint32_t Add (Ptr<Node> node);
NodeList::Iterator Begin (void);
NodeList::Iterator End (void);
TraceResolver *CreateTraceResolver (TraceContext const &context);
- INode *PeekINode (uint32_t n);
- Ptr<INode> GetINode (uint32_t n);
- uint32_t GetNINodes (void);
+ Node *PeekNode (uint32_t n);
+ Ptr<Node> GetNode (uint32_t n);
+ uint32_t GetNNodes (void);
private:
- std::vector<Ptr<INode> > m_nodes;
+ std::vector<Ptr<Node> > m_nodes;
};
NodeListPriv::NodeListPriv ()
{}
NodeListPriv::~NodeListPriv ()
{
- for (std::vector<Ptr<INode> >::iterator i = m_nodes.begin ();
+ for (std::vector<Ptr<Node> >::iterator i = m_nodes.begin ();
i != m_nodes.end (); i++)
{
- Ptr<INode> node = *i;
+ Ptr<Node> node = *i;
node->Dispose ();
*i = 0;
}
@@ -77,7 +77,7 @@
uint32_t
-NodeListPriv::Add (Ptr<INode> node)
+NodeListPriv::Add (Ptr<Node> node)
{
uint32_t index = m_nodes.size ();
m_nodes.push_back (node);
@@ -95,18 +95,18 @@
return m_nodes.end ();
}
uint32_t
-NodeListPriv::GetNINodes (void)
+NodeListPriv::GetNNodes (void)
{
return m_nodes.size ();
}
-INode *
-NodeListPriv::PeekINode (uint32_t n)
+Node *
+NodeListPriv::PeekNode (uint32_t n)
{
return PeekPointer (m_nodes[n]);
}
-Ptr<INode>
-NodeListPriv::GetINode (uint32_t n)
+Ptr<Node>
+NodeListPriv::GetNode (uint32_t n)
{
return m_nodes[n];
}
@@ -115,11 +115,11 @@
TraceResolver *
NodeListPriv::CreateTraceResolver (TraceContext const &context)
{
- ArrayTraceResolver<INode> *resolver =
- new ArrayTraceResolver<INode>
+ ArrayTraceResolver<Node> *resolver =
+ new ArrayTraceResolver<Node>
(context,
- MakeCallback (&NodeListPriv::GetNINodes, this),
- MakeCallback (&NodeListPriv::PeekINode, this));
+ MakeCallback (&NodeListPriv::GetNNodes, this),
+ MakeCallback (&NodeListPriv::PeekNode, this));
return resolver;
}
@@ -133,7 +133,7 @@
namespace ns3 {
uint32_t
-NodeList::Add (Ptr<INode> node)
+NodeList::Add (Ptr<Node> node)
{
return SimulationSingleton<NodeListPriv>::Get ()->Add (node);
}
@@ -152,10 +152,10 @@
{
return SimulationSingleton<NodeListPriv>::Get ()->CreateTraceResolver (context);
}
-Ptr<INode>
-NodeList::GetINode (uint32_t n)
+Ptr<Node>
+NodeList::GetNode (uint32_t n)
{
- return SimulationSingleton<NodeListPriv>::Get ()->GetINode (n);
+ return SimulationSingleton<NodeListPriv>::Get ()->GetNode (n);
}
--- a/src/node/node-list.h Fri May 25 21:53:24 2007 +0200
+++ b/src/node/node-list.h Mon Jun 04 16:17:01 2007 +0200
@@ -28,29 +28,29 @@
namespace ns3 {
-class INode;
+class Node;
class TraceResolver;
class TraceContext;
/**
* \brief the list of simulation nodes.
*
- * Every INode created is automatically added to this list.
+ * Every Node created is automatically added to this list.
*/
class NodeList
{
public:
- typedef ArrayTraceResolver<INode>::Index NodeIndex;
- typedef std::vector< Ptr<INode> >::iterator Iterator;
+ typedef ArrayTraceResolver<Node>::Index NodeIndex;
+ typedef std::vector< Ptr<Node> >::iterator Iterator;
/**
* \param node node to add
* \returns index of node in list.
*
- * This method is called automatically from INode::INode so
+ * This method is called automatically from Node::Node so
* the user has little reason to call it himself.
*/
- static uint32_t Add (Ptr<INode> node);
+ static uint32_t Add (Ptr<Node> node);
/**
* \returns a C++ iterator located at the beginning of this
* list.
@@ -71,9 +71,9 @@
/**
* \param n index of requested node.
- * \returns the INode associated to index n.
+ * \returns the Node associated to index n.
*/
- static Ptr<INode> GetINode (uint32_t n);
+ static Ptr<Node> GetNode (uint32_t n);
};
}//namespace ns3
--- a/src/node/socket.h Fri May 25 21:53:24 2007 +0200
+++ b/src/node/socket.h Mon Jun 04 16:17:01 2007 +0200
@@ -29,7 +29,7 @@
namespace ns3 {
-class INode;
+class Node;
/**
* \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<INode> GetINode (void) const = 0;
+ virtual Ptr<Node> GetNode (void) const = 0;
/**
* Allocate a free port number and