Trying to adapt client.c to use callbacks

This commit is contained in:
Aris Adamantiadis
2009-12-03 23:55:46 +01:00
parent 4924ac8099
commit 2f6fbbd706
2 changed files with 84 additions and 47 deletions

View File

@@ -27,6 +27,17 @@
typedef struct ssh_kbdint_struct* ssh_kbdint;
/* These are the different states a SSH session can be into its life */
enum ssh_session_state_e {
SSH_SESSION_STATE_NONE,
SSH_SESSION_STATE_CONNECTING,
SSH_SESSION_STATE_SOCKET_CONNECTED,
SSH_SESSION_STATE_BANNER_RECEIVED,
SSH_SESSION_STATE_INITIAL_KEX,
SSH_SESSION_STATE_AUTHENTICATED,
SSH_SESSION_STATE_ERROR
};
struct ssh_session_struct {
struct error_struct error;
struct socket *socket;
@@ -63,6 +74,7 @@ struct ssh_session_struct {
/* the states are used by the nonblocking stuff to remember */
/* where it was before being interrupted */
enum ssh_session_state_e session_state;
int packet_state;
int dh_handshake_state;
ssh_string dh_server_signature; //information used by dh_handshake.