mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
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>
|
||
|---|---|---|
| .. | ||
| libbuiltin | ||
| libc | ||
| libdsp | ||
| libm | ||
| libnx | ||
| libxx | ||
| CMakeLists.txt | ||