Skip to main content

Module tftp

Module tftp 

Source
Expand description

TFTP (Trivial File Transfer Protocol) implementation

This module implements the complete TFTP protocol, based on the following RFC standards:

§Module Structure

tftp/
├── core/           # Core protocol implementation
│   ├── packet      # Packet serialization/deserialization
│   ├── socket      # Socket abstraction layer
│   ├── options     # Protocol options
│   ├── window      # Windowed transfer
│   └── convert     # Data conversion utilities
│
├── server/         # TFTP server
│   ├── server      # Main server logic
│   ├── worker      # Transfer worker threads
│   └── config      # Server configuration
│
└── client/         # TFTP client
    └── ...

§Usage Examples

§Start TFTP Server

use xtool::tftp::{server::Config, server::Server};
use std::path::PathBuf;

let config = Config::with_defaults().merge_cli(
    "0.0.0.0".to_string(),
    69,
    PathBuf::from("/var/tftp"),
    false,
    false,
);

let mut server = Server::new(&config).unwrap();
server.listen();

Modules§

client
TFTP client implementation
core
TFTP core protocol implementation
server
TFTP server implementation