9 #include <hal_posix/file_io.h>
27 const char* filename_local,
28 const char* filename_remote);
33 const char* filename_local,
34 const char* filename_remote);
62 const char* work_folder);
74 const std::string m_work_folder;
Read bytes or packets from a file.
Write bytes or packets to a file.
Abstract API for reading byte-streams and packets.
Abstract API for writing byte-streams and packets.
Dispatcher sorts incoming UDP messages by port index.
A TFTP client makes request(s) to a remote server.
u32 progress_bytes() const
Transfer progress, measured in bytes.
u32 progress_blocks() const
Transfer progress, measured in 512-byte blocks.
bool active() const
Is there an active transfer?
A TFTP client that makes request(s) to a remote server.
u32 progress_blocks() const
Accessors for the transfer status.
u32 progress_bytes() const
Accessors for the transfer status.
void begin_upload(const satcat5::ip::Addr &server, const char *filename_local, const char *filename_remote)
Upload data from a Readable stream to the server.
void begin_download(const satcat5::ip::Addr &server, const char *filename_local, const char *filename_remote)
Download a file from server to a Writeable stream.
TftpClientPosix(satcat5::udp::Dispatch *iface)
Attach this TFTP client to a network interface.
bool active() const
Accessors for the transfer status.
ServerCore is the base class that handles TFTP network functions.
A TFTP server handles requests from remote clients.
std::string check_path(const char *filename)
Check if a user-supplied path is safe to use.
satcat5::io::Readable * read(const char *filename) override
Child class MUST override these methods.
TftpServerPosix(satcat5::udp::Dispatch *iface, const char *work_folder)
Attach this TFTP server to a network interface.
IPv4 address is a 32-bit unsigned integer.
Client and server for the Trivial File Transfer Protocol (TFTP)