From 2f6fbbd7065c16b48dcba357589a62c4dd05e0b2 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Thu, 3 Dec 2009 23:55:46 +0100 Subject: Trying to adapt client.c to use callbacks --- include/libssh/session.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/libssh') diff --git a/include/libssh/session.h b/include/libssh/session.h index 0a5ad85..c8736dd 100644 --- a/include/libssh/session.h +++ b/include/libssh/session.h @@ -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. -- cgit