aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 6a45eeb..f9fc57e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -24,6 +24,7 @@ pub enum Opcodes {
pub struct TftpOptions {
blksize: usize,
timeout: u8,
+ tsize: usize,
}
pub struct Tftp {
@@ -34,6 +35,7 @@ fn default_options() -> TftpOptions {
TftpOptions {
blksize: 512,
timeout: 3,
+ tsize: 0,
}
}
@@ -142,6 +144,15 @@ impl Tftp {
_ => false
}
}
+ "tsize" => {
+ match val.parse() {
+ Ok(t) => {
+ self.options.tsize = t;
+ true
+ }
+ _ => false
+ }
+ }
_ => false
}
});