Mercurial > dropbear
comparison options.h @ 454:7e43f5e473b9
- Add -K keepalive flag for dropbear and dbclient
- Try to reduce the frequency of select() timeouts
- Add a max receive window size of 1MB
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 08 Aug 2007 15:12:06 +0000 |
parents | 3e6c536bc023 |
children | 319262c94d24 |
comparison
equal
deleted
inserted
replaced
453:29953de278ae | 454:7e43f5e473b9 |
---|---|
229 #define RECV_MAX_PAYLOAD_LEN 32768 | 229 #define RECV_MAX_PAYLOAD_LEN 32768 |
230 /* Maximum size of a transmitted data packet - this can be any value, | 230 /* Maximum size of a transmitted data packet - this can be any value, |
231 though increasing it may not make a significant difference. */ | 231 though increasing it may not make a significant difference. */ |
232 #define TRANS_MAX_PAYLOAD_LEN 16384 | 232 #define TRANS_MAX_PAYLOAD_LEN 16384 |
233 | 233 |
234 /* Ensure that data is transmitted every KEEPALIVE seconds. This can | |
235 be overridden at runtime with -K. 0 disables keepalives */ | |
236 #define DEFAULT_KEEPALIVE 0 | |
234 | 237 |
235 /******************************************************************* | 238 /******************************************************************* |
236 * You shouldn't edit below here unless you know you need to. | 239 * You shouldn't edit below here unless you know you need to. |
237 *******************************************************************/ | 240 *******************************************************************/ |
238 | 241 |
284 #define MAX_LISTEN_ADDR (DROPBEAR_MAX_PORTS*3) | 287 #define MAX_LISTEN_ADDR (DROPBEAR_MAX_PORTS*3) |
285 | 288 |
286 #define _PATH_TTY "/dev/tty" | 289 #define _PATH_TTY "/dev/tty" |
287 | 290 |
288 #define _PATH_CP "/bin/cp" | 291 #define _PATH_CP "/bin/cp" |
289 | |
290 /* Timeouts in seconds */ | |
291 #define SELECT_TIMEOUT 20 | |
292 | 292 |
293 /* success/failure defines */ | 293 /* success/failure defines */ |
294 #define DROPBEAR_SUCCESS 0 | 294 #define DROPBEAR_SUCCESS 0 |
295 #define DROPBEAR_FAILURE -1 | 295 #define DROPBEAR_FAILURE -1 |
296 | 296 |
341 #define TRANS_MAX_WINDOW 500000000 /* 500MB is sufficient, stopping overflow */ | 341 #define TRANS_MAX_WINDOW 500000000 /* 500MB is sufficient, stopping overflow */ |
342 #define TRANS_MAX_WIN_INCR 500000000 /* overflow prevention */ | 342 #define TRANS_MAX_WIN_INCR 500000000 /* overflow prevention */ |
343 | 343 |
344 #define RECV_WINDOWEXTEND (opts.recv_window / 3) /* We send a "window extend" every | 344 #define RECV_WINDOWEXTEND (opts.recv_window / 3) /* We send a "window extend" every |
345 RECV_WINDOWEXTEND bytes */ | 345 RECV_WINDOWEXTEND bytes */ |
346 #define MAX_RECV_WINDOW (1024*1024) /* 1 MB should be enough */ | |
346 | 347 |
347 #define MAX_CHANNELS 100 /* simple mem restriction, includes each tcp/x11 | 348 #define MAX_CHANNELS 100 /* simple mem restriction, includes each tcp/x11 |
348 connection, so can't be _too_ small */ | 349 connection, so can't be _too_ small */ |
349 | 350 |
350 #define MAX_STRING_LEN 1400 /* ~= MAX_PROPOSED_ALGO * MAX_NAME_LEN, also | 351 #define MAX_STRING_LEN 1400 /* ~= MAX_PROPOSED_ALGO * MAX_NAME_LEN, also |