From 2f8b7f449e6ac24e7601f1b622f9c54688264bcc Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 26 Jan 2014 11:39:36 -0800 Subject: [PATCH] Dave Taht's anti-congestion patch. --- congestion.diff | 193 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 congestion.diff diff --git a/congestion.diff b/congestion.diff new file mode 100644 index 0000000..f830816 --- /dev/null +++ b/congestion.diff @@ -0,0 +1,193 @@ +From: Dave Taht + +In the bufferbloat age, anything that can make for a kinder, gentler bulk +transfer protocol seems desirable. + +This add support for user and server selectable congestion control algorithms. +As examples: + +--congestion-alg=lp # For the tcp-lp algorithm on the command line + +Or in a subsection: + +[mystuff] +congestion alg = westwood # for a wireless connection + +And diffserv support: --diffserv=8 for setting the CS1 bit + +This could be improved by being able to specify a list of congestion algorithms +to try, symbolic names for diffserv (CS1), a better name than 'congestion-alg', +and some error checking. + +To use this patch, run these commands for a successful build: + + patch -p1 ai_addr, res->ai_addrlen) < 0) { + if (connect_timeout < 0) +@@ -449,6 +483,7 @@ static int *open_socket_in(int type, int port, const char *bind_addr, + continue; + } + ++ set_special_sockopts(s); + setsockopt(s, SOL_SOCKET, SO_REUSEADDR, + (char *)&one, sizeof one); + if (sockopts) -- 2.34.1