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 :-)
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) { sockname, optarg, sizeof(sockname));
case 'h': "TRICKLE_ DOWNLOAD_ LIMIT", downlim, 1); "TRICKLE_ UPLOAD_ LIMIT", uplim, 1); "TRICKLE_ VERBOSE" , verbosestr, 1); "TRICKLE_ WINDOW_ SIZE", winsz, 1); "TRICKLE_ ARGV", argv[0], 1); "TRICKLE_ SOCKNAME" , sockname, 1); "TRICKLE_ TSMOOTH" , tsmooth, 1); "TRICKLE_ LSMOOTH" , lsmooth, 1);
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(
break;
case 't':
tsmooth = optarg;
break;
case 'l':
lsmooth = optarg;
break;
case 's':
standalone = 1;
break;
case 'L':
latency = optarg;
break;
default:
usage();
}
....
setenv(
setenv(
setenv(
setenv(
setenv(
setenv(
setenv(
setenv(
...
}
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 :-)