anchor.diff:      end.
   
   %%%----------------------------------------------------------------
  +fmt_host(any) -> any;
   fmt_host(IP)  when is_tuple(IP) ->  inet:ntoa(IP);
   fmt_host(Str) when is_list(Str) -> Str.
  
positive.code:     daemon(Port, []).
  
  
  daemon(Port, UserOptions) when is_integer(Port), Port >= 0 ->
      daemon(any, Port, UserOptions);
  
  daemon(Socket, UserOptions) when is_port(Socket) ->
      daemon(socket, Socket, UserOptions).
  
  
  daemon(Host0, Port, UserOptions0) ->
      {Host, UserOptions} = handle_daemon_args(Host0, UserOptions0),
      start_daemon(Host, Port, ssh_options:handle_options(server, UserOptions)).
  
  %%--------------------------------------------------------------------
  -spec daemon_info(daemon_ref()) -> ok_error( [{atom(), term()}] ).
  
negative.code:     end.
  
  %%%----------------------------------------------------------------
  open_listen_socket(Host0, Port0, Options0) ->
      case ?GET_SOCKET_OPT(fd, Options0) of
          undefined ->
              {ok,LSock} = ssh_acceptor:listen(Port0, Options0),
              {ok,{_,LPort}} = inet:sockname(LSock),
              {{Host0,LPort}, LSock};
          
          Fd when is_integer(Fd) ->
              %% Do gen_tcp:listen with the option {fd,Fd}:
              {ok,LSock} = ssh_acceptor:listen(0, Options0),
              {ok,{LHost,LPort}} = inet:sockname(LSock),
              {{LHost,LPort}, LSock}
      end.
  
  %%%----------------------------------------------------------------
  finalize_start(Host, Port, Profile, Options0, F) ->
      Options = ?PUT_INTERNAL_OPT([{address, Host},
                                   {port, Port},
                                   {role, server}], Options0),
      case ssh_system_sup:system_supervisor(Host, Port, Profile) of
  	undefined ->
  	    try sshd_sup:start_child(Options) of
  