Mercurial > dropbear
comparison dbutil.c @ 629:bdadc7f4b97d
Set IPTOS_LOWDELAY for IPv6 too
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 26 Oct 2011 16:02:06 +0000 |
parents | 7cc34a52feb8 |
children | 452bcf810e44 |
comparison
equal
deleted
inserted
replaced
628:d40f3cc47aed | 629:bdadc7f4b97d |
---|---|
159 | 159 |
160 /* disable nagle */ | 160 /* disable nagle */ |
161 val = 1; | 161 val = 1; |
162 setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void*)&val, sizeof(val)); | 162 setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void*)&val, sizeof(val)); |
163 | 163 |
164 /* set the TOS bit. note that this will fail for ipv6, I can't find any | 164 /* set the TOS bit for either ipv4 or ipv6 */ |
165 * equivalent. */ | |
166 #ifdef IPTOS_LOWDELAY | 165 #ifdef IPTOS_LOWDELAY |
167 val = IPTOS_LOWDELAY; | 166 val = IPTOS_LOWDELAY; |
167 #ifdef IPPROTO_IPV6 | |
168 setsockopt(sock, IPPROTO_IPV6, IPV6_TCLASS, (void*)&val, sizeof(val)); | |
169 #endif | |
168 setsockopt(sock, IPPROTO_IP, IP_TOS, (void*)&val, sizeof(val)); | 170 setsockopt(sock, IPPROTO_IP, IP_TOS, (void*)&val, sizeof(val)); |
169 #endif | 171 #endif |
170 | 172 |
171 #ifdef SO_PRIORITY | 173 #ifdef SO_PRIORITY |
172 /* linux specific, sets QoS class. | 174 /* linux specific, sets QoS class. |