freebsd-skq/contrib/ntp/arlib
2004-07-20 15:01:56 +00:00
..
aclocal.m4 Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
arlib.3 Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
arlib.c Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
arlib.h Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
arplib.h Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
configure Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
configure.in Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
COPYING Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
depcomp Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
INSTALL Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
install-sh Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
Makefile.am Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
Makefile.in Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
missing Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
mkinstalldirs Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
README Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
sample.c Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00
UNSHAR.HDR Virgin import of ntpd 4.2.0 2004-07-20 15:01:56 +00:00

				Asynchronous DNS
				----------------

	Intro.

For those who write real time network applications that have to handle
multiple TCP or UDP connections, the problem of effectively doing DNS
lookups is quite real.  Generally, this means the program waits while
the query finishes, holding everything else up.  This small library of
routines aims to solve that problem by performing the DNS query and
then returning the program to its normal flow.

	Whats included ?

The library routines, arlib.c, a header file for it, arlib.h, a man
page, arlib.3 and an example of how this sort of code is used,
sample.c.


	Compilation & Installation.

Edit the Makefile and do "make install" to install things where you
wish them to go.  You should check it makes and works before doing
this :)

If the compilation is successful, you'll have an executeable called
"example" and libares.a.  "example" is a simple program which will
do hostname->IP# or IP#->hostnae lookups by entering either the
hostname or IP# on the line with "Host-->".  You dont have to wait
for a query to fail or succeed before typing in the next line.

	Portability.

I'm not sure how portable this is, it was written under SunOS 4.1.2
on a Sparc 1+ and hasn't been tested very widely.  If you find any
problems when compiling/execution, plase send me a patch (using
diff -c) to avalon@coombs.anu.edu.au.  If it goes well enough, I'll
send it to comp.unix.sources or comp.sources.misc for further testing.

	Future additions.

Adding a working cache would be nice but I'm not sure if that really
is needed (?).  I guess it depends on how often your program is
required to do a DNS lookup and whether caching would help.


Cheers,
Darren.