feat(sockutls): Add support for gethostname()

Closes https://github.com/espressif/esp-idf/issues/14849
This commit is contained in:
David Cermak
2024-12-09 16:15:34 +01:00
parent 32387f7e39
commit f7c0b7564a
5 changed files with 124 additions and 0 deletions

View File

@@ -13,5 +13,6 @@ This component provides simplified implementations of common socket-related util
| `pipe()` | Wraps `socketpair()` to provide unidirectional pipe-like functionality | Uses bidirectional sockets in place of true pipes |
| `getnameinfo()` | Converts IP addresses to human-readable form using `lwIP`'s `inet_ntop()` | IPv4 only; supports `NI_NUMERICHOST` and `NI_NUMERICSERV` flags only |
| `gai_strerror()` | Returns error code as a string | Simple numeric string representation only |
| `gethostname()` | Returns lwip netif hostname | Not a system-wide hostname, but interface specific hostname |
**Note**: `socketpair()` and `pipe()` are built on top of `lwIP` TCP sockets, inheriting the same characteristics. For instance, the maximum transmit buffer size is based on the `TCP_SND_BUF` setting.