--- a/src/internet-node/internet-node.cc Mon Jun 04 17:18:02 2007 +0200
+++ b/src/internet-node/internet-node.cc Mon Jun 04 17:22:52 2007 +0200
@@ -56,7 +56,7 @@
{
Ptr<Ipv4L3Protocol> ipv4 = Create<Ipv4L3Protocol> (this);
Ptr<ArpL3Protocol> arp = Create<ArpL3Protocol> (this);
- Ptr<Udp> udp = Create<Udp> (this);
+ Ptr<UdpL4Protocol> udp = Create<UdpL4Protocol> (this);
Ptr<L3Demux> l3Demux = Create<L3Demux> (this);
Ptr<Ipv4L4Demux> ipv4L4Demux = Create<Ipv4L4Demux> (this);
--- a/src/internet-node/udp-impl.cc Mon Jun 04 17:18:02 2007 +0200
+++ b/src/internet-node/udp-impl.cc Mon Jun 04 17:22:52 2007 +0200
@@ -25,7 +25,7 @@
namespace ns3 {
-IUdpImpl::IUdpImpl (Ptr<Udp> udp)
+IUdpImpl::IUdpImpl (Ptr<UdpL4Protocol> udp)
: m_udp (udp)
{}
IUdpImpl::~IUdpImpl ()
--- a/src/internet-node/udp-impl.h Mon Jun 04 17:18:02 2007 +0200
+++ b/src/internet-node/udp-impl.h Mon Jun 04 17:22:52 2007 +0200
@@ -26,12 +26,12 @@
namespace ns3 {
-class Udp;
+class UdpL4Protocol;
class IUdpImpl : public IUdp
{
public:
- IUdpImpl (Ptr<Udp> udp);
+ IUdpImpl (Ptr<UdpL4Protocol> udp);
virtual ~IUdpImpl ();
virtual Ptr<Socket> CreateSocket (void);
@@ -39,7 +39,7 @@
protected:
virtual void DoDispose (void);
private:
- Ptr<Udp> m_udp;
+ Ptr<UdpL4Protocol> m_udp;
};
} // namespace ns3
--- a/src/internet-node/udp-l4-protocol.cc Mon Jun 04 17:18:02 2007 +0200
+++ b/src/internet-node/udp-l4-protocol.cc Mon Jun 04 17:22:52 2007 +0200
@@ -36,25 +36,25 @@
namespace ns3 {
/* see http://www.iana.org/assignments/protocol-numbers */
-const uint8_t Udp::PROT_NUMBER = 17;
+const uint8_t UdpL4Protocol::PROT_NUMBER = 17;
-Udp::Udp (Ptr<Node> node)
+UdpL4Protocol::UdpL4Protocol (Ptr<Node> node)
: Ipv4L4Protocol (PROT_NUMBER, 2),
m_node (node),
m_endPoints (new Ipv4EndPointDemux ())
{}
-Udp::~Udp ()
+UdpL4Protocol::~UdpL4Protocol ()
{}
TraceResolver *
-Udp::CreateTraceResolver (TraceContext const &context)
+UdpL4Protocol::CreateTraceResolver (TraceContext const &context)
{
return new EmptyTraceResolver (context);
}
void
-Udp::DoDispose (void)
+UdpL4Protocol::DoDispose (void)
{
if (m_endPoints != 0)
{
@@ -66,34 +66,34 @@
}
Ptr<Socket>
-Udp::CreateSocket (void)
+UdpL4Protocol::CreateSocket (void)
{
Ptr<Socket> socket = Create<UdpSocket> (m_node, this);
return socket;
}
Ipv4EndPoint *
-Udp::Allocate (void)
+UdpL4Protocol::Allocate (void)
{
return m_endPoints->Allocate ();
}
Ipv4EndPoint *
-Udp::Allocate (Ipv4Address address)
+UdpL4Protocol::Allocate (Ipv4Address address)
{
return m_endPoints->Allocate (address);
}
Ipv4EndPoint *
-Udp::Allocate (uint16_t port)
+UdpL4Protocol::Allocate (uint16_t port)
{
return m_endPoints->Allocate (port);
}
Ipv4EndPoint *
-Udp::Allocate (Ipv4Address address, uint16_t port)
+UdpL4Protocol::Allocate (Ipv4Address address, uint16_t port)
{
return m_endPoints->Allocate (address, port);
}
Ipv4EndPoint *
-Udp::Allocate (Ipv4Address localAddress, uint16_t localPort,
+UdpL4Protocol::Allocate (Ipv4Address localAddress, uint16_t localPort,
Ipv4Address peerAddress, uint16_t peerPort)
{
return m_endPoints->Allocate (localAddress, localPort,
@@ -101,13 +101,13 @@
}
void
-Udp::DeAllocate (Ipv4EndPoint *endPoint)
+UdpL4Protocol::DeAllocate (Ipv4EndPoint *endPoint)
{
m_endPoints->DeAllocate (endPoint);
}
void
-Udp::Receive(Packet& packet,
+UdpL4Protocol::Receive(Packet& packet,
Ipv4Address const &source,
Ipv4Address const &destination)
{
@@ -123,7 +123,7 @@
}
void
-Udp::Send (Packet packet,
+UdpL4Protocol::Send (Packet packet,
Ipv4Address saddr, Ipv4Address daddr,
uint16_t sport, uint16_t dport)
{
--- a/src/internet-node/udp-l4-protocol.h Mon Jun 04 17:18:02 2007 +0200
+++ b/src/internet-node/udp-l4-protocol.h Mon Jun 04 17:22:52 2007 +0200
@@ -19,8 +19,8 @@
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
*/
-#ifndef UDP_H
-#define UDP_H
+#ifndef UDP_L4_PROTOCOL_H
+#define UDP_L4_PROTOCOL_H
#include <stdint.h>
@@ -39,15 +39,15 @@
/**
* \brief Implementation of the UDP protocol
*/
-class Udp : public Ipv4L4Protocol {
+class UdpL4Protocol : public Ipv4L4Protocol {
public:
static const uint8_t PROT_NUMBER;
/**
* \brief Constructor
* \param node The node this protocol is associated with
*/
- Udp (Ptr<Node> node);
- virtual ~Udp ();
+ UdpL4Protocol (Ptr<Node> node);
+ virtual ~UdpL4Protocol ();
virtual TraceResolver *CreateTraceResolver (TraceContext const &context);
/**
@@ -96,4 +96,4 @@
}; // namespace ns3
-#endif /* UDP_H */
+#endif /* UDP_L4_PROTOCOL_H */
--- a/src/internet-node/udp-socket.cc Mon Jun 04 17:18:02 2007 +0200
+++ b/src/internet-node/udp-socket.cc Mon Jun 04 17:22:52 2007 +0200
@@ -26,7 +26,7 @@
namespace ns3 {
-UdpSocket::UdpSocket (Ptr<Node> node, Ptr<Udp> udp)
+UdpSocket::UdpSocket (Ptr<Node> node, Ptr<UdpL4Protocol> udp)
: m_endPoint (0),
m_node (node),
m_udp (udp),
--- a/src/internet-node/udp-socket.h Mon Jun 04 17:18:02 2007 +0200
+++ b/src/internet-node/udp-socket.h Mon Jun 04 17:22:52 2007 +0200
@@ -31,7 +31,7 @@
class Ipv4EndPoint;
class Node;
class Packet;
-class Udp;
+class UdpL4Protocol;
class UdpSocket : public Socket
{
@@ -39,7 +39,7 @@
/**
* Create an unbound udp socket.
*/
- UdpSocket (Ptr<Node> node, Ptr<Udp> udp);
+ UdpSocket (Ptr<Node> node, Ptr<UdpL4Protocol> udp);
virtual ~UdpSocket ();
virtual enum SocketErrno GetErrno (void) const;
@@ -83,7 +83,7 @@
Ipv4EndPoint *m_endPoint;
Ptr<Node> m_node;
- Ptr<Udp> m_udp;
+ Ptr<UdpL4Protocol> m_udp;
Ipv4Address m_defaultAddress;
uint16_t m_defaultPort;
Callback<void,Ptr<Socket>,uint32_t,const Ipv4Address &,uint16_t> m_dummyRxCallback;