Displaying 1 result from an estimated 1 matches for "set_special_sockopts".
2011 Nov 28
0
RFC: [PATCH] Add TCP congestion control and Diffserv options
...in the range of 0-63, and needs to be shifted left
+ * 2 places AND treated differently for ipv4 and ipv6.
+ * Setting TCP congestion control is rather Linux specific (at the moment)
+ * and sends a varying length string to setsockopt rather than an integer
+ * or character.
+*/
+
+void set_special_sockopts(int s)
+{
+#if defined(TCP_CONGESTION)
+ if(congestion_alg) {
+ if(setsockopt(s, SOL_TCP, TCP_CONGESTION, congestion_alg,
+ strlen(congestion_alg)) == -1)
+ rprintf(FINFO, "Couldn't set %s congestion algorithm\n",
+ congestion_alg);
+ }
+#endif
+
+/* setting the dif...