DNS/CMD and DNS2/CMD, Domain Name Service client lookup demos

The DNS/CMD demo program performs Domain Name Service (DNS) lookups and inverse lookups.

	DNS <host name>
	DNS -I <IP address>

Without the -I switch, DNS/CMD attempts to find IP addresses associated with the given host name. First it checks in the HOSTS/TXT file using the dnshost assembly module. If no matching entry is found, the DNS server listed in DHCP/CFG is queried using the dnslook assembly module, and all matching IP addresses are listed.

The -I switch performs an inverse DNS lookup. That is, it attempts to find a local or fully-qualified domain name for the given IP address.


DNS2/CMD is a simplified version of DNS/CMD. It simply returns the first matching IP address found. The assembly code for interfacing with the supplied assembly modules is extremely simple.

	DNS2 <host name>

DNS2 does not support inverse DNS lookups.


Source code for both DNS demos is included. To build new versions of the programs using the MRAS assembler, enter these commands:

	ATTRIB DNS/CMD.UTILITY:0 (PROT=FULL)
	MRAS DNS
	DO DNS

The "DO" command runs a linker script that outputs the executable program file. Replace "DNS" with "DNS2" to build that demo instead.


Back to the main page