Skip to content

Conversation

@nuttxs
Copy link
Contributor

@nuttxs nuttxs commented Nov 6, 2025

Summary

  1. Update the "DNS function" section in 11_network.rst, and create the netlib API documentation in netlib/index.rst
  2. netdb/lib_dnsdelserver.c: add DNS deletion functionality, support deleting DNS servers by address or by index:
dns_del_nameserver()
dns_del_nameserver_by_index()
Multi-DNS delete Call-Chain Implementation:
Application Layer: netlib_del_ipv4dnsaddr() / netlib_del_ipv6dnsaddr()
           ↓
Network Layer: dns_del_nameserver()
           ↓
Storage Layer: g_dns_servers[] array

Impact

New Feature/Change: Yes
User Impact: support delete the DNS server address by index or address
Build Impact:No new Kconfig options or build system changes.
Hardware Impact: No
Security: No
Compatibility: Backward-compatible; no breaking changes.

Testing

Refer to PR#apache/nuttx-apps#3206

@github-actions github-actions bot added Area: Networking Effects networking subsystem Area: OS Components OS Components issues Board: xtensa Size: M The size of the change in this PR is medium labels Nov 6, 2025
@nuttxs nuttxs force-pushed the feature/support-delete-DNS-server-by-index-or-address branch 5 times, most recently from a4bba18 to 9ec412e Compare November 6, 2025 08:54
@nuttxs nuttxs force-pushed the feature/support-delete-DNS-server-by-index-or-address branch from 9ec412e to a65bb07 Compare November 6, 2025 09:37
acassis
acassis previously approved these changes Nov 6, 2025
Copy link
Contributor

@acassis acassis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nuttxs could you please help us to create a basic documentation to DNS APIs to be included at https://nuttx.apache.org/docs/latest/reference/user/index.html ?

xiaoxiang781216
xiaoxiang781216 previously approved these changes Nov 6, 2025
Copy link
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anchao
anchao previously requested changes Nov 7, 2025
@nuttxs nuttxs dismissed stale reviews from acassis and xiaoxiang781216 via 9995892 November 7, 2025 15:11
@nuttxs nuttxs force-pushed the feature/support-delete-DNS-server-by-index-or-address branch from a65bb07 to 9995892 Compare November 7, 2025 15:11
@acassis
Copy link
Contributor

acassis commented Nov 7, 2025

@nuttxs please add dns to user network doc: https://nuttx.apache.org/docs/latest/reference/user/11_network.html
I suggest keeping the existing documentation under "Basic socket functions" and add "DNS functions"

@nuttxs
Copy link
Contributor Author

nuttxs commented Nov 7, 2025

@acassis Okay, I will to add the corresponding "DNS functions" API documentation

@nuttxs nuttxs force-pushed the feature/support-delete-DNS-server-by-index-or-address branch 2 times, most recently from f7d9ffb to d817165 Compare November 7, 2025 17:48
@nuttxs nuttxs requested a review from btashton as a code owner November 7, 2025 17:48
@github-actions github-actions bot added the Area: Documentation Improvements or additions to documentation label Nov 7, 2025
acassis
acassis previously approved these changes Nov 7, 2025
@cederom
Copy link
Contributor

cederom commented Nov 7, 2025

Hmm, looks like boards/arm/sama5/jupiter-nano/ is impacted and needs a fix? https://github.com/apache/nuttx/actions/runs/19176611989/job/54823072207?pr=17284#step:7:682

====================================================================================
Configuration/Tool: jupiter-nano/sdmmc-nsh-net-resolvconf,CONFIG_ARM_TOOLCHAIN_GNU_EABI
2025-11-07 19:38:58
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Disabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Enabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Building NuttX...
Error: netdb/lib_dnsdelserver.c:44:12: error: 'dns_find_nameserver_index' defined but not used [-Werror=unused-function]
   44 | static int dns_find_nameserver_index(FAR const struct sockaddr *addr,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:156: bin/lib_dnsdelserver.o] Error 1
make[1]: Target 'libc.a' not remade because of errors.
make: *** [tools/LibTargets.mk:196: libs/libc/libc.a] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 385: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
  [1/1] Normalize jupiter-nano/sdmmc-nsh-net-resolvconf

@nuttxs nuttxs force-pushed the feature/support-delete-DNS-server-by-index-or-address branch from d817165 to 5e2434a Compare November 8, 2025 03:27
by index or address

 - dns_del_nameserver()
 - dns_del_nameserver_by_index()

Update the "DNS function" section in 11_network.rst, and create
the netlib API documentation in netlib/index.rst

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
@nuttxs nuttxs force-pushed the feature/support-delete-DNS-server-by-index-or-address branch from 5e2434a to d118b75 Compare November 8, 2025 04:01
@github-actions github-actions bot added the Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. label Nov 8, 2025
@nuttxs
Copy link
Contributor Author

nuttxs commented Nov 8, 2025

@cederom @acassis The basic documentation updates for "DNS functions" and "netlib" have been completed, and the related compilation errors have been fixed. Please review.

Copy link
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Amazing work thank you @nuttxs :-)
  • Builds fine now, documentation added, yeah! :-)
  • Just discussion resolution with @anchao :-)

@acassis acassis dismissed anchao’s stale review November 8, 2025 19:17

Already fixed

@acassis acassis merged commit 65e3184 into apache:master Nov 8, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Area: Networking Effects networking subsystem Area: OS Components OS Components issues Size: M The size of the change in this PR is medium Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants