freebsd-skq/contrib/ntp/arlib
roberto 230e76b538 Merge 4.2.4p8 into contrib (r200452 & r200454).
Subversion is being difficult here so take a hammer and get it in.

MFC after:		2 weeks
Security:		CVE-2009-3563
2009-12-15 14:58:10 +00:00
..
aclocal.m4 Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
arlib.3
arlib.c
arlib.h
arplib.h
configure Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
configure.in
COPYING
depcomp Merge ntpd & friends 4.2.4p5 from vendor/ntp/dist into head. Next commit 2008-08-22 15:58:00 +00:00
INSTALL
install-sh Merge ntpd & friends 4.2.4p5 from vendor/ntp/dist into head. Next commit 2008-08-22 15:58:00 +00:00
Makefile.am
Makefile.in Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
missing Merge ntpd & friends 4.2.4p5 from vendor/ntp/dist into head. Next commit 2008-08-22 15:58:00 +00:00
README
sample.c
UNSHAR.HDR

				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.