Mercurial > dropbear
comparison cli-runopts.c @ 62:20563735e8b5
just checkpointing
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 10 Aug 2004 17:09:52 +0000 |
parents | 6f091656c100 |
children | efb5e0b335cf |
comparison
equal
deleted
inserted
replaced
61:3a4f0ef1e8c3 | 62:20563735e8b5 |
---|---|
46 "-t Allocate a pty\n" | 46 "-t Allocate a pty\n" |
47 "-T Don't allocate a pty\n" | 47 "-T Don't allocate a pty\n" |
48 #ifdef DROPBEAR_PUBKEY_AUTH | 48 #ifdef DROPBEAR_PUBKEY_AUTH |
49 "-i <identityfile> (multiple allowed)\n" | 49 "-i <identityfile> (multiple allowed)\n" |
50 #endif | 50 #endif |
51 #ifndef DISABLE_REMOTETCPFWD | |
52 "-L <listenport:remotehsot:reportport> Local port forwarding\n" | |
53 #endif | |
54 #ifndef DISABLE_TCPFWD_DIRECT | |
55 "-R <listenport:remotehost:remoteport> Remote port forwarding\n" | |
56 #endif | |
51 ,DROPBEAR_VERSION, cli_opts.progname); | 57 ,DROPBEAR_VERSION, cli_opts.progname); |
52 } | 58 } |
53 | 59 |
54 void cli_getopts(int argc, char ** argv) { | 60 void cli_getopts(int argc, char ** argv) { |
55 | 61 |
56 unsigned int i, j; | 62 unsigned int i, j; |
57 char ** next = 0; | 63 char ** next = 0; |
58 unsigned int cmdlen; | 64 unsigned int cmdlen; |
59 #ifdef DROPBEAR_PUBKEY_AUTH | 65 #ifdef DROPBEAR_PUBKEY_AUTH |
60 int nextiskey = 0; /* A flag if the next argument is a keyfile */ | 66 int nextiskey = 0; /* A flag if the next argument is a keyfile */ |
67 #endif | |
68 #ifdef DROPBEAR_CLI_LOCALTCP | |
69 int nextislocal = 0; | |
70 #endif | |
71 #ifdef DROPBEAR_CLI_REMOTETCP | |
72 int nextisremote = 0; | |
61 #endif | 73 #endif |
62 | 74 |
63 | 75 |
64 | 76 |
65 /* see printhelp() for options */ | 77 /* see printhelp() for options */ |
69 cli_opts.username = NULL; | 81 cli_opts.username = NULL; |
70 cli_opts.cmd = NULL; | 82 cli_opts.cmd = NULL; |
71 cli_opts.wantpty = 9; /* 9 means "it hasn't been touched", gets set later */ | 83 cli_opts.wantpty = 9; /* 9 means "it hasn't been touched", gets set later */ |
72 #ifdef DROPBEAR_PUBKEY_AUTH | 84 #ifdef DROPBEAR_PUBKEY_AUTH |
73 cli_opts.pubkeys = NULL; | 85 cli_opts.pubkeys = NULL; |
86 #endif | |
87 #ifdef DROPBEAR_CLI_LOCALTCP | |
88 cli_opts.localports = NULL; | |
89 #endif | |
90 #ifdef DROPBEAR_CLI_REMOTETCP | |
91 cli_opts.remoteports = NULL; | |
74 #endif | 92 #endif |
75 opts.nolocaltcp = 0; | 93 opts.nolocaltcp = 0; |
76 opts.noremotetcp = 0; | 94 opts.noremotetcp = 0; |
77 /* not yet | 95 /* not yet |
78 opts.ipv4 = 1; | 96 opts.ipv4 = 1; |