summaryrefslogtreecommitdiff
path: root/paramiko/common.py
diff options
context:
space:
mode:
authorOlle Lundberg <geek@nerd.sh>2014-08-14 14:28:34 +0200
committerOlle Lundberg <geek@nerd.sh>2014-08-14 15:19:06 +0200
commit83aa7335f7121f9259a41ae27cab5fb8dad09b96 (patch)
tree10ac3da15d5ac002277c80817082d6bee2b717a5 /paramiko/common.py
parentc0df755ead0eb54d798dd3f49b7dd86b8ad6baeb (diff)
downloadparamiko-83aa7335f7121f9259a41ae27cab5fb8dad09b96.tar.gz
Move window and packet constants.
Centralise them to the common module to avoid import cycles. Also add constants for default values and use them in the transport class.
Diffstat (limited to 'paramiko/common.py')
-rw-r--r--paramiko/common.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/paramiko/common.py b/paramiko/common.py
index 18298922..93f71df0 100644
--- a/paramiko/common.py
+++ b/paramiko/common.py
@@ -171,3 +171,14 @@ CRITICAL = logging.CRITICAL
# Common IO/select/etc sleep period, in seconds
io_sleep = 0.01
+
+DEFAULT_WINDOW_SIZE = 64 * 2 ** 15
+DEFAULT_MAX_PACKET_SIZE = 2 ** 15
+
+# lower bound on the max packet size we'll accept from the remote host
+# Minimum packet size is 32768 bytes according to
+# http://www.ietf.org/rfc/rfc4254.txt
+MIN_PACKET_SIZE = 2 ** 15
+
+# Max windows size according to http://www.ietf.org/rfc/rfc4254.txt
+MAX_WINDOW_SIZE = 2**32 -1