*print-hostname-in-stream*

$Revision: 5.0.2.2 $

Variable

Package: ACL-SOCKET

When a socket object is printed, the text includes the machines that are connected by the socket. If *print-hostname-in-stream* is true, then the machine names are printed, otherwise the machine IP addresses are printed. Usually you want to see the machine names printed, thus the default value for *print-hostname-in-stream* is t.

Looking up a machine name given its IP address can take up to a few minutes to accomplish, and this delay will occur each time the printer prints the socket stream object. It will appear that the lisp has frozen but if you wait a few minutes it will come back to life.

If your machine is configured to do hostname lookup with a nameserver and if your network connection is slow or not reliable then you may wish to set this variable to nil.

The delays occur mostly on machines with either no network interface card installed or ones with a NIC but not attached to a network when a DNS server is consulted to do the reverse name lookup to print the hostname in the stream object. We have done some tests. Since Windows laptops are more common, we'll discuss the behavior on Windows.

Evaluating the following forms on various versions of Windows yields different results:

[1] (socket::ipaddr-to-hostname (socket::dotted-to-ipaddr "1.2.3.4"))
[2] (socket::ipaddr-to-hostname (socket::dotted-to-ipaddr "127.1"))

On Windows NT 4.0 with a network card installed but not connected to the network, [1] took about 20 seconds to return nil (i.e. no answer), and [2] returned "localhost" immediately.

On Windows 95, [1] quickly returned nil on all reverse lookups in both cases indicating that it knew that DNS lookups weren't going to work so why bother trying.

See socket.htm for general information on sockets.

The general documentation description is in introduction.htm. The index in index.htm.

Copyright (C) 1998-1999, Franz Inc., Berkeley, CA. All Rights Reserved.