anchor.diff:  
   
   %% @doc Finds published services using DNS NAPTR search.
  --spec get_naptr(string(), map()) -> 
  +-spec get_naptr(string()|binary()) -> 
  +    [{sip|sips, nkpacket:transport(), string()}].
  +
  +get_naptr(Domain) ->
  +    get_naptr(Domain, #{}).
  +
  +
  +%% @doc Finds published services using DNS NAPTR search.
  +-spec get_naptr(string()|binary(), opts()) -> 
       [{sip|sips, nkpacket:transport(), string()}].
   
   %% TODO: Check site certificates in case of tls
   get_naptr(Domain, Opts) ->
  -    case get_cache({naptr, Domain}, Opts) of
  +    Domain1 = nklib_util:to_list(Domain),
  +    case get_cache({naptr, Domain1}, Opts) of
           undefined ->
  -            Naptr = case inet_res:lookup(Domain, in, naptr) of
  +            Naptr = case inet_res:lookup(Domain1, in, naptr) of
                   [] ->
                       [];
                   Res ->
                       [Value || Term <- lists:sort(Res), 
                                 (Value = naptr_filter(Term)) /= false]
               end,
  -            save_cache({naptr, Domain}, Naptr),
  +            save_cache({naptr, Domain1}, Naptr),
               Naptr;
           Naptr ->
               Naptr
  
positive.code: 
  %% @doc Gets all hosts for a SRV domain, sorting the result
  %% according to RFC2782
  -spec get_srvs(string(), opts()) ->
      [{string(), inet:port_number()}].
  
  get_srvs(Domain, Opts) ->
      case get_cache({srvs, Domain}, Opts) of
          undefined ->
              Srvs = case inet_res:lookup(Domain, in, srv) of
                  [] -> [];
                  Res -> [{O, W, {D, P}} || {O, W, P, D} <- Res]
              end,
              save_cache({srvs, Domain}, Srvs),
              rfc2782_sort(Srvs);
          Srvs ->
              rfc2782_sort(Srvs)
      end.
  
  
  %% @doc Gets all IPs for this host, or `[]' if not found.
  
negative.code: -behaviour(gen_server).
  
  -export([resolve/1, resolve/2, resolve_uri/2]).
  -export([get_ips/1, get_ips/2, get_srvs/1, get_srvs/2, get_naptr/1, get_naptr/2]).
  -export([clear/1, clear/0]).
  -export([start_link/0, init/1, terminate/2, code_change/3, handle_call/3, handle_cast/2,
           handle_info/2]).
  
  