--- a/src/internet/model/tcp-newreno.cc Mon Jul 13 17:56:15 2015 -0700
+++ b/src/internet/model/tcp-newreno.cc Mon Jul 13 17:57:09 2015 -0700
@@ -75,14 +75,6 @@
{
}
-/* Limit the size of in-flight data by cwnd and receiver's rxwin */
-uint32_t
-TcpNewReno::Window (void)
-{
- NS_LOG_FUNCTION (this);
- return std::min (m_rWnd.Get (), m_cWnd.Get ());
-}
-
Ptr<TcpSocketBase>
TcpNewReno::Fork (void)
{
--- a/src/internet/model/tcp-newreno.h Mon Jul 13 17:56:15 2015 -0700
+++ b/src/internet/model/tcp-newreno.h Mon Jul 13 17:57:09 2015 -0700
@@ -53,7 +53,6 @@
virtual ~TcpNewReno (void);
protected:
- virtual uint32_t Window (void); // Return the max possible number of unacked bytes
virtual Ptr<TcpSocketBase> Fork (void); // Call CopyObject<TcpNewReno> to clone me
virtual void NewAck (SequenceNumber32 const& seq); // Inc cwnd and call NewAck() of parent
virtual void DupAck (const TcpHeader& t, uint32_t count); // Halving cwnd and reset nextTxSequence
--- a/src/internet/model/tcp-reno.cc Mon Jul 13 17:56:15 2015 -0700
+++ b/src/internet/model/tcp-reno.cc Mon Jul 13 17:57:09 2015 -0700
@@ -67,14 +67,6 @@
{
}
-/* Limit the size of in-flight data by cwnd and receiver's rxwin */
-uint32_t
-TcpReno::Window (void)
-{
- NS_LOG_FUNCTION (this);
- return std::min (m_rWnd.Get (), m_cWnd.Get ());
-}
-
Ptr<TcpSocketBase>
TcpReno::Fork (void)
{
--- a/src/internet/model/tcp-reno.h Mon Jul 13 17:56:15 2015 -0700
+++ b/src/internet/model/tcp-reno.h Mon Jul 13 17:57:09 2015 -0700
@@ -55,7 +55,6 @@
virtual ~TcpReno (void);
protected:
- virtual uint32_t Window (void); // Return the max possible number of unacked bytes
virtual Ptr<TcpSocketBase> Fork (void); // Call CopyObject<TcpReno> to clone me
virtual void NewAck (const SequenceNumber32& seq); // Inc cwnd and call NewAck() of parent
virtual void DupAck (const TcpHeader& t, uint32_t count); // Fast retransmit
--- a/src/internet/model/tcp-socket-base.cc Mon Jul 13 17:56:15 2015 -0700
+++ b/src/internet/model/tcp-socket-base.cc Mon Jul 13 17:57:09 2015 -0700
@@ -2081,6 +2081,13 @@
}
uint32_t
+TcpSocketBase::Window (void)
+{
+ NS_LOG_FUNCTION (this);
+ return std::min (m_rWnd.Get (), m_cWnd.Get ());
+}
+
+uint32_t
TcpSocketBase::AvailableWindow ()
{
NS_LOG_FUNCTION_NOARGS ();
--- a/src/internet/model/tcp-socket-base.h Mon Jul 13 17:56:15 2015 -0700
+++ b/src/internet/model/tcp-socket-base.h Mon Jul 13 17:57:09 2015 -0700
@@ -514,7 +514,7 @@
* \brief Return the max possible number of unacked bytes
* \returns the max possible number of unacked bytes
*/
- virtual uint32_t Window (void) = 0;
+ virtual uint32_t Window (void);
/**
* \brief Return unfilled portion of window
--- a/src/internet/model/tcp-tahoe.cc Mon Jul 13 17:56:15 2015 -0700
+++ b/src/internet/model/tcp-tahoe.cc Mon Jul 13 17:57:09 2015 -0700
@@ -66,14 +66,6 @@
{
}
-/* Limit the size of in-flight data by cwnd and receiver's rxwin */
-uint32_t
-TcpTahoe::Window (void)
-{
- NS_LOG_FUNCTION (this);
- return std::min (m_rWnd.Get (), m_cWnd.Get ());
-}
-
Ptr<TcpSocketBase>
TcpTahoe::Fork (void)
{
--- a/src/internet/model/tcp-tahoe.h Mon Jul 13 17:56:15 2015 -0700
+++ b/src/internet/model/tcp-tahoe.h Mon Jul 13 17:57:09 2015 -0700
@@ -59,7 +59,6 @@
virtual ~TcpTahoe (void);
protected:
- virtual uint32_t Window (void); // Return the max possible number of unacked bytes
virtual Ptr<TcpSocketBase> Fork (void); // Call CopyObject<TcpTahoe> to clone me
virtual void NewAck (SequenceNumber32 const& seq); // Inc cwnd and call NewAck() of parent
virtual void DupAck (const TcpHeader& t, uint32_t count); // Treat 3 dupack as timeout
--- a/src/internet/model/tcp-westwood.cc Mon Jul 13 17:56:15 2015 -0700
+++ b/src/internet/model/tcp-westwood.cc Mon Jul 13 17:57:09 2015 -0700
@@ -106,13 +106,6 @@
{
}
-uint32_t
-TcpWestwood::Window (void)
-{
- NS_LOG_FUNCTION (this);
- return std::min (m_rWnd.Get (), m_cWnd.Get ());
-}
-
Ptr<TcpSocketBase>
TcpWestwood::Fork (void)
{
--- a/src/internet/model/tcp-westwood.h Mon Jul 13 17:56:15 2015 -0700
+++ b/src/internet/model/tcp-westwood.h Mon Jul 13 17:57:09 2015 -0700
@@ -95,7 +95,6 @@
};
protected:
- virtual uint32_t Window (void); // Return the max possible number of unacked bytes
virtual Ptr<TcpSocketBase> Fork (void); // Call CopyObject<TcpTahoe> to clone me
virtual void NewAck (SequenceNumber32 const& seq); // Inc cwnd and call NewAck() of parent
virtual void DupAck (const TcpHeader& t, uint32_t count); // Treat 3 dupack as timeout