7
For those who write real time network applications that have to handle
8
multiple TCP or UDP connections, the problem of effectively doing DNS
9
lookups is quite real. Generally, this means the program waits while
10
the query finishes, holding everything else up. This small library of
11
routines aims to solve that problem by performing the DNS query and
12
then returning the program to its normal flow.
16
The library routines, arlib.c, a header file for it, arlib.h, a man
17
page, arlib.3 and an example of how this sort of code is used,
21
Compilation & Installation.
23
Edit the Makefile and do "make install" to install things where you
24
wish them to go. You should check it makes and works before doing
27
If the compilation is successful, you'll have an executeable called
28
"example" and libares.a. "example" is a simple program which will
29
do hostname->IP# or IP#->hostnae lookups by entering either the
30
hostname or IP# on the line with "Host-->". You dont have to wait
31
for a query to fail or succeed before typing in the next line.
35
I'm not sure how portable this is, it was written under SunOS 4.1.2
36
on a Sparc 1+ and hasn't been tested very widely. If you find any
37
problems when compiling/execution, plase send me a patch (using
38
diff -c) to avalon@coombs.anu.edu.au. If it goes well enough, I'll
39
send it to comp.unix.sources or comp.sources.misc for further testing.
43
Adding a working cache would be nice but I'm not sure if that really
44
is needed (?). I guess it depends on how often your program is
45
required to do a DNS lookup and whether caching would help.