configure-dns

Function

Package: socket

Arguments: &key nameserver search domain auto

In order to work, the DNS utility needs to know the IP address of at least one nameserver willing to respond to recursive queries (that is, to do the work of the query if it doesn't know the answer). This function is used to specify the nameserver addresses. It can also specify other optional information. When DNS is configured, the variable *dns-configured* is set to true.

NameWhat
nameserverAn IP address or a list of IP addresses of the nameservers we should consult
searcha list of strings naming the domains we should search in dns-lookup-hostname.
domainthe domain of this machine (e.g. "foo.com"). This value is stored in the variable *dns-domain* for programs to use.
autoIf true, determine as much of this information as possible automatically, overriding the values set by the other arguments.

We would like to be able to compute this information automatically in every situation. Currently we can handle Unix machines that specify this information in a file called /etc/resolv.conf, and we try to handle all versions of Windows (but see the note under the heading Automatic DNS configuation on Windows below).

When dns-query is called, it checks to see if configure-dns has been called since lisp started, and if not it calls configure-dns with :auto t. If this doesn't work it means that you need to call configure-dns with the appropriate information before you call dns-query on this machine.

Automatic DNS configuation on Windows

On Windows the information we need to automatically configure this module is found in the Windows registry. Unfortunately the information we need is in a different place in each on the six Windows configurations we tested (Win98, Win NT 4, Win2000, each with a fixed IP address or using DCHP to configure the IP address). Therefore it's likely that information will move around again in future version of Windows. Furthermore sometimes we encounter stale information in the registry (for example, a laptop computer that used to be on a network but isn't at the moment may hold the last known nameserver information in the registry even though those nameservers are unreachable). Therefore, if you wish to make use of the Allegro CL DNS facility, you should be prepared to manually configure-dns on machines (by calling this function with autonil and filling in the necessary information) when auto configuration fails.

See dns.htm for information on the domain naming system utility in ALlegro CL and see socket.htm for general information on sockets in Allegro CL.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.