Repository navigation
Documentation/netutils: add comprehensive guide for dhcpc - #20513
Merged
Merged
Conversation
xiaoxiang781216
previously approved these changes
Oct 8, 2026
acassis
previously approved these changes
Oct 8, 2026
Swatantra-66
dismissed stale reviews from acassis and xiaoxiang781216
via
October 8, 2026 13:04
3637350
Swatantra-66
force-pushed
the
doc/dhcpc-guide
branch
from
October 8, 2026 13:04
2a9ff5d to
3637350
Compare
acassis
previously approved these changes
Oct 8, 2026
Provide a complete documentation guide for the dhcpc (DHCP client) network utility in Documentation/applications/netutils/dhcpc/index.rst, replacing the previous 7-line placeholder stub. Includes: - Protocol architecture overview and RFC 2131 / RFC 1542 finite state machine (DISCOVER, OFFER, REQUEST, ACK, RELEASE) - Security considerations regarding plaintext DHCPv4, rogue servers, and network isolation - Configuration options table and networking prerequisites including CONFIG_NET_BROADCAST - NSH usage for dynamic interface configuration (ifconfig <ifname> dhcp) and verification - Public C API reference for data structures (struct dhcpc_state) and lifecycle functions with documented POSIX ERROR/errno contracts (dhcpc_open, dhcpc_request, dhcpc_request_async, dhcpc_release, dhcpc_close) - Complete, runnable C application examples demonstrating synchronous interface configuration and graceful lease release - Embedded design and tuning guidelines (lease renewal scheduling, wireless retransmission tuning, and SO_BINDTODEVICE multihomed operation) Addresses apache#11081 Signed-off-by: Swatantra Yadav <[email protected]>
Swatantra-66
force-pushed
the
doc/dhcpc-guide
branch
from
October 8, 2026 14:39
3637350 to
c1dc837
Compare
hartmannathan
approved these changes
Oct 8, 2026
hartmannathan
left a comment
Contributor
There was a problem hiding this comment.
Thank you for helping to improve NuttX Documentation!!
Contributor
Author
|
Apologies for the earlier false alarm! I have conducted a deep line-by-line review and locally validated |
xiaoxiang781216
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Provides a comprehensive, production-grade documentation guide for the
dhcpc(Dynamic Host Configuration Protocol client) network utility inDocumentation/applications/netutils/dhcpc/index.rst, replacing the previous 7-line placeholder stub.Addresses #11081
Key Additions
INIT,SELECTING,REQUESTING,BOUND,RENEWING/REBINDING, andRELEASE).CONFIG_NET_BROADCAST=y(required forDHCPDISCOVERbroadcast traffic) andCONFIG_NET_BINDTODEVICE=y.CONFIG_NETUTILS_DHCPC, hostname, timeouts, retries, BOOTP broadcast flags, NTP/DNS server counts, and release transmission delays).ifconfig <ifname> dhcp) and network verification (ifconfig,ping).struct dhcpc_stateand core lifecycle functions with documented POSIXERROR/errnoreturn contracts (dhcpc_open,dhcpc_request,dhcpc_request_async,dhcpc_release,dhcpc_cancel,dhcpc_close).netlib, performing DHCP negotiation, and applying IP/netmask/router/DNS parameters to the stack.dhcpc_release().SO_BINDTODEVICEmultihomed operation.Impact
webclient,tftpc, anddhcpc) for Apache NuttX documentation.Testing
apps/include/netutils/dhcpc.h.errnobehavior againstapps/netutils/dhcpc/dhcpc.c.apps/nshlib/nsh_netcmds.c.