Swatantra-66 opened a new pull request, #20513:
URL: https://github.com/apache/nuttx/pull/20513

   ## Summary
   Addresses #11081.
   
   Provides a comprehensive, production-grade documentation guide for the 
`dhcpc` (Dynamic Host Configuration Protocol client) network utility in 
`Documentation/applications/netutils/dhcpc/index.rst`, replacing the previous 
7-line placeholder stub.
   
   ### Content Included
   - **Protocol Architecture & State Machine**: Details RFC 2131 (IPv4) and RFC 
1542 (BOOTP interoperability), mapping the 6-stage lifecycle (`INIT`, 
`SELECTING`, `REQUESTING`, `BOUND`, `RENEWING`/`REBINDING`, and `RELEASE`).
   - **Security Considerations**: Documents vulnerabilities inherent to 
unauthenticated plaintext DHCPv4, rogue DHCP server risks, and mitigations 
(DHCP Snooping, Port Security, end-to-end transport encryption).
   - **Requirements & Prerequisites**: Lists networking dependencies including 
`CONFIG_NET_BROADCAST=y` (required for `DHCPDISCOVER` broadcast traffic) and 
`CONFIG_NET_BINDTODEVICE=y`.
   - **Configuration Reference**: Complete Kconfig options table 
(`CONFIG_NETUTILS_DHCPC`, hostname, timeouts, retries, BOOTP broadcast flags, 
NTP/DNS server counts, and release transmission delays).
   - **NSH Integration**: Runtime commands (`ifconfig <ifname> dhcp`) and 
network verification (`ifconfig`, `ping`).
   - **C API Reference**: Detailed specification of `struct dhcpc_state` and 
core lifecycle functions with POSIX `ERROR`/`errno` return contracts 
(`dhcpc_open`, `dhcpc_request`, `dhcpc_request_async`, `dhcpc_release`, 
`dhcpc_cancel`, `dhcpc_close`).
   - **Runnable Application Examples**:
     1. Synchronous IP acquisition flow querying hardware MAC via `netlib`, 
performing DHCP negotiation, and applying IP/netmask/router/DNS parameters to 
the stack.
     2. Graceful lease release before system reboot or link teardown.
   - **Embedded Design Guidelines**: Lease renewal timer scheduling ($T_1$) for 
long-running IoT devices, wireless retransmission tuning, and `SO_BINDTODEVICE` 
multihomed operation.
   
   ## Impact
   - Closes the missing documentation stub for `dhcpc` under #11081.
   - Completes the core network client trilogy (`webclient`, `tftpc`, `dhcpc`) 
for Apache NuttX documentation.
   
   ## Testing
   - Verified reStructuredText syntax, formatting, and table alignment.
   - Confirmed zero trailing whitespaces across all 430+ lines.
   


-- 
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]

Reply via email to