Added TFTP Client / server#111
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a reusable, allocation-free TFTP (client + server) module to wolfIP, integrates it into the top-level build systems, and introduces unit tests + documentation updates to cover the new functionality.
Changes:
- New
src/tftp/module implementing TFTP RRQ/WRQ (octet mode) with option negotiation and callback-driven I/O/verification. - Build integration via Makefile and CMake to compile/link
src/tftp/*.c, plus a newWOLFIP_ENABLE_TFTPconfig knob. - New unit test suite for the TFTP module, wired into the existing unit test runner; docs updated to mention module/layout.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
src/tftp/wolftftp.h |
New public TFTP API/types/config structs and callbacks. |
src/tftp/wolftftp.c |
New TFTP client/server implementation (packet parsing/building, state machines, polling). |
src/test/unit/unit.c |
Registers the new TFTP unit test suite. |
src/test/unit/unit_tests_tftp.c |
New unit tests covering helpers, client/server success paths, and error paths. |
src/test/unit/unit_shared.c |
Enables TFTP for unit tests and includes the module into the single-TU unit build. |
README.md |
Documents the presence and purpose of the TFTP module. |
docs/API.md |
Documents TFTP capability and build integration details. |
config.h |
Adds WOLFIP_ENABLE_TFTP default configuration. |
Makefile |
Adds src/tftp/*.c objects into build/link sets and updates coverage commands. |
CMakeLists.txt |
Globs src/tftp/*.c into WOLFIP_SRCS; fixes unit build gating on Check_FOUND. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixed POSIX violation in UDP recv: - don't enforce "connected" sockets upon sendto automatically (only on actual connect). Relax source filter. Adjusted unit tests - Actual TFTP fixes after interop tests with tftp[d]-hpa
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #111
Scan targets checked: wolfip-bugs, wolfip-src
Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
dgarske
left a comment
There was a problem hiding this comment.
TFTP client on the STM32H5 worked great! I'll put up a PR update for the H5 example.
Initializing TFTP client demo...
TFTP server: 10.0.4.24
TFTP file: test.txt
TFTP: RRQ sent
Entering main loop. Ready for connections!
TCP Echo: port 7
TFTP: open update partition (erase on demand)
TFTP: programmed bytes=44
TFTP: update flag set, reset to apply
TFTP: close status=0
Add support for TFTP client and server.
tftpd-hpaandtftp-hpa, respectively. Tested in github action