Comment 7 for bug 193195

Revision history for this message
sveri (sssssrichter) wrote : Re: [hardy] trickle upload limit blocks wget

I took a look at the trickle source.
Opening trickle.c you can see the following code:

main(int argc, char **argv)
{
 char *winsz = "200", verbosestr[16],
     *uplim = "10", *downlim = "10", *tsmooth = "3.0", *lsmooth = "20",
     *latency = "0";
.....

 while ((opt = getopt(argc, argv, "hvVsw:n:u:d:t:l:L:")) != -1)
                switch (opt) {
  case 'v':
   verbose++;
   break;
  case 'w':
   winsz = optarg;
   break;
  case 'u':
   uplim = optarg;
   break;
  case 'd':
   downlim = optarg;
   break;
  case 'V':
   errx(1, "version " VERSION);
   break;
  case 'n':
   strlcpy(sockname, optarg, sizeof(sockname));
   break;
  case 't':
   tsmooth = optarg;
   break;
  case 'l':
   lsmooth = optarg;
   break;
  case 's':
   standalone = 1;
   break;
  case 'L':
   latency = optarg;
   break;
                case 'h':
  default:
   usage();
  }
....
 setenv("TRICKLE_DOWNLOAD_LIMIT", downlim, 1);
 setenv("TRICKLE_UPLOAD_LIMIT", uplim, 1);
 setenv("TRICKLE_VERBOSE", verbosestr, 1);
 setenv("TRICKLE_WINDOW_SIZE", winsz, 1);
 setenv("TRICKLE_ARGV", argv[0], 1);
 setenv("TRICKLE_SOCKNAME", sockname, 1);
 setenv("TRICKLE_TSMOOTH", tsmooth, 1);
 setenv("TRICKLE_LSMOOTH", lsmooth, 1);
...
}
In my understanding this means that the dl rate is hardcoded, and if trickle is called without
the -d option the dl rate will remain at 10 k/s.

I dont know how to go on with this, just wanted to help a little bit :-)