anchor.diff:           packet_length_too_short/1,
            preferred_algorithms/1,
            service_name_length_too_large/1,
  -         service_name_length_too_short/1
  +         service_name_length_too_short/1,
  +         client_close_after_hello/1
           ]).
   
   -define(NEWLINE, <<"\r\n">>).
  
positive.code:      {group,packet_size_error},
       {group,field_size_error},
       {group,ext_info},
       {group,preferred_algorithms}
      ].
  
  groups() ->
  
negative.code: 	   tcp_closed,
  	   {tcp_error,econnaborted}
  	  ]}.
  
  %%%----------------------------------------------------------------
  find_handshake_parent(Port) ->
      Acc = {_Parents=[], _Connections=[], _Handshakers=[]},
      find_handshake_parent(supervisor:which_children(sshd_sup), Port, Acc).
  
  
  find_handshake_parent([{{ssh_system_sup,{address,_,Port,_}},
                          Pid,supervisor, [ssh_system_sup]}|_],
                        Port, Acc) ->
      find_handshake_parent(supervisor:which_children(Pid), Port, Acc);
  
  find_handshake_parent([{{ssh_acceptor_sup,{address,_,Port,_}},
                          PidS,supervisor,[ssh_acceptor_sup]}|T],
                         Port, {AccP,AccC,AccH}) ->
      ParentHandshakers =
          [{PidW,PidH} ||
              {{ssh_acceptor_sup,{address,_,Port1,_}}, PidW, worker, [ssh_acceptor]} <-
                  supervisor:which_children(PidS),
              Port1 == Port,
              PidH <- element(2, process_info(PidW,links)),
              is_pid(PidH),
              process_info(PidH,current_function) == {current_function,{ssh_connection_handler,handshake,3}}],
      {Parents,Handshakers} = lists:unzip(ParentHandshakers),
      find_handshake_parent(T, Port, {AccP++Parents, AccC, AccH++Handshakers});
  
  find_handshake_parent([{_Ref,PidS,supervisor,[ssh_subsystem_sup]}|T], Port, {AccP,AccC,AccH}) ->
      Connections =
          [Pid || {connection,Pid,worker,[ssh_connection_handler]} <- supervisor:which_children(PidS)],
      find_handshake_parent(T, Port, {AccP, AccC++Connections, AccH});
  
  find_handshake_parent([_|T], Port, Acc) ->
      find_handshake_parent(T, Port, Acc);
  
  find_handshake_parent(_, _,  {AccP,AccC,AccH}) ->
      {lists:usort(AccP), lists:usort(AccC), lists:usort(AccH)}.
  