home *** CD-ROM | disk | FTP | other *** search
- ResolverZM 0.08 & libresolv
- ===========================
-
- This archive contains two related components. The first is a relocatable
- module "ResolverZM" which is a drop in replacement for InetDB or any other
- module providing DNS services via SWI chunk &46000. If you want to use it
- you should kill any other module using that SWI chunk first.
-
- The second is a statically linkable library called libresolv.o (and a
- module version called libresolvM.o) which will perform DNS lookups for
- an application. libresolv*.o also requires Acorn's c:o.c++lib, J Coxhead's
- OSLib & A Mell's NetLib (v3.1 or later) in order to link successfully.
-
- This will provide an API to gethostbyname gethostbyaddr and gethostname,
- plus a full multithreadable multitaskable library for performing lookups
- without blocking the machine. For more details of blocking API, see
- Netlib:h.resolv and Netlib:arpa.h.nameser. For more details of the
- non-blocking API see h.dnsquery and h.dnsquerymx in this archive.
- This is a BINARY ONLY distribution currently.
-
-
- ResolverZM
- ==========
-
- This module provides SWI chunk &46000 (same as InetDB) but provides
- much greater functionality at the SWI API level. eg. you have direct
- access to the res_query function, so you can resolve any type of
- address you want. A * command interface is also provided which
- calls the same functions internally.
-
- NOTE: The SWI chunk is owned by ANT Ltd. which gives them the
- right to define the SWI interface. However, they will not tell
- anybody the interface, despite the fact that modules such as
- Gnome's resolver and Adam Goodfellow's InetDB have been in
- circulation for years. Hence the API will not be compatible
- with their module, although GetHostByName and GetHostByAddr
- *appear* to be the same from reports sent to me by others.
-
- Current SWI interface (chunk name DNSResolver)
-
- 46000 GetHostByName (struct hostent *gethostbyname(name))
- 46001 GetHostByAddr (struct hostent *gethostbyaddr(addr,size,af))
- 46002 unused
- 46003 unused
- 46004 StartDNSQuery (dnsquery *dnsquery_new(name,class,type))
- 46005 CheckDNSQuery (dns_status dnsquery_check(dnsquery *))
- 46006 DisposeDNSQuery (void dsnquery_dispose(dnsquery *))
- 46007 GetQueryAnswerRaw (void *dnsquery_getanswerraw(dnsquery *, int *))
- 46008 MTGetHostByName (dnsquery *dnsquery_gethostbyname(name))
- 46009 MTGetHostByAddr (dnsquery *dnsquery_gethostbyaddr(addr,size,af))
- 4600A GetQueryAnswer (struct hostent *dnsquery_getanswer(dnsquery *))
- 4600B Status
- 4600C Debug (_res.options ^= RES_DEBUG)
- 4600D UseVC (_res.options ^= RES_USEVC)
- 4600E Version (unsigned int returned in R0 - currently &04090300)
- 4600F ShowAnswer
- 46010 DnComp (as for API interface to dn_comp (resolv.h))
- 46011 DnExpand (as for API interface to dn_expand (resolv.h))
- 46012 GetHostName (int gethostname(char *))
- 46013 ResQuery (int res_query(name,class,len,ansbuf,anslen))
-
- *Command interface
-
- GetHostByName <name>
- GetHostByAddr <IP address>
- ResQuery <name> <class> <type>
- HostName [<name>]
- DNSStatus (calls DNSResolver_Status)
- DNSDebug (calls DNSResolver_Debug)
- DNSClasses (lists known classes)
- DNSLookups (lists known lookups)
-
- eg.
-
- *ResQuery www.demon.co.uk IN A
- www.demon.co.uk. 180000 IN A 193.195.1.1
-
- *ResQuery demon.co.uk IN NS
- demon.co.uk. 534386 IN NS ns0.demon.co.uk.
- demon.co.uk. 534368 IN NS ns2.demon.net.
- demon.co.uk. 534368 IN NS ns1.demon.co.uk.
-
- *resquery demon.co.uk in soa
- demon.co.uk. 21351 IN SOA gate.demon.co.uk. hostmaster.demon.net. (
- 960207004 ; serial
- 10800 ; refresh (3 hours)
- 1200 ; retry (20 mins)
- 864000 ; expire (10 days)
- 54000 ) ; minimum (15 hours)
-
- *ResQuery ecs.soton.ac.uk IN MX
- ecs.soton.ac.uk. 86000 IN MX 5 bright.ecs.soton.ac.uk.
- ecs.soton.ac.uk. 86000 IN MX 10 landlord.ecs.soton.ac.uk.
-
- *gethostbyname alonzo
- 152.78.67.54
-
- *gethostbyaddr 152.78.65.4
- renoir.ecs.soton.ac.uk
-
-
- SWI interface is as expected, parameters to res_query are passed in R0, R1
- etc. as needed. Result is returned in R0.
-
- Interface to dnsquery calls is defined is my own bind library header
- dnsquery.h
-
- dnsquerylib requires c:o.c++lib OSlib & NetLib
-