/contrib/ntp/arlib/README

https://bitbucket.org/freebsd/freebsd-head/ · #! · 49 lines · 34 code · 15 blank · 0 comment · 0 complexity · a4c96e4677c13756327a8cebd6a944e8 MD5 · raw file

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