Minor DSCP-related improvements

- Improved usage annotation
- Shifted DSCP value to set not whole DS field, but only it's DSCP part
pull/188/head
Alexander Amanuel 2014-01-29 20:17:14 +04:00
parent 46a251e346
commit 96a77e42d1
2 changed files with 4 additions and 2 deletions

View File

@ -125,7 +125,8 @@ public:
void applyIpDscp(); void applyIpDscp();
static void setIpDscp(int ipDscp) static void setIpDscp(int ipDscp)
{ {
ipDscp_ = ipDscp; // Here we prepare DSCP value for IPTOS option, which sets whole DS field
ipDscp_ = ipDscp << 2;
} }
void create(int family, int protocol = 0); void create(int family, int protocol = 0);

View File

@ -959,4 +959,5 @@
" seconds. If 0 is given, file will be saved only\n" \ " seconds. If 0 is given, file will be saved only\n" \
" when aria2 exits.") " when aria2 exits.")
#define TEXT_DSCP \ #define TEXT_DSCP \
_(" --dscp=DSCP Set DSCP code") _(" --dscp=DSCP Set DSCP value in outgoing IP packets of\n" \
" BitTorrent traffic for QoS.")