home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / internet / dnsquery_1 / ReadMe1st next >
Text File  |  1996-02-10  |  4KB  |  109 lines

  1. ResolverZM 0.08 & libresolv
  2. ===========================
  3.  
  4. This archive contains two related components.  The first is a relocatable
  5. module "ResolverZM" which is a drop in replacement for InetDB or any other
  6. module providing DNS services via SWI chunk &46000.  If you want to use it
  7. you should kill any other module using that SWI chunk first.
  8.  
  9. The second is a statically linkable library called libresolv.o (and a
  10. module version called libresolvM.o) which will perform DNS lookups for
  11. an application.  libresolv*.o also requires Acorn's c:o.c++lib, J Coxhead's
  12. OSLib & A Mell's NetLib (v3.1 or later) in order to link successfully.
  13.  
  14. This will provide an API to gethostbyname gethostbyaddr and gethostname,
  15. plus a full multithreadable multitaskable library for performing lookups
  16. without blocking the machine.  For more details of blocking API, see
  17. Netlib:h.resolv and Netlib:arpa.h.nameser.  For more details of the
  18. non-blocking API see h.dnsquery and h.dnsquerymx in this archive.
  19. This is a BINARY ONLY distribution currently.
  20.  
  21.  
  22. ResolverZM
  23. ==========
  24.  
  25. This module provides SWI chunk &46000 (same as InetDB) but provides
  26. much greater functionality at the SWI API level.  eg. you have direct
  27. access to the res_query function, so you can resolve any type of
  28. address you want.  A * command interface is also provided which
  29. calls the same functions internally.
  30.  
  31. NOTE: The SWI chunk is owned by ANT Ltd. which gives them the
  32. right to define the SWI interface.   However, they will not tell
  33. anybody the interface, despite the fact that modules such as
  34. Gnome's resolver and Adam Goodfellow's InetDB have been in
  35. circulation for years.  Hence the API will not be compatible
  36. with their module, although GetHostByName and GetHostByAddr 
  37. *appear* to be the same from reports sent to me by others.
  38.  
  39. Current SWI interface (chunk name DNSResolver)
  40.  
  41. 46000 GetHostByName        (struct hostent *gethostbyname(name))
  42. 46001 GetHostByAddr        (struct hostent *gethostbyaddr(addr,size,af))
  43. 46002 unused
  44. 46003 unused
  45. 46004 StartDNSQuery    (dnsquery *dnsquery_new(name,class,type))
  46. 46005 CheckDNSQuery     (dns_status dnsquery_check(dnsquery *))
  47. 46006 DisposeDNSQuery   (void dsnquery_dispose(dnsquery *))
  48. 46007 GetQueryAnswerRaw (void *dnsquery_getanswerraw(dnsquery *, int *))
  49. 46008 MTGetHostByName   (dnsquery *dnsquery_gethostbyname(name))
  50. 46009 MTGetHostByAddr   (dnsquery *dnsquery_gethostbyaddr(addr,size,af))
  51. 4600A GetQueryAnswer    (struct hostent *dnsquery_getanswer(dnsquery *))
  52. 4600B Status
  53. 4600C Debug        (_res.options ^= RES_DEBUG)
  54. 4600D UseVC             (_res.options ^= RES_USEVC)
  55. 4600E Version        (unsigned int returned in R0 - currently &04090300)
  56. 4600F ShowAnswer
  57. 46010 DnComp        (as for API interface to dn_comp (resolv.h))
  58. 46011 DnExpand         (as for API interface to dn_expand (resolv.h))
  59. 46012 GetHostName    (int gethostname(char *))
  60. 46013 ResQuery        (int res_query(name,class,len,ansbuf,anslen))
  61.  
  62. *Command interface
  63.  
  64. GetHostByName <name>
  65. GetHostByAddr <IP address>
  66. ResQuery <name> <class> <type>
  67. HostName [<name>]
  68. DNSStatus        (calls DNSResolver_Status)
  69. DNSDebug        (calls DNSResolver_Debug)
  70. DNSClasses        (lists known classes)
  71. DNSLookups        (lists known lookups)
  72.  
  73. eg.
  74.  
  75. *ResQuery www.demon.co.uk IN A
  76. www.demon.co.uk. 180000 IN A 193.195.1.1
  77.  
  78. *ResQuery demon.co.uk IN NS
  79. demon.co.uk. 534386 IN NS ns0.demon.co.uk.
  80. demon.co.uk. 534368 IN NS ns2.demon.net.
  81. demon.co.uk. 534368 IN NS ns1.demon.co.uk.
  82.  
  83. *resquery demon.co.uk in soa
  84. demon.co.uk. 21351 IN SOA gate.demon.co.uk. hostmaster.demon.net. (
  85.    960207004 ; serial
  86.    10800 ; refresh (3 hours)
  87.    1200 ; retry (20 mins)
  88.    864000 ; expire (10 days)
  89.    54000 ) ; minimum (15 hours)
  90.  
  91. *ResQuery ecs.soton.ac.uk IN MX
  92. ecs.soton.ac.uk. 86000 IN MX 5 bright.ecs.soton.ac.uk.
  93. ecs.soton.ac.uk. 86000 IN MX 10 landlord.ecs.soton.ac.uk.
  94.  
  95. *gethostbyname alonzo
  96. 152.78.67.54
  97.  
  98. *gethostbyaddr 152.78.65.4
  99. renoir.ecs.soton.ac.uk
  100.  
  101.  
  102. SWI interface is as expected, parameters to res_query are passed in R0, R1
  103. etc. as needed.  Result is returned in R0.
  104.  
  105. Interface to dnsquery calls is defined is my own bind library header
  106. dnsquery.h
  107.  
  108. dnsquerylib requires c:o.c++lib OSlib & NetLib
  109.