nuttx/libs/libc/netdb
Lingao Meng b5d3d30378 netdb: Add http and https service entries
getaddrinfo() and getservbyname() use the built-in service table when
resolving service names. The table only contained ntp, so common
service names such as http and https could not be resolved without a
numeric port.

Add http and https entries for both TCP and UDP to match the existing
service table style.

Testing:

  - Host: Ubuntu 22.04 x86_64.

  - Board/config: sim:nsh with CONFIG_LIBC_NETDB=y and
    CONFIG_EXAMPLES_HELLO=y.

  - make clean && make -j16.

  - Ran a temporary hello example that called getservbyname("http",
    "tcp") and getservbyname("https", "tcp"). The app verified ports
    80 and 443 and printed "getservbyname http/https test passed".

Assisted-by: Claude:Claude-Fable-5
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2026-07-23 15:34:02 +08:00
..
CMakeLists.txt netdb/lib_dnsdelserver.c: support delete the DNS server address 2025-11-08 16:17:40 -03:00
Kconfig libs/libc/netdb: Optimize the timeout calculation logic: 2025-08-06 01:58:05 +08:00
lib_dn.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_dns.h libs/libc/netdb: Optimize the timeout calculation logic: 2025-08-06 01:58:05 +08:00
lib_dnsaddserver.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
lib_dnsbind.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
lib_dnscache.c !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
lib_dnsdefaultserver.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
lib_dnsdelserver.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
lib_dnsforeach.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
lib_dnsinit.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_dnsnotify.c libs: unify Private Types banners 2025-05-28 10:17:15 +08:00
lib_dnsquery.c libs: netdb: Advance stream buffers by transfer count 2026-07-09 08:45:42 +08:00
lib_dnsqueryfamily.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
lib_freeaddrinfo.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_gaistrerror.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_getaddrinfo.c style/FAR: remove FAR qualifier 2025-11-10 10:56:29 +01:00
lib_gethostbyaddr.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_gethostbyaddrr.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
lib_gethostbyname.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_gethostbyname2.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_gethostbyname2r.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_gethostbynamer.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_gethostentbynamer.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
lib_getnameinfo.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_getservbyname.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_getservbynamer.c netdb: Add http and https service entries 2026-07-23 15:34:02 +08:00
lib_getservbyport.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_getservbyportr.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_netdb.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_netdb.h libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_parsehostfile.c style/FAR: remove FAR qualifier 2025-11-10 10:56:29 +01:00
lib_proto.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_protor.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_rexec.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
Make.defs netdb/lib_dnsdelserver.c: support delete the DNS server address 2025-11-08 16:17:40 -03:00