anchor.diff:      {Domain, Class, Type, Data}.
   
   
  -%% Lowercase the domain name before storage.
  -%%
  -lower_rr(#dns_rr{domain=Domain}=RR) when is_list(Domain) ->
  -    RR#dns_rr { domain = tolower(Domain) };
  -lower_rr(RR) -> RR.
  -
   %%
   %% Case fold upper-case to lower-case according to RFC 4343
   %% "Domain Name System (DNS) Case Insensitivity Clarification".
  
positive.code: %%
  res_gethostbyaddr(IP, Rec) ->
      {ok, {IP1, HType, HLen}} = dnt(IP),
      RRs = lists:map(fun lower_rr/1, Rec#dns_rec.anlist),
      res_cache_answer(Rec#dns_rec{anlist = RRs}),
      ent_gethostbyaddr(Rec#dns_rec.anlist, IP1, HType, HLen).
  
  ent_gethostbyaddr(RRs, IP, AddrType, Length) ->
      case RRs of
  	[] -> {error, nxdomain};
  	[RR|TR] ->
  	    %% debug
  	    if TR =/= [] ->
  		    ?dbg("gethostbyaddr found extra=~p~n", [TR]);
  	       true -> ok
  	    end,
              Type = RR#dns_rr.type,
  	    Domain = RR#dns_rr.data,
  	    H = #hostent { h_name = Domain,
  			   h_aliases = lookup_cname(Domain, Type),
  			   h_addr_list = [IP],
  			   h_addrtype = AddrType,
  			   h_length = Length },
  	    {ok, H}
      end.
  
  dnip(IP) ->
      case dnt(IP) of
  
negative.code: del_rr(Domain, Class, Type, Data) ->
      call({del_rr, dns_rr_match(Domain, Class, Type, Data)}).
  
  res_cache_answer(RRs) ->
      lists:foreach(fun add_rr/1, RRs).
  
      
  
  