summaryrefslogtreecommitdiff
path: root/tftpy/TftpShared.py
diff options
context:
space:
mode:
Diffstat (limited to 'tftpy/TftpShared.py')
-rw-r--r--tftpy/TftpShared.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tftpy/TftpShared.py b/tftpy/TftpShared.py
index d464d4d..e727c94 100644
--- a/tftpy/TftpShared.py
+++ b/tftpy/TftpShared.py
@@ -12,6 +12,11 @@ DEF_TFTP_PORT = 69
# A hook for deliberately introducing delay in testing.
DELAY_BLOCK = 0
+# A hook to simulate a bad network
+NETWORK_UNRELIABILITY = 0
+# 0 is disabled, anything positive is the inverse of the percentage of
+# dropped traffic. For example, 1000 would cause 0.1% of DAT packets to
+# be skipped to simulate lost packets.
def tftpassert(condition, msg):