diff options
author | Roger Dingledine <arma@torproject.org> | 2004-01-10 23:40:38 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-01-10 23:40:38 +0000 |
commit | 50863008150caa3a71fd2d8f5f9c18292ed13c24 (patch) | |
tree | 0d2306675a83318d1514286f07fcd742e783d621 /src/or/config.c | |
parent | db0c27b36204330a985c6a86be4604856d6d4ca2 (diff) | |
download | tor-50863008150caa3a71fd2d8f5f9c18292ed13c24.tar tor-50863008150caa3a71fd2d8f5f9c18292ed13c24.tar.gz |
split the token bucket into 'rate' and 'burst' params
we're not entirely migrated to burst yet, for backward compatibility
note some win32 probable-bugs
clean up routerlist.c
svn:r982
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c index 16efde10e..a42ea6ec5 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -153,6 +153,9 @@ static void config_assign(or_options_t *options, struct config_line *list) { /* string options */ config_compare(list, "Address", CONFIG_TYPE_STRING, &options->Address) || + config_compare(list, "BandwidthRate", CONFIG_TYPE_INT, &options->BandwidthRate) || + config_compare(list, "BandwidthBurst", CONFIG_TYPE_INT, &options->BandwidthBurst) || + config_compare(list, "DebugLogFile", CONFIG_TYPE_STRING, &options->DebugLogFile) || config_compare(list, "DataDirectory", CONFIG_TYPE_STRING, &options->DataDirectory) || config_compare(list, "DirPort", CONFIG_TYPE_INT, &options->DirPort) || @@ -194,7 +197,6 @@ static void config_assign(or_options_t *options, struct config_line *list) { config_compare(list, "SocksPort", CONFIG_TYPE_INT, &options->SocksPort) || config_compare(list, "SocksBindAddress",CONFIG_TYPE_STRING,&options->SocksBindAddress) || - config_compare(list, "TotalBandwidth", CONFIG_TYPE_INT, &options->TotalBandwidth) || config_compare(list, "TrafficShaping", CONFIG_TYPE_BOOL, &options->TrafficShaping) || config_compare(list, "User", CONFIG_TYPE_STRING, &options->User) @@ -211,10 +213,11 @@ static void config_assign(or_options_t *options, struct config_line *list) { /* prints the usage of tor. */ void print_usage(void) { printf("tor -f <torrc> [args]\n" + "See man page for more options.\n\n" + "-b <bandwidth>\t\tbytes/second rate limiting\n" "-d <file>\t\tDebug file\n" "-m <max>\t\tMax number of connections\n" "-l <level>\t\tLog level\n" - "-t <bandwidth>\t\tTotal bandwidth\n" "-r <file>\t\tList of known routers\n"); printf("\nClient options:\n" "-e \"nick1 nick2 ...\"\t\tExit nodes\n" @@ -269,7 +272,8 @@ void init_options(or_options_t *options) { options->KeepalivePeriod = 300; options->MaxOnionsPending = 100; options->NewCircuitPeriod = 60; /* once a minute */ - options->TotalBandwidth = 800000; /* at most 800kB/s total sustained incoming */ + options->BandwidthRate = 800000; /* at most 800kB/s total sustained incoming */ + options->BandwidthBurst = 10000000; /* max burst on the token bucket */ options->NumCpus = 1; } |