summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-08-16 14:21:42 (GMT)
committerFred Drake <fdrake@acm.org>2000-08-16 14:21:42 (GMT)
commit5772c86816c843f7d431307632ed607a81931dd1 (patch)
treea31dc23d924728c172394ff6ab77d350c0ed882e /Doc/lib
parentb526e5fa992a79b92be948bbc0c433f8946423f3 (diff)
downloadcpython-5772c86816c843f7d431307632ed607a81931dd1.zip
cpython-5772c86816c843f7d431307632ed607a81931dd1.tar.gz
cpython-5772c86816c843f7d431307632ed607a81931dd1.tar.bz2
Document socket.getfqdn().
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libsocket.tex16
1 files changed, 12 insertions, 4 deletions
diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex
index 6f7ab1e..0b9b789 100644
--- a/Doc/lib/libsocket.tex
+++ b/Doc/lib/libsocket.tex
@@ -101,6 +101,16 @@ those symbols that are defined in the \UNIX{} header files are defined;
for a few symbols, default values are provided.
\end{datadesc}
+\begin{funcdesc}{getfqdn}{\optional{name}}
+Return a fully qualified domain name for \var{name}.
+If \var{name} is omitted or empty, it is interpreted as the local
+host. To find the fully qualified name, the hostname returned by
+\function{gethostbyaddr()} is checked, then aliases for the host, if
+available. The first name which includes a period is selected. In
+case no fully qualified domain name is available, the hostname is
+returned.
+\end{funcdesc}
+
\begin{funcdesc}{gethostbyname}{hostname}
Translate a host name to IP address format. The IP address is
returned as a string, e.g., \code{'100.50.200.5'}. If the host name
@@ -134,10 +144,8 @@ responding to the given \var{ip_address}, \var{aliaslist} is a
(possibly empty) list of alternative host names for the same address,
and \var{ipaddrlist} is a list of IP addresses for the same interface
on the same host (most likely containing only a single address).
-To find the fully qualified domain name, check \var{hostname} and the
-items of \var{aliaslist} for an entry containing at least one period.
-An implementation of this algorithm can be found in the module
-\module{smtplib} in form of the \function{make_fqdn()} function.
+To find the fully qualified domain name, use the function
+\function{getfqdn()}.
\end{funcdesc}
\begin{funcdesc}{getprotobyname}{protocolname}