Mercurial > dropbear
comparison svr-runopts.c @ 641:2b1bb792cd4d dropbear-tfm
- Update tfm changes to current default tip
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 21 Nov 2011 19:52:28 +0800 |
parents | e27d7fb23376 |
children | 675bbd630f5d |
comparison
equal
deleted
inserted
replaced
640:76097ec1a29a | 641:2b1bb792cd4d |
---|---|
41 "Options are:\n" | 41 "Options are:\n" |
42 "-b bannerfile Display the contents of bannerfile" | 42 "-b bannerfile Display the contents of bannerfile" |
43 " before user login\n" | 43 " before user login\n" |
44 " (default: none)\n" | 44 " (default: none)\n" |
45 #ifdef DROPBEAR_DSS | 45 #ifdef DROPBEAR_DSS |
46 "-d dsskeyfile Use dsskeyfile for the dss host key\n" | 46 "-d dsskeyfile Use dsskeyfile for the DSS host key\n" |
47 " (default: %s)\n" | 47 " (default: %s)\n" |
48 #endif | 48 #endif |
49 #ifdef DROPBEAR_RSA | 49 #ifdef DROPBEAR_RSA |
50 "-r rsakeyfile Use rsakeyfile for the rsa host key\n" | 50 "-r rsakeyfile Use rsakeyfile for the RSA host key\n" |
51 " (default: %s)\n" | 51 " (default: %s)\n" |
52 #endif | 52 #endif |
53 "-F Don't fork into background\n" | 53 "-F Don't fork into background\n" |
54 #ifdef DISABLE_SYSLOG | 54 #ifdef DISABLE_SYSLOG |
55 "(Syslog support not compiled in, using stderr)\n" | 55 "(Syslog support not compiled in, using stderr)\n" |
79 " (default %s)\n" | 79 " (default %s)\n" |
80 #ifdef INETD_MODE | 80 #ifdef INETD_MODE |
81 "-i Start for inetd\n" | 81 "-i Start for inetd\n" |
82 #endif | 82 #endif |
83 "-W <receive_window_buffer> (default %d, larger may be faster, max 1MB)\n" | 83 "-W <receive_window_buffer> (default %d, larger may be faster, max 1MB)\n" |
84 "-K <keepalive> (0 is never, default %d)\n" | 84 "-K <keepalive> (0 is never, default %d, in seconds)\n" |
85 "-I <idle_timeout> (0 is never, default %d)\n" | 85 "-I <idle_timeout> (0 is never, default %d, in seconds)\n" |
86 #ifdef DEBUG_TRACE | 86 #ifdef DEBUG_TRACE |
87 "-v verbose (compiled with DEBUG_TRACE)\n" | 87 "-v verbose (compiled with DEBUG_TRACE)\n" |
88 #endif | 88 #endif |
89 ,DROPBEAR_VERSION, progname, | 89 ,DROPBEAR_VERSION, progname, |
90 #ifdef DROPBEAR_DSS | 90 #ifdef DROPBEAR_DSS |
123 svr_opts.nolocaltcp = 0; | 123 svr_opts.nolocaltcp = 0; |
124 #endif | 124 #endif |
125 #ifdef ENABLE_SVR_REMOTETCPFWD | 125 #ifdef ENABLE_SVR_REMOTETCPFWD |
126 svr_opts.noremotetcp = 0; | 126 svr_opts.noremotetcp = 0; |
127 #endif | 127 #endif |
128 #ifndef DISABLE_ZLIB | |
129 opts.enable_compress = 1; | |
130 #endif | |
128 /* not yet | 131 /* not yet |
129 opts.ipv4 = 1; | 132 opts.ipv4 = 1; |
130 opts.ipv6 = 1; | 133 opts.ipv6 = 1; |
131 */ | 134 */ |
132 #ifdef DO_MOTD | 135 #ifdef DO_MOTD |
294 dropbear_exit("Bad recv window '%s'", recv_window_arg); | 297 dropbear_exit("Bad recv window '%s'", recv_window_arg); |
295 } | 298 } |
296 } | 299 } |
297 | 300 |
298 if (keepalive_arg) { | 301 if (keepalive_arg) { |
299 if (m_str_to_uint(keepalive_arg, &opts.keepalive_secs) == DROPBEAR_FAILURE) { | 302 unsigned int val; |
303 if (m_str_to_uint(keepalive_arg, &val) == DROPBEAR_FAILURE) { | |
300 dropbear_exit("Bad keepalive '%s'", keepalive_arg); | 304 dropbear_exit("Bad keepalive '%s'", keepalive_arg); |
301 } | 305 } |
306 opts.keepalive_secs = val; | |
302 } | 307 } |
303 | 308 |
304 if (idle_timeout_arg) { | 309 if (idle_timeout_arg) { |
305 if (m_str_to_uint(idle_timeout_arg, &opts.idle_timeout_secs) == DROPBEAR_FAILURE) { | 310 unsigned int val; |
311 if (m_str_to_uint(idle_timeout_arg, &val) == DROPBEAR_FAILURE) { | |
306 dropbear_exit("Bad idle_timeout '%s'", idle_timeout_arg); | 312 dropbear_exit("Bad idle_timeout '%s'", idle_timeout_arg); |
307 } | 313 } |
314 opts.idle_timeout_secs = val; | |
308 } | 315 } |
309 } | 316 } |
310 | 317 |
311 static void addportandaddress(char* spec) { | 318 static void addportandaddress(char* spec) { |
312 | 319 |