From 050ecfe1d4989ea5c92e2de82fd410550340677b Mon Sep 17 00:00:00 2001
From: Micael Karlberg
Date: Thu, 21 Sep 2023 12:38:56 +0200
Subject: [PATCH] [kernel|doc] Update use of the resolver
Add some text in the doc of the gethostbyname function(s)
about the use of the resolver.
OTP-18769
---
lib/kernel/doc/src/inet.xml | 35 +++++++++++++++++++++++++++++++----
1 file changed, 31 insertions(+), 4 deletions(-)
diff --git a/lib/kernel/doc/src/inet.xml b/lib/kernel/doc/src/inet.xml
index b9a623e98862..fc58e62ebf95 100644
--- a/lib/kernel/doc/src/inet.xml
+++ b/lib/kernel/doc/src/inet.xml
@@ -470,9 +470,23 @@ fe80::204:acff:fe17:bf38
Returns a hostent record for the host with the specified
- hostname.
- If resolver option inet6 is true,
- an IPv6 address is looked up.
+ hostname.
+
+ This function uses the resolver,
+ which is often the native (OS) resolver.
+
+ If resolver option inet6 is true, an IPv6 address
+ is looked up.
+
+ See
+ ERTS User's Guide:
+ Inet Configuration for information about the
+ resolver configuration.
+
+ A quirk of many resolver(s) is that an integer string is
+ interpreted as an IP address.
+ For instance, the integer string "3232235521" and the string
+ "192.168.0.1" is equal to the IP address {192,168,0,1}.
@@ -482,7 +496,20 @@ fe80::204:acff:fe17:bf38
Returns a hostent record for the host with the specified
- name, restricted to the specified address family.
+ name, restricted to the specified address family.
+
+ This function uses the resolver,
+ which is often the native (OS) resolver.
+
+ See
+ ERTS User's Guide:
+ Inet Configuration for information about the
+ resolver configuration.
+
+ A quirk of many resolver(s) is that an integer string is
+ interpreted as an IP address.
+ For instance, the integer string "3232235521" and the string
+ "192.168.0.1" is equal to the IP address {192,168,0,1}.