Crates.io | allenap-libtftp |
lib.rs | allenap-libtftp |
version | 0.2.2 |
source | src |
created_at | 2016-12-06 20:56:40.631165 |
updated_at | 2022-04-04 06:42:42.112469 |
description | allenap's TFTP library |
homepage | https://github.com/allenap/allenap-libtftp |
repository | https://github.com/allenap/allenap-libtftp |
max_upload_size | |
id | 7491 |
size | 49,746 |
This crate is no longer supported and will not be updated. It was an experiment and is unlikely to be useful to anyone in its present state. The code itself may be a minor curiosity... but probably not. This is not the TFTP goodness you're looking for. Sorry!
This library will let you build a read-only TFTP server in Rust with the following features:
RFC-1350 - The TFTP Protocol (Revision 2)
RFC-2347 - TFTP Option Extension
RFC-2348 - TFTP Blocksize Option
RFC-2349 - TFTP Timeout Interval and Transfer Size Options
blkno
rollover, allowing tranfers of unlimited size.
The places to start are the top-level serve
function, the Handler
trait, and the rrq.serve
function.
The intent is to support writable servers, and clients. The code is alpha level right now, and given time I would change quite a lot, but for now this works.
I learned a lot from reading the code in Arjan Topolovec's rust-tftp. In an ideal world I would have instead contributed back to that, and I may yet do that, but I started on this project as a way to learn Rust.
I've read a lot of material about Rust and a lot of Rust code, but writing code has been the best way to internalise that knowledge, and to find out what I thought I knew but didn't. Starting from scratch with rust-tftp as a guide has worked well for me.
Thank you Arjan Topolovec.
Fix the layering violation used to efficiently construct outgoing
DATA
packets.
Wait for ACK
after sending OACK
.
Support the windowsize
option;
see RFC-7440.
More unit tests.
Some integration tests.
Clean-ups, refactorings, and so on: it's kind of rough-n-ready right now.