anchor.diff:      lists:map(Fun, IPs).
   
   %%%----------------------------------------------------------------
  +is_host(X, Opts) ->
  +    try is_host1(mangle_connect_address(X, Opts))
  +    catch
  +        _:_ -> false
  +    end.
  +            
  +
  +is_host1(L) when is_list(L) -> true; %% "string()"
  +is_host1(T) when is_tuple(T), size(T)==4 -> lists:all(fun(I) -> 0=<I andalso I=<255 end,
  +                                                      tuple_to_list(T));
  +is_host1(T) when is_tuple(T), size(T)==16 -> lists:all(fun(I) -> 0=<I andalso I=<65535 end,
  +                                                       tuple_to_list(T));
  +is_host1(loopback) -> true.
  +
  +%%%----------------------------------------------------------------
   mangle_connect_address(A, SockOpts) ->
       mangle_connect_address1(A, proplists:get_value(inet6,SockOpts,false)).
   
  
positive.code:                {error,SockError} ->
                     {error,SockError}
             end
          end;
  
  connect(Host, Port, Options) when is_integer(Port),
                                    Port>0,
                                    is_list(Options) ->
      connect(Host, Port, Options, infinity).
  
  
  -spec connect(Host, Port, Options, NegotiationTimeout) -> {ok,connection_ref()} | {error,term()} when
  
negative.code: 	    Error
      end;
  
  shell(Dest) ->
      case is_host(Dest, []) of
          true ->
              shell(Dest, ?SSH_DEFAULT_PORT, []);
          false ->
              %% Maybe socket
              shell_socket(Dest, [])
      end.
  
  
  
  -spec shell(open_socket() | host(), client_options()) ->  _.
  
  shell(Dest, Options) ->
      case is_host(Dest, Options) of
          true ->
              shell(Dest, ?SSH_DEFAULT_PORT, Options);
          false ->
              %% Maybe socket
              shell_socket(Dest, Options)
      end.
  
  shell_socket(Socket, Options) ->
      case connect(Socket, Options) of
          {ok,ConnectionRef} ->
              shell(ConnectionRef),
              close(ConnectionRef);
          Error ->
              Error
      end.
      
  
  
  -spec shell(Host, Port, Options) -> _ when
  