Crate tftpd

Source
Expand description

Multithreaded TFTP daemon implemented in pure Rust.

This server implements RFC 1350, The TFTP Protocol (Revision 2). It also supports the following RFC 2347 TFTP Option Extensions:

§Security

Since TFTP servers do not offer any type of login or access control mechanisms, this server only allows transfer and receiving inside a chosen folder, and disallows external file access.

Structs§

Config
Configuration struct used for parsing TFTP options from user input.
Convert
Allows conversions between byte arrays and other types.
Server
Server struct is used for handling incoming TFTP requests.
ServerSocket
ServerSocket struct is used as an abstraction layer for a server Socket. This struct is used for abstraction of single socket communication.
TransferOption
TransferOption struct represents the TFTP transfer options.
Window
Window struct is used to store chunks of data from a file. It is used to help store the data that is being sent or received for the RFC 7440 Windowsize option.
Worker
Worker struct is used for multithreaded file sending and receiving. It creates a new socket using the Server’s IP and a random port requested from the OS to communicate with the requesting client.

Enums§

ErrorCode
ErrorCode enum represents the error codes used in the TFTP definition.
Opcode
Opcode enum represents the opcodes used in the TFTP definition.
OptionType
OptionType enum represents the TFTP option types
Packet
Packet enum represents the valid TFTP packet types.

Traits§

Socket
Socket trait is used to allow building custom sockets to be used for TFTP communication.