comparison options.h @ 449:3e6c536bc023

Add -W <windowsize> argument and document it.
author Matt Johnston <matt@ucc.asn.au>
date Wed, 25 Jul 2007 15:44:25 +0000
parents 9c61e7af0156
children 7e43f5e473b9
comparison
equal deleted inserted replaced
448:9c61e7af0156 449:3e6c536bc023
218 218
219 /* Window size limits. These tend to be a trade-off between memory 219 /* Window size limits. These tend to be a trade-off between memory
220 usage and network performance: */ 220 usage and network performance: */
221 /* Size of the network receive window. This amount of memory is allocated 221 /* Size of the network receive window. This amount of memory is allocated
222 as a per-channel receive buffer. Increasing this value can make a 222 as a per-channel receive buffer. Increasing this value can make a
223 significant difference to network performance. */ 223 significant difference to network performance. 24kB was empirically
224 #define RECV_MAX_WINDOW 8192 224 chosen for a 100mbit ethernet network. The value can be altered at
225 runtime with the -W argument. */
226 #define DEFAULT_RECV_WINDOW 24576
225 /* Maximum size of a received SSH data packet - this _MUST_ be >= 32768 227 /* Maximum size of a received SSH data packet - this _MUST_ be >= 32768
226 in order to interoperate with other implementations */ 228 in order to interoperate with other implementations */
227 #define RECV_MAX_PAYLOAD_LEN 32768 229 #define RECV_MAX_PAYLOAD_LEN 32768
228 /* 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,
229 though increasing it may not make a significant difference. */ 231 though increasing it may not make a significant difference. */
337 339
338 /* for channel code */ 340 /* for channel code */
339 #define TRANS_MAX_WINDOW 500000000 /* 500MB is sufficient, stopping overflow */ 341 #define TRANS_MAX_WINDOW 500000000 /* 500MB is sufficient, stopping overflow */
340 #define TRANS_MAX_WIN_INCR 500000000 /* overflow prevention */ 342 #define TRANS_MAX_WIN_INCR 500000000 /* overflow prevention */
341 343
342 #define RECV_WINDOWEXTEND (RECV_MAX_WINDOW / 3) /* We send a "window extend" every 344 #define RECV_WINDOWEXTEND (opts.recv_window / 3) /* We send a "window extend" every
343 RECV_WINDOWEXTEND bytes */ 345 RECV_WINDOWEXTEND bytes */
344 346
345 #define MAX_CHANNELS 100 /* simple mem restriction, includes each tcp/x11 347 #define MAX_CHANNELS 100 /* simple mem restriction, includes each tcp/x11
346 connection, so can't be _too_ small */ 348 connection, so can't be _too_ small */
347 349