OS/2 port of
Berkley Internet Name Domain

BIND version 4.9.5 p1c2


Overview


What is it?

This is version 4.9.5 p1c2 of BIND (Berkley Internet Name Domain) ported to OS/2.
It relies on EMX (Eberhard Mattes eXtentions - a C library/distribution of GCC for OS/2) 0.9c fix 2 (or newer).

Where to find the latest release?

ftp.very.priv.at/bind/bind495a.zip
ftp-os2.nmsu.edu/os2/unix/

Subscribe to the OS/2 BIND port mail list. Enter 'subscribe bind' in the message body.

Some interesting links

First read bog.ps, the BIND Operation Guide in postscript format, then check out:

Installation

To install just take a look a the standard BIND documentation (
ISC BIND homepage for a reference manual (BOG -- Bind Operations Guide), FAQ, protocol definitions, ...).

The directory structure for the OS/2 port is laid down in named/pathnames.h. See section Directory layout for further information and means to fit your personal setup without recompiling. The EMX runtime 0.9c (available on ftp://ftp-os2.nmsu.edu/os2/unix/emx09c and IBM TCP/IP have to be installed. HPFS is required.

You will find the executables in the source directories (named/, tools/, tools/nslookup), make install does (of course) not work (yet).
Copy the executalbes to /tcpip/bin (recommended).

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

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.

Do not use backslashed in BIND's enirvonment variables, use forward slashes instead!


/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)

  addr.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 the 'directory' keyword in your named.boot)



/tmp/ (TMP or (TEMP)

  named.run

  named_dump.db

  named.stats

  xfer.trace

  xfer.ddt.XXXXXX

Example:
  1. You are using MPTS (not LAPS, TCP/IP 2.0), so your ETC environment variable will likely point to x:/mptn/etc - your named.boot file should be located in x:/mptn/etc/namedb. You do not have to set any environment variable.
  2. Using MPTS, you 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 nslookup.help to x:/mptn/help of course). named.boot is assumed to live in %ETC%/namedb/.
  3. You want to have named.boot on a FAT drive - set the environment variable NAMED_BOOT to c:/named/named.bot for example (warning: BIND has not been tested on FAT drives!)
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, ...).

Command line options

named [-d #] [-q] [-r] [-p port[/localport]] [[-b] bootfile]

-d #
Print debugging information. A number after the 'd' determines the level of messages printed. Debug levels range from 1 to 20.
-q
Trace all incoming queries if named has been compiled with QRYLOG defined. NOTE: this option is deprecated in favour of the boot file directive `options querylog'.
-r
Turns recursion off in the server. Answers can come only from local (primary or secondary) zones. This can be used on root servers. NOTE: this option is deprecated in favour of the boot file directive `options norecursion'.
-p port/localport
Use nonstandard port numbers. The default is the standard port number as returned by getservbyname(3) for service `domain'. The argument can specify two port numbers separated by a slash (`/') in which case the first port is that used when contacting remote servers, and the second one is the service port bound by the local instance of named. This is used mostly for debugging purposes.
-b bootfile
Use an alternate boot file. This is optional and allows you to specify a file with a leading dash.

Environment variables in the OS/2 port

Upon request (really I was 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. Three (hopefully unique) environment variables were introduced:

Sending signals

Unix background daemons receive commands via signals that are sent to their pid (a unique number identifying a process). BIND understands a number of signals: SIGINT, SIGQUIT, SIGIOT, SIGUSR1, SIGUSR2, SIGHUP, SIGALARM, SIGTERM.

New flash for the 4.9.5p1c2 port: now ndc does work under OS/2 (given you can execute the kill command). ndc facilitates reloading the nameserver database, dumping status information, stopping the server, ... A way to send signals under OS/2 is provided with the Apache httpd port. See the OS2/ directory in the OS/2 Apache archive.

OS/2 specific stuff

What happened to the code?

Actual code is pretty unchanged, I adapted the makefiles (and renamed 'em Makefile.OS2, so make sure to type make -f Makefile.OS2 from the BIND distribution root directory, issuing make from subdirectories won't work), figured out a suitable compat/lib/lib44bsd.a, read conf/protability.h very carefully :) and while doing so my OS/2 box turned into a unix-lookalike (you may wish to get GNU shell|file|text utilities, sed 3.0, flex 2.4.5, ksh 5.27, ... from
hobbes).

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

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

Actually, EMX's socket library seems to poll sockets, thus OS/2 Pulse (and other CPU meters) show 100 % CPU usage - however BIND is quite well-behaved.

Re-compiling

News flash: Try ksh 5.27 to re-compile - works much better than tcsh and bash! Compiles the entier project in one pass, wow...
Cool: Sed 3.0 installation works out - no troubles compiling named this time.

In order to re-compile the BIND port you'll need a syslog library (on hobbes or cdrom.com; for IBM's CSet, a port of the port to EMX is available from the author) and flex 2.4.5.

/emx/include/sys/time.h was patched to include stuff I need for setitimer(). Maybe I will see this in one of the upcoming EMX distributions\dots [bad hack :)]

I removed the contrib/, shres/, doc/rfc/ directory from the original distribution, some postscript files about DNS security were also removed. If you are interested, just ftp the latest BIND distribution.

History of the OS/2 port

To do

The OS/2 port of BIND is already recognized by Paul Vixie, maintainer of BIND, the code patches/diffs and be found in the contrig/os2emx directory of the standard BIND distribution.

Acknowledgements

Many thanks to
Eberhard Mattes
for EMX which this port heavily relies on
Christof 'Mirus' Meerwald
for his punny Linux box operating as the secondary in-house domain
Nicolai Langfeldt
for his HOWTO become a totally small time DNS admin
Jack Snodgrass
for his efforts recompiling the code and his detailed bug reports
Wieslaw Pawlowski
for his detailed bug reports
Andrew J Hood
for his useful patches
Mike Burgett
who was wondering how difficult it would be to get the contents of the ETC environment setting...
Christoph Lechleitner
for his help in general
... and some other people those contributions were dumped by my brain-dead NeXT-mailer at university.

How to contact the author

The maintainer of the BIND distribution is
Paul Vixie and the ISC, please address to him, if you have questions about BIND in general.

I'm very interested in your comments and flames about the OS/2 port of BIND:
Still, if everything is running fine please tell me the domain you are serving with this BIND port, just for my ego :)

Peter Meerwald
Schieástandstr. 3
A-5061 Elsbethen/AUSTRIA

seawood@very.priv.at
pmeerw@cosy.sbg.ac.at

Disclaimer

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

webmaster@very.priv.at