Swatantra-66 opened a new pull request, #20493: URL: https://github.com/apache/nuttx/pull/20493
## Summary This PR replaces the 5-line placeholder stub in `Documentation/applications/netutils/tftpc/index.rst` with a comprehensive, production-grade guide for the `tftpc` (TFTP client) network utility. Addresses #11081 ### Key Additions: - **Architecture Overview**: Documents `tftpc`'s dual role as both the interactive NSH `get` and `put` shell commands engine and a standalone programmatic C API. - **Core Capabilities**: Covers RFC 1350 compliance, binary (`octet`) and text (`netascii`) transfer modes, streaming callback architecture, dynamic TID port negotiation, and automatic retransmission timeouts. - **Security Considerations**: Details caveats for firmware transfers over TFTP, emphasizing isolated network environments and the necessity of independent cryptographic verification (verified digital signatures or out-of-band digests). - **Kconfig Options & Dependencies**: Outlines prerequisite networking subsystems (`CONFIG_NET_UDP`, `CONFIG_NET_IPv4`) and all tuneable options (`CONFIG_NETUTILS_TFTPC`, `CONFIG_NETUTILS_TFTP_PORT`, `CONFIG_NETUTILS_TFTP_TIMEOUT`, `CONFIG_NETUTILS_TFTP_DUMPBUFFERS`). - **NSH CLI Guide**: Full command synopses, option flags (`-b`, `-n`, `-f`, `-h`), and practical shell examples for both `get` and `put`. - **C API Reference**: Detailed coverage of filesystem helpers (`tftpget()`, `tftpput()`) and streaming callback APIs (`tftpget_cb()`, `tftpput_cb()`). - **Production C Application Example**: Provides a runnable embedded file-download helper demonstrating memory sink callbacks with buffer boundary checks and proper errno returns. ## Impact - **Documentation**: Fills another critical unwritten documentation page tracked in #11081. - **User Experience**: Provides clear, secure patterns for embedded firmware transfer and shell usage in NuttX. - **Code/Build**: Documentation-only change. No functional code or ABI alterations. ## Testing - Validated Sphinx reStructuredText syntax, formatting, and header underline lengths. - Verified NSH CLI flags against `apps/nshlib/nsh_command.c` and `nsh_netcmds.c`. - Verified C API definitions and callback signatures against `apps/include/netutils/tftp.h`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
