anchor.diff:  naptrlookup(Name) ->
       case inet_res:nslookup(Name, in, ?T_NAPTR) of
   	{ok, Rec} ->
  -	    NAPTRs = parse_naptrs(Rec),
  +	    NAPTRs = parse_naptr_answer(Rec#dns_rec.anlist),
   	    logger:log(debug, "Resolver: naptrlookup: ~p -> found ~p NAPTR record(s)",
   		       [Name, length(NAPTRs)]),
   	    NAPTRs;
  
positive.code: %% Descrip.: Walk through a list of srventry records or {error, R}
  %%           tuples and turn the srventry records into
  %%           {Proto, Host, Port} tuples.
  %% Returns : ProtoHostPortList
  %%           ProtoHostPortList = list() of {Proto, Host, Port}
  %%           Proto = tcp | udp | tls
  %%           Host  = string()
  %%           Port  = integer()
  %%--------------------------------------------------------------------
  combine_srvresults(In) ->
      combine_srvresults(In, [], []).
  
  combine_srvresults([], [], Errors) ->
      Errors;
  combine_srvresults([], Res, _) ->
      Res;
  combine_srvresults([{error, What} | T], Res, Errors) ->
      combine_srvresults(T, Res, lists:append(Errors, [{error, What}]));
  combine_srvresults([H | T], Res, Errors) when is_record(H, srventry) ->
      {_Order, _Weight, Port, Host} = H#srventry.dnsrrdata,
      combine_srvresults(T, lists:append(Res, [{H#srventry.proto, Host, Port}]), Errors).
  
  
  %%--------------------------------------------------------------------
  
negative.code: %% part of get_ip_port/2.
  %% Returns : AddrList        |
  %%           {error, Reason}
  %%           AddrList = list() of sipdns_hostport record()
  get_ip_port2(Family, Host, Port) when Family == inet ; Family == inet6 ->
      %% XXX inet:gethostbyname with proto inet6 is not documented, and not supported.
      case inet:gethostbyname(Host, Family) of
  