% README for the OS/2 port of bind 4.9.3

\documentclass[a4paper]{article}
\usepackage{a4}
\usepackage{german}

\title{The OS/2 port of bind 4.9.3}
\author{Peter Meerwald}

\begin{document}
\maketitle

\section{What is it?}

This is release 4.9.3 of bind\footnote{Berkley Internet Name Domain} ported to OS/2.
It relies on EMX\footnote{Eberhard Mattes eXtentions -- a distribution of GCC for OS/2} 0.9b fix 5 (or newer).

\section{Installation}

To install just take a look a the standard bind documentation\footnote{look at \emph{http://www.vix.com/isc/bind.html} for a reference manual (BOG -- Bind Operations Guide), FAQ, protocol definitions, \dots}.
The directory structure for the OS/2 port is laid down in \emph{named/pathnames.h}. See section 'Directory layout' for further information and means to fit your personal setup without recompiling.
The EMX runtime and IBM TCP/IP have to be installed. HPFS is required.

You will find the executables in the source directories (\emph{named/}, \emph{tools/},
\emph{tools/nslookup}), make install does (of course) not work (yet).

It is a good idea to have \emph{syslogd} running the first time you start \emph{named}. Try parameter \emph{-d} for extensive debug info and/or \emph{-q} for query logging.
Default log level is 1; a log level of \emph{-d 20} produces over 60~kb of output during the first 2 seconds -- beware\dots

\section{OS/2 specific stuff}

\subsection{What happened to the code?}

Actual code is pretty unchanged, I adapted the makefiles, figured out a
suitable \emph{compat/lib/lib44bsd.a}, read \emph{conf/protability.h} very carefully :)
and while doing so my OS/2 box turned into a unix-lookalike\footnote{you may wish to get GNU shell|file|text utilities from hobbes}.

Look for \_\_EMX\_\_ defines in the code (you won't find many) to see what changed.

Upon request (I was really forced to do so:) I made the path-setup somewhat more dynamic for OS/2 -- now the code evaluates the environment variables ETC, TMP and TEMP and adapts accordingly.
Two (hopefully) new environment were introduced:

\begin{itemize}
\item NAMED\_XFER -- points to the named-xfer program (otherwise the default \emph{/tcpip/bin/named-xfer} is used)
\item NAMED\_BOOT -- points to the named boot file (otherwise \emph{named} looks for \emph{TMP/namedb/named.boot})
\item NSLOOKUP\_HELP -- points to the nslookup helpfile (\emph{nslookup} assumes to find its helpfile as \emph{/tcpip/help/nslookup.help})
\end{itemize}

Beware! The \emph{nice()} and \emph{renice()} code has been replaced with dummy code, so the OS/2 port may consume more CPU time than neccessary.

\subsection{Re-compiling}

Especially \emph{named/Makefile} contains one bad hardcoded hack (I was unable get
sed to work), I used tcsh 6.0.6.1 \bf and \rm bash 1.12, to me, it seems that these
shells lack some features :) - well I'm very lost when it comes to shell
setup/shell features - I am awaiting your hints\dots

\bf News flash: \rm Try ksh 5.27 to re-compile -- works much better that tcsh and bash! Compiles the entier project in \bf one \rm pass, wow\dots

In order to re-compile the bind port you'll need a syslog library (on hobbes\footnote{point your browser to \emph{ftp://ftp-os2.nmsu.edu/os2} or \emph{ftp://ftp-os2.cdrom.com}} for IBM's CSet,
a port of the port to EMX is available from the author) and flex 2.4.5.

\emph{/emx/include/sys/time.h} was extended to include stuff we need for setitimer().
Maybe we will see this in one of the next EMX distributions\dots [bad hack :)]

I removed the \emph{contrib/}, \emph{shres/}, \emph{doc/rfc/} directory from the original
distribution, some postscript files about DNS security were also removed.

\subsection{Sending signals}

Unix background daemons receive commands via signals that are sent to their pid\footnote{a unique number identifying a process}.
bind 4.9.3 understands a number of signals: SIGINT, SIGQUIT, SIGIOT, SIGUSR1, SIGUSR2, SIGHUP, SIGALARM, SIGTERM.

A way to send signals under OS/2 is provided in the Apache httpd port\footnote{again on hobbes or \emph{http://www.apache.org/}} in directory \emph{Apache/os2/}.

\section{History of the OS/2 port}

\begin{itemize}
\item June 14, 1996 --- released \emph{bind493a.zip}, initial release
\item July 1, 1996 --- \emph{bind493b.zip} contains this wonderful \LaTeX\ -README and, more important, a
fix for the ''core dump'' bug when set up as a secondary name server (well, now everything is linked static);
some cleanups were done to the Makefiles; this is just an \bf update \rm release, it contains \bf only \rm executables and this README!
\item July 3, 1996 --- released \emph{bind493c.zip} to fix a bug which occurred when transferring a zone;
it contains only named.exe and an updated README.

\begin{verse}
/* kernels that map pages for IO end up failing if the pipe is full
   at exit and we take away the final buffer.  this is really a kernel
   bug but it's harmless on systems that are not broken, so... */
\end{verse}

\item August 2, 1996 --- rename() does \bf not \rm overwrite the target under OS/2, implemented an awkward work-around (see compat/lib/rename\_unixstyle.c).
\item August 3, 1996 --- started to make the bind stuff more dynamic -- looking for environment variables ETC and TMP or TEMP first\dots
\item August 8, 1996 --- \emph{nsloopup.help} is now searched in the path specified by the HELP environment variable;
the following optional environment variables are supported now:
NAMED\_XFER may point to the \emph{named-xfer} program,
NAMED\_BOOT locates the \emph{named.boot} file and NSLOOKUP\_HELP may point to the \emph{nslookup.help} file

\end{itemize}

\section{Directory layout of the OS/2 port}

You will have less troubles if you use the directory layout given below!
However, you can fit the OS/2 bind directory layout to your needs by setting the environment variables gives in brackets.

\begin{verse}
/tcpip/bin/ \\
  named.exe (or somewhere in your PATH) \\
  named-xfer.exe (NAMED\_XFER) \\
  nslookup.exe (or somewhere in your PATH) \\
  dig.exe (or somewhere in your PATH) \\
  dnsquery.exe (or somewhere in your PATH) \\
  host.exe (or somewhere in your PATH) \\

/tcpip/help/ \\
  nslookup.help (NAMED\_HELP) \\

/tcpip/etc/ (ETC) \\
  named.pid \\

/tcpip/etc/namedb/ (ETC) \\
  named.boot (NAMED\_BOOT) \\
  (and your configuration files) (use 'directory' keyword in your \emph{named.boot}) \\

/tmp/ (TMP or (TEMP) \\
  named.run \\
  named\_dump.db \\
  named.stats \\
  xfer.trace \\
  xfer.ddt.XXXXXX \\
}
\end{verse}

Example:

\begin{itemize}
\item You are using MPTS (not LAPS, TCP/IP 2.0), so your ETC environment variable will likely point to x:/mptn/etc -- your \emph{named.boot} file should be located in x:/mptn/etc/namedb.
\item Using MPTS want to have your bind executables in x:/mptn/bin -- set NAMED\_XFER to x:/mptn/bin, set NSLOOKUP\_HELP to x:/mptn/help (and copy \emph{nslookup.help} to x:/mptn/help of course).
\item You absolutely want the named configuration files on c:/named -- so set NAMED\_BOOT to c:/named.
\end{itemize}

Warning: The OS/2 bind port has not been excessively tested in a multiple-drive configuration (say ETC = g:/mptn/etc, TMP = d:/tmp, NAMED\_BOOT = c:/namedb, \dots).

\section{To do}

\begin{itemize}
\item either replace makefiles with REXX scripts or craft'em right
\item include a working sample configuration
\item find and fix bugs in the port :)
\item make named display some debug info in its window
\item provide some means to send signals to \emph{named}
\item figure out a way to have dynamic linking \bf and \rm a working fork()
\item a solid distribution archive
\item get the OS/2 port into the standard bind distribution? is it worth the struggle?
\end{itemize}

\section{Acknowledgements}

Many thanks to
\begin{description}
\item[Eberhard Mattes mattes@azu.informatik.uni-stuttgart.de] for EMX which this port heavily relies on
\item[Christof 'Mirus' Meerwald] for his punny Linux box operating as the secondary in-house domain
\item[Nicolai Langfeldt janl@math.uio.no] for his ''HOWTO become a totally small time DNS admin''\footnote{online at \emph{http://www.lh.umu.se/\~bjorn/linux/howto/DNS-HOWTO.html} for example}
\item[jack@kf5mg.cybermail.net] for his efforts recompiling the code and his detailed bug reports
\item[Wieslaw Pawlowski wiesiek@ipipan.gda.pl] for his detailed bug reports
\item[Andrew J Hood ajhood@fl.net.au] for his useful patches
\item[Mike Burgett burgett@cmnsens.zoom.com] who was wondering how difficult it would be to get the contents of the ETC environment setting\dots
\item[Christoph Lechleitner lech@lech.priv.at] for his help in general
\end{description}
\dots and some other people those contributions were dumped by my brain-dead NeXT-mailer at university.


\section{How to contact the author}

I'm very interested in your comments and flames\dots
Still, if everything is running fine please tell me the domain you are
serving with this bind port, just for my ego~:)

\begin{table}[h]
\begin{tabbing}
\= snail mail address  xxxxxxxxxx \= email addresses xxxxxxxxxxx \kill
\> Peter Meerwald \> pmeerw@cosy.sbg.ac.at \\
\> Schie�standstr. 3 \> Peter.Meerwald@2-315-11-0.st.co.at \\
\> A-5061 Elsbethen/AUSTRIA \> 2:315/11@fidonet.org \\
\end{tabbing}
\end{table}

BTW: Are you interested in an sendmail port for OS/2? Is there already a port?
Please let me know\dots

\section{Disclaimer}

Beware: I am no DNS specialist. There may be serious bugs or security holes
in the OS/2 port of bind 4.9.3 -- use at your own risk! Insert your favourite
disclaimer text below\dots

\end{document}
