]> git.saurik.com Git - apple/libinfo.git/blobdiff - gen.subproj/gethostbyname.3
Libinfo-517.30.1.tar.gz
[apple/libinfo.git] / gen.subproj / gethostbyname.3
index 7c85286ff887fcc18de18bc632055dbd9e51ec6b..d791b3693d92dbe47d49f2b6190dce65e08047ce 100644 (file)
@@ -230,6 +230,17 @@ function returns a string which is the message text corresponding to the
 value of the
 .Fa err
 argument.
+.Pp
+Historically, passing a host's own hostname to
+.Fn gethostbyname
+or
+.Fn gethostbyname2
+has been a popular
+technique for determining that host's IP address(es), but this is fragile,
+and doesn't work reliably in all cases. The appropriate way for software to
+discover the IP address(es) of the host it is running on is to use
+.Xr getifaddrs 3 .
+.Pp
 .Sh FILES
 .Bl -tag -width /etc/nsswitch.conf -compact
 .It Pa /etc/hosts