Skip to content

Commit

Permalink
[cli] recognize that
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuho committed Nov 6, 2023
1 parent 52dd84a commit fb8d6bc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,7 @@ int main(int argc, char **argv)
static const struct option longopts[] = {{"ech-key", required_argument, NULL, 0},
{"ech-configs", required_argument, NULL, 0},
{"disable-ecn", no_argument, NULL, 0},
{"default-jumpstart", required_argument, NULL, 0},
{"max-jumpstart", required_argument, NULL, 0},
{NULL}};
while ((ch = getopt_long(argc, argv, "a:b:B:c:C:Dd:k:Ee:f:Gi:I:K:l:M:m:NnOp:P:Rr:S:s:u:U:Vvw:W:x:X:y:h", longopts,
Expand All @@ -1213,6 +1214,11 @@ int main(int argc, char **argv)
ech_setup_configs(optarg);
} else if (strcmp(longopts[opt_index].name, "disable-ecn") == 0) {
ctx.enable_ecn = 0;
} else if (strcmp(longopts[opt_index].name, "default-jumpstart") == 0) {
if (sscanf(optarg, "%" SCNu32, &ctx.default_jumpstart_cwnd_bytes) != 1) {
fprintf(stderr, "failed to parse default jumpstart size: %s\n", optarg);
exit(1);
}
} else if (strcmp(longopts[opt_index].name, "max-jumpstart") == 0) {
if (sscanf(optarg, "%" SCNu32, &ctx.max_jumpstart_cwnd_bytes) != 1) {
fprintf(stderr, "failed to parse max jumpstart size: %s\n", optarg);
Expand Down

0 comments on commit fb8d6bc

Please sign in to comment.