diff options
author | Russ Allbery <eagle@eyrie.org> | 2014-01-17 11:53:57 -0800 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2014-01-22 12:23:04 -0800 |
commit | 9ef4a02d438e5351f104cfd137ca4c96a625a7cd (patch) | |
tree | 800af0f2be342939806718ddd0a995d54bf991ce /util | |
parent | e55891929b8d6dee3444079fcba95055ecdfe7d4 (diff) |
Send the maximum permissible amount of MESSAGE_OUTPUT data
Rather than capping the data returned by the server in one
MESSAGE_OUTPUT token at the rather arbitrary length of 65,000 octets,
send up to the maximum amount of data permitted by the protocol. This
also slightly increases the maximum length of the output returned
under the version one protocol.
Change-Id: Ia3e54957aeb67974ede66fda781aeb4a2c97171a
Reviewed-on: https://gerrit.stanford.edu/1379
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'util')
-rw-r--r-- | util/protocol.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/util/protocol.h b/util/protocol.h index 203227c..bfa15ed 100644 --- a/util/protocol.h +++ b/util/protocol.h @@ -6,7 +6,7 @@ * * Written by Russ Allbery <eagle@eyrie.org> * Based on prior work by Anton Ushakov - * Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + * Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2014 * The Board of Trustees of the Leland Stanford Junior University * * See LICENSE for licensing terms. @@ -19,6 +19,14 @@ #define TOKEN_MAX_LENGTH (1024 * 1024) #define TOKEN_MAX_DATA (64 * 1024) +/* + * Maximum data payload for a MESSAGE_OUTPUT message, which is TOKEN_MAX_DATA + * minus the overhead for MESSAGE_OUTPUT labeling. This is slightly different + * in protocol one, which used a different message format. + */ +#define TOKEN_MAX_OUTPUT (TOKEN_MAX_DATA - 1 - 1 - 1 - 4) +#define TOKEN_MAX_OUTPUT_V1 (TOKEN_MAX_DATA - 4 - 4) + /* Message types. */ enum message_types { MESSAGE_COMMAND = 1, |