From 72e6c85e3d2374394f5ab8d0c43e886307a3ea38 Mon Sep 17 00:00:00 2001 From: Dave Taht Date: Thu, 12 Apr 2012 18:53:56 -0700 Subject: [PATCH] Set diffserv values to AF42 + ECT AF42 has both the properties of CS42 and the IMM bit. Whether this has the advantages or disadvantages of just one or the other, I don't know. With most mac80211 stacks this will force mosh packets in the VI queue on wireless. As for pfifo_fast, have to look it up... --- src/network/network.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/network/network.cc b/src/network/network.cc index 1af2925..47b874e 100644 --- a/src/network/network.cc +++ b/src/network/network.cc @@ -114,6 +114,12 @@ void Connection::setup( void ) throw NetworkException( "setsockopt", errno ); } #endif + + /* set diffserv values to AF42 + ECT */ + uint8_t dscp = 0x92; + if ( setsockopt( sock, IPPROTO_IP, IP_TOS, &dscp, 1) < 0 ) { + throw NetworkException( "setsockopt on tos setting", errno ); + } } Connection::Connection( const char *desired_ip, const char *desired_port ) /* server */