Built-in Module macdnr

macdnr This module provides an interface to the Macintosh Domain Name Resolver. It is usually used in conjunction with the mactcp module, to map hostnames to IP-addresses. It may not be available in all Mac Python versions. The macdnr module defines the following functions:
\begin{funcdesc}{Open}{\optional{filename}}
Open the domain name resolver extens...
...eded since the other calls will
open the extension automatically.
\end{funcdesc}

\begin{funcdesc}{Close}{}
Close the resolver extension. Again, not needed for normal use.
\end{funcdesc}

\begin{funcdesc}{StrToAddr}{hostname}
Look up the IP address for \var{hostname}. This call returns a dnr
result object of the \lq\lq address'' variation.
\end{funcdesc}

\begin{funcdesc}{AddrToName}{addr}
Do a reverse lookup on the 32-bit integer IP-...
...{addr}. Returns a dnr result object of the \lq\lq address'' variation.
\end{funcdesc}

\begin{funcdesc}{AddrToStr}{addr}
Convert the 32-bit integer IP-address \var{addr} to a dotted-decimal
string. Returns the string.
\end{funcdesc}

\begin{funcdesc}{HInfo}{hostname}
Query the nameservers for a \code{HInfo} recor...
...rst place). Returns a dnr result object of the \lq\lq hinfo''
variety.
\end{funcdesc}

\begin{funcdesc}{MXInfo}{domain}
Query the nameservers for a mail exchanger for ...
... given
domain. Returns a dnr result object of the \lq\lq mx'' variety.
\end{funcdesc}


Subsections