X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwinplink.c;h=ac4dab299fe19ffb0bb5de3f268da1b904feab7f;hb=21101c7397e460933635a7bfed813864fc4f88fe;hp=43f53bb0426829891504e07b911b9b870b660fd0;hpb=9e20c81bc9c945565dd182854eeffa03b63f830a;p=PuTTY.git diff --git a/windows/winplink.c b/windows/winplink.c index 43f53bb0..ac4dab29 100644 --- a/windows/winplink.c +++ b/windows/winplink.c @@ -212,6 +212,11 @@ static void usage(void) printf(" -N don't start a shell/command (SSH-2 only)\n"); printf(" -nc host:port\n"); printf(" open tunnel in place of session (SSH-2 only)\n"); + printf(" -sshlog file\n"); + printf(" -sshrawlog file\n"); + printf(" log protocol details to a file\n"); + printf(" -shareexists\n"); + printf(" test whether a connection-sharing upstream exists\n"); exit(1); } @@ -303,6 +308,7 @@ int main(int argc, char **argv) int errors; int got_host = FALSE; int use_subsystem = 0; + int just_test_share_exists = FALSE; unsigned long now, next, then; sklist = NULL; @@ -364,6 +370,8 @@ int main(int argc, char **argv) } else if (!strcmp(p, "-pgpfp")) { pgp_fingerprints(); exit(1); + } else if (!strcmp(p, "-shareexists")) { + just_test_share_exists = TRUE; } else { fprintf(stderr, "plink: unknown option \"%s\"\n", p); errors = 1; @@ -596,6 +604,19 @@ int main(int argc, char **argv) logctx = log_init(NULL, conf); console_provide_logctx(logctx); + if (just_test_share_exists) { + if (!back->test_for_upstream) { + fprintf(stderr, "Connection sharing not supported for connection " + "type '%s'\n", back->name); + return 1; + } + if (back->test_for_upstream(conf_get_str(conf, CONF_host), + conf_get_int(conf, CONF_port), conf)) + return 0; + else + return 1; + } + /* * Start up the connection. */