From 97d98fa1cef9454ced97b0cabcb9b1a85aecaa80 Mon Sep 17 00:00:00 2001 From: Raj Bhattacharjea Date: Fri, 6 Jun 2008 11:42:19 -0700 Subject: [PATCH] bug 195: naming inconsistency. --- src/internet-node/udp-header.cc | 8 ++++---- src/internet-node/udp-header.h | 8 ++++---- src/internet-node/udp-l4-protocol.cc | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/internet-node/udp-header.cc b/src/internet-node/udp-header.cc index df3cae153..92cd4164b 100644 --- a/src/internet-node/udp-header.cc +++ b/src/internet-node/udp-header.cc @@ -51,22 +51,22 @@ UdpHeader::EnableChecksums (void) } void -UdpHeader::SetDestination (uint16_t port) +UdpHeader::SetDestinationPort (uint16_t port) { m_destinationPort = port; } void -UdpHeader::SetSource (uint16_t port) +UdpHeader::SetSourcePort (uint16_t port) { m_sourcePort = port; } uint16_t -UdpHeader::GetSource (void) const +UdpHeader::GetSourcePort (void) const { return m_sourcePort; } uint16_t -UdpHeader::GetDestination (void) const +UdpHeader::GetDestinationPort (void) const { return m_destinationPort; } diff --git a/src/internet-node/udp-header.h b/src/internet-node/udp-header.h index 140684986..a7bbf23e2 100644 --- a/src/internet-node/udp-header.h +++ b/src/internet-node/udp-header.h @@ -49,19 +49,19 @@ public: /** * \param port the destination port for this UdpHeader */ - void SetDestination (uint16_t port); + void SetDestinationPort (uint16_t port); /** * \param port The source port for this UdpHeader */ - void SetSource (uint16_t port); + void SetSourcePort (uint16_t port); /** * \return The source port for this UdpHeader */ - uint16_t GetSource (void) const; + uint16_t GetSourcePort (void) const; /** * \return the destination port for this UdpHeader */ - uint16_t GetDestination (void) const; + uint16_t GetDestinationPort (void) const; /** * \param size The payload size in bytes */ diff --git a/src/internet-node/udp-l4-protocol.cc b/src/internet-node/udp-l4-protocol.cc index f3b85e15e..7a8c58152 100644 --- a/src/internet-node/udp-l4-protocol.cc +++ b/src/internet-node/udp-l4-protocol.cc @@ -155,12 +155,12 @@ UdpL4Protocol::Receive(Ptr packet, UdpHeader udpHeader; packet->RemoveHeader (udpHeader); Ipv4EndPointDemux::EndPoints endPoints = - m_endPoints->Lookup (destination, udpHeader.GetDestination (), - source, udpHeader.GetSource (), interface); + m_endPoints->Lookup (destination, udpHeader.GetDestinationPort (), + source, udpHeader.GetSourcePort (), interface); for (Ipv4EndPointDemux::EndPointsI endPoint = endPoints.begin (); endPoint != endPoints.end (); endPoint++) { - (*endPoint)->ForwardUp (packet->Copy (), source, udpHeader.GetSource ()); + (*endPoint)->ForwardUp (packet->Copy (), source, udpHeader.GetSourcePort ()); } } @@ -172,8 +172,8 @@ UdpL4Protocol::Send (Ptr packet, NS_LOG_FUNCTION (this << packet << saddr << daddr << sport << dport); UdpHeader udpHeader; - udpHeader.SetDestination (dport); - udpHeader.SetSource (sport); + udpHeader.SetDestinationPort (dport); + udpHeader.SetSourcePort (sport); udpHeader.SetPayloadSize (packet->GetSize ()); udpHeader.InitializeChecksum (saddr, daddr,