summaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorIlpo Järvinen2007-12-31 13:48:41 +0100
committerDavid S. Miller2008-01-29 00:00:22 +0100
commit90840defabbd819180c7528e12d550776848f833 (patch)
tree865c98dbf50a08b35cb8b91e1348f10c87fae945 /include/net/tcp.h
parent[TCP]: Rename update_send_head & include related increment to it (diff)
downloadkernel-qcow2-linux-90840defabbd819180c7528e12d550776848f833.tar.gz
kernel-qcow2-linux-90840defabbd819180c7528e12d550776848f833.tar.xz
kernel-qcow2-linux-90840defabbd819180c7528e12d550776848f833.zip
[TCP]: Introduce tcp_wnd_end() to reduce line lengths
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 76286e80205a..6a732d4919fe 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -785,6 +785,12 @@ static __inline__ __u32 tcp_max_burst(const struct tcp_sock *tp)
return 3;
}
+/* Returns end sequence number of the receiver's advertised window */
+static inline u32 tcp_wnd_end(const struct tcp_sock *tp)
+{
+ return tp->snd_una + tp->snd_wnd;
+}
+
/* RFC2861 Check whether we are limited by application or congestion window
* This is the inverse of cwnd check in tcp_tso_should_defer
*/