parent
2bb48917a2
commit
090a91be0e
|
@ -7,11 +7,19 @@
|
||||||
%
|
%
|
||||||
\section{Overview}
|
\section{Overview}
|
||||||
The \ex{dns} structure contains a library for querying DNS servers.
|
The \ex{dns} structure contains a library for querying DNS servers.
|
||||||
|
The library contains sophisticated replacements for scsh's interface
|
||||||
|
to the \ex{gethostbyname} and \ex{gethostbyaddr} and many extensions
|
||||||
|
to these functions.
|
||||||
|
|
||||||
Features:
|
The main features of the libraray include:
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
|
\item Complete implementation of the DNS protocol
|
||||||
|
\item Concurrent contacting of multiple DNS servers without blocking
|
||||||
|
the scsh process
|
||||||
|
\item Internal caching of DNS responses
|
||||||
\item Parsing of \texttt{resolv.conf}, including \texttt{search}
|
\item Parsing of \texttt{resolv.conf}, including \texttt{search}
|
||||||
entries. This enables looking up the FQDN of a host.
|
entries to generate FQDNs from unqualified host names
|
||||||
|
\item Rich condition hierarchie
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
\section{Conditions}
|
\section{Conditions}
|
||||||
|
@ -100,27 +108,25 @@ accept. \var{Nameserver} is either a \ipaddr or a dotted IP string.
|
||||||
\begin{desc}
|
\begin{desc}
|
||||||
Looks up the FQDN for the given IP address. The optional argument
|
Looks up the FQDN for the given IP address. The optional argument
|
||||||
specifes the name servers to query, it defaults to the ones found in
|
specifes the name servers to query, it defaults to the ones found in
|
||||||
\texttt{/etc/resolv.conf}. \oops{use-cache? is not implemented yet}
|
\texttt{/etc/resolv.conf}.
|
||||||
\end{desc}
|
\end{desc}
|
||||||
|
|
||||||
\defun{dns-lookup-nameserver}{name/\ipaddr [nameserver list][use-cache?]}{\ipaddr list}
|
\defun{dns-lookup-nameserver}{name/\ipaddr [nameserver list][use-cache?]}{\ipaddr list}
|
||||||
\begin{desc}
|
\begin{desc}
|
||||||
Looks up an authoritative name server for a hostname, returns a list
|
Looks up an authoritative name server for a hostname, returns a list
|
||||||
of name servers. The optional argument specifes the name servers to
|
of name servers.
|
||||||
query, it defaults to the ones found in
|
|
||||||
\texttt{/etc/resolv.conf}\oops{use-cache? is not implemented yet}
|
|
||||||
\end{desc}
|
\end{desc}
|
||||||
|
|
||||||
\defun{dns-lookup-mail-exchanger}{name/\ipaddr [nameserver list][use-cache?]}{\fqdn list}
|
\defun{dns-lookup-mail-exchanger}{name/\ipaddr [nameserver list][use-cache?]}{\fqdn list}
|
||||||
\begin{desc}
|
\begin{desc}
|
||||||
Looks up mail-exchangers for a hostname und returns them in a list
|
Looks up mail-exchangers for a hostname und returns them in a list
|
||||||
sorted by preference. \oops{use-cache? is not implemented yet}
|
sorted by preference.
|
||||||
\end{desc}
|
\end{desc}
|
||||||
\defun{socket-address->fqdn}{socket-address [nameserver list][use-cache?]}{\fqdn}
|
\defun{socket-address->fqdn}{socket-address [nameserver list][use-cache?]}{\fqdn}
|
||||||
\begin{desc}
|
\begin{desc}
|
||||||
Returns the FQDN for of the address bound to argument. The argument
|
Returns the FQDN for of the address bound to argument. The argument
|
||||||
\var{cache?} indicates whether the internal cache may be queried to
|
\var{cache?} indicates whether the internal cache may be queried to
|
||||||
obtain the information.\oops{use-cache? is required by the implmentation}
|
obtain the information.
|
||||||
\end{desc}
|
\end{desc}
|
||||||
|
|
||||||
\defun{maybe-dns-lookup-name}{name [nameserver list][use-cache?]}{\ipaddr or \sharpf}
|
\defun{maybe-dns-lookup-name}{name [nameserver list][use-cache?]}{\ipaddr or \sharpf}
|
||||||
|
@ -128,7 +134,7 @@ accept. \var{Nameserver} is either a \ipaddr or a dotted IP string.
|
||||||
\begin{desc}
|
\begin{desc}
|
||||||
These procedures provide the same functionality as
|
These procedures provide the same functionality as
|
||||||
\ex{dns-lookup-name} and \ex{dns-lookup-ip} but return \sharpf{} in
|
\ex{dns-lookup-name} and \ex{dns-lookup-ip} but return \sharpf{} in
|
||||||
case of an \ex{dns-error}.\oops{optional arguments not implemented yet}
|
case of an \ex{dns-error}.
|
||||||
\end{desc}
|
\end{desc}
|
||||||
|
|
||||||
\defun{host-fqdn} {name/socket-address [nameserver list][use-cache?]}{\fqdn}
|
\defun{host-fqdn} {name/socket-address [nameserver list][use-cache?]}{\fqdn}
|
||||||
|
@ -139,7 +145,7 @@ accept. \var{Nameserver} is either a \ipaddr or a dotted IP string.
|
||||||
address. The procedure \ex{system-fqdn} returns the FQDN of the
|
address. The procedure \ex{system-fqdn} returns the FQDN of the
|
||||||
local host. These procedures use a list of domain names obtained
|
local host. These procedures use a list of domain names obtained
|
||||||
from \texttt{/etc/resolv.conf} to the generate FQDNs and try to
|
from \texttt{/etc/resolv.conf} to the generate FQDNs and try to
|
||||||
resolve these FQDNs.\oops{optional arguments not implemented yet}
|
resolve these FQDNs.
|
||||||
\end{desc}
|
\end{desc}
|
||||||
|
|
||||||
\section{Low-level Interface}
|
\section{Low-level Interface}
|
||||||
|
@ -165,8 +171,7 @@ generating the \var{dns-message}.
|
||||||
answer is not authoritative additional name servers sent with the
|
answer is not authoritative additional name servers sent with the
|
||||||
reply are checked until an authoritative answer is found. If the
|
reply are checked until an authoritative answer is found. If the
|
||||||
predicate returns \sharpf{} but the answer is authoritative a
|
predicate returns \sharpf{} but the answer is authoritative a
|
||||||
\var{bad-address} condition is signalled. \oops{order of parameters
|
\var{bad-address} condition is signalled.
|
||||||
differs in implementation}
|
|
||||||
\end{desc}
|
\end{desc}
|
||||||
|
|
||||||
\dfn{network-protocol}{protocol-name}{network-protocol}{syntax}
|
\dfn{network-protocol}{protocol-name}{network-protocol}{syntax}
|
||||||
|
@ -179,7 +184,7 @@ generating the \var{dns-message}.
|
||||||
\defun{dns-lookup}{\fqdn{}/\ipaddr type [nameserver list][use-cache?]}{dns-message}
|
\defun{dns-lookup}{\fqdn{}/\ipaddr type [nameserver list][use-cache?]}{dns-message}
|
||||||
\begin{desc}
|
\begin{desc}
|
||||||
Convenient shortcut to submit a DNS query. The return value
|
Convenient shortcut to submit a DNS query. The return value
|
||||||
is a \ex{dns-message} structure:\oops{optional arguments not implemented yet}
|
is a \ex{dns-message} structure:
|
||||||
\end{desc}
|
\end{desc}
|
||||||
|
|
||||||
\defun{dns-message?}{thing}{\boolean}
|
\defun{dns-message?}{thing}{\boolean}
|
||||||
|
@ -421,7 +426,6 @@ field but we where no able to find test cases for them.
|
||||||
subtype of the \var{dns-error} condition.
|
subtype of the \var{dns-error} condition.
|
||||||
\ex{resolv.conf-parse-error?} is the type predicate for this
|
\ex{resolv.conf-parse-error?} is the type predicate for this
|
||||||
condition.
|
condition.
|
||||||
\oops{this is not implemented yet}
|
|
||||||
\end{desc}
|
\end{desc}
|
||||||
|
|
||||||
\defun{resolv.conf}{}{{symbol$\rightarrow$string} alist}
|
\defun{resolv.conf}{}{{symbol$\rightarrow$string} alist}
|
||||||
|
|
Loading…
Reference in New Issue