From e3abeba0b541f5436d133db5c414182f1786bc56 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 4 Jun 2007 18:25:43 +0200 Subject: [PATCH] IIpv4 -> Ipv4 --- examples/simple-p2p.cc | 8 ++++---- src/devices/p2p/p2p-topology.cc | 10 +++++----- src/internet-node/arp-l3-protocol.h | 6 +++--- src/internet-node/ipv4-impl.h | 2 +- src/internet-node/ipv4-l3-protocol.h | 6 +++--- src/node/ipv4.cc | 8 ++++---- src/node/ipv4.h | 12 ++++++------ 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/examples/simple-p2p.cc b/examples/simple-p2p.cc index b3a3e3d0f..3b2e123e6 100644 --- a/examples/simple-p2p.cc +++ b/examples/simple-p2p.cc @@ -58,7 +58,7 @@ #include "ns3/p2p-net-device.h" #include "ns3/mac-address.h" #include "ns3/ipv4-address.h" -#include "ns3/i-ipv4.h" +#include "ns3/ipv4.h" #include "ns3/socket.h" #include "ns3/ipv4-route.h" #include "ns3/drop-tail.h" @@ -170,10 +170,10 @@ int main (int argc, char *argv[]) // Here, finish off packet routing configuration // This will likely set by some global StaticRouting object in the future - Ptr ipv4; - ipv4 = n0->QueryInterface (IIpv4::iid); + Ptr ipv4; + ipv4 = n0->QueryInterface (Ipv4::iid); ipv4->SetDefaultRoute (Ipv4Address ("10.1.1.2"), 1); - ipv4 = n3->QueryInterface (IIpv4::iid); + ipv4 = n3->QueryInterface (Ipv4::iid); ipv4->SetDefaultRoute (Ipv4Address ("10.1.3.1"), 1); // Configure tracing of all enqueue, dequeue, and NetDevice receive events diff --git a/src/devices/p2p/p2p-topology.cc b/src/devices/p2p/p2p-topology.cc index d15410aa3..0b0ee003b 100644 --- a/src/devices/p2p/p2p-topology.cc +++ b/src/devices/p2p/p2p-topology.cc @@ -29,7 +29,7 @@ #include "ns3/nstime.h" #include "ns3/internet-node.h" #include "ns3/ipv4-address.h" -#include "ns3/i-ipv4.h" +#include "ns3/ipv4.h" #include "ns3/queue.h" #include "p2p-channel.h" @@ -87,14 +87,14 @@ PointToPointTopology::AddIpv4Addresses( NS_ASSERT (nd1->GetNode ()->GetId () == n1->GetId ()); NS_ASSERT (nd2->GetNode ()->GetId () == n2->GetId ()); - Ptr ip1 = n1->QueryInterface (IIpv4::iid); + Ptr ip1 = n1->QueryInterface (Ipv4::iid); uint32_t index1 = ip1->AddInterface (nd1); ip1->SetAddress (index1, addr1); ip1->SetNetworkMask (index1, netmask); ip1->SetUp (index1); - Ptr ip2 = n2->QueryInterface (IIpv4::iid); + Ptr ip2 = n2->QueryInterface (Ipv4::iid); uint32_t index2 = ip2->AddInterface (nd2); ip2->SetAddress (index2, addr2); @@ -135,8 +135,8 @@ PointToPointTopology::AddIpv4Routes ( } // Assert that both are Ipv4 nodes - Ptr ip1 = nd1->GetNode ()->QueryInterface (IIpv4::iid); - Ptr ip2 = nd2->GetNode ()->QueryInterface (IIpv4::iid); + Ptr ip1 = nd1->GetNode ()->QueryInterface (Ipv4::iid); + Ptr ip2 = nd2->GetNode ()->QueryInterface (Ipv4::iid); NS_ASSERT(ip1 != 0 && ip2 != 0); // Get interface indexes for both nodes corresponding to the right channel diff --git a/src/internet-node/arp-l3-protocol.h b/src/internet-node/arp-l3-protocol.h index e31cc7b7f..d27d2dba2 100644 --- a/src/internet-node/arp-l3-protocol.h +++ b/src/internet-node/arp-l3-protocol.h @@ -18,8 +18,8 @@ * * Author: Mathieu Lacage */ -#ifndef ARP_H -#define ARP_H +#ifndef ARP_L3_PROTOCOL_H +#define ARP_L3_PROTOCOL_H #include #include "ns3/ipv4-address.h" @@ -79,4 +79,4 @@ private: }//namespace ns3 -#endif /* ARP_H */ +#endif /* ARP_L3_PROTOCOL_H */ diff --git a/src/internet-node/ipv4-impl.h b/src/internet-node/ipv4-impl.h index 49a174e3f..b9ac88495 100644 --- a/src/internet-node/ipv4-impl.h +++ b/src/internet-node/ipv4-impl.h @@ -28,7 +28,7 @@ namespace ns3 { class Ipv4L3Protocol; -class Ipv4Impl : public IIpv4 +class Ipv4Impl : public Ipv4 { public: Ipv4Impl (Ptr ipv4); diff --git a/src/internet-node/ipv4-l3-protocol.h b/src/internet-node/ipv4-l3-protocol.h index deb91f41d..7c9894d27 100644 --- a/src/internet-node/ipv4-l3-protocol.h +++ b/src/internet-node/ipv4-l3-protocol.h @@ -19,8 +19,8 @@ // Author: George F. Riley // -#ifndef IPV4_H -#define IPV4_H +#ifndef IPV4_L3_PROTOCOL_H +#define IPV4_L3_PROTOCOL_H #include #include @@ -177,4 +177,4 @@ private: } // Namespace ns3 -#endif +#endif /* IPV$_L3_PROTOCOL_H */ diff --git a/src/node/ipv4.cc b/src/node/ipv4.cc index 5b9c2146f..f99675e25 100644 --- a/src/node/ipv4.cc +++ b/src/node/ipv4.cc @@ -22,14 +22,14 @@ namespace ns3 { -const InterfaceId IIpv4::iid = MakeInterfaceId ("IIpv4", Object::iid); +const InterfaceId Ipv4::iid = MakeInterfaceId ("Ipv4", Object::iid); -IIpv4::IIpv4 () +Ipv4::Ipv4 () { - SetInterfaceId (IIpv4::iid); + SetInterfaceId (Ipv4::iid); } -IIpv4::~IIpv4 () +Ipv4::~Ipv4 () {} } // namespace ns3 diff --git a/src/node/ipv4.h b/src/node/ipv4.h index d4049cf36..b4e3d60d8 100644 --- a/src/node/ipv4.h +++ b/src/node/ipv4.h @@ -18,8 +18,8 @@ * * Author: Mathieu Lacage */ -#ifndef I_IPV4_H -#define I_IPV4_H +#ifndef IPV4_H +#define IPV4_H #include #include "ns3/ipv4-address.h" @@ -40,12 +40,12 @@ class Ipv4Route; * This class also allows you to control the content of the ipv4 * forwarding table. */ -class IIpv4 : public Object +class Ipv4 : public Object { public: static const InterfaceId iid; - IIpv4 (); - virtual ~IIpv4 (); + Ipv4 (); + virtual ~Ipv4 (); /** * \param dest destination address @@ -188,4 +188,4 @@ public: } // namespace ns3 -#endif /* I_IPV4_H */ +#endif /* IPV4_H */