diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-12-03 23:55:46 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-12-03 23:55:46 +0100 |
commit | 2f6fbbd7065c16b48dcba357589a62c4dd05e0b2 (patch) | |
tree | ee113fc0ad0a11af510335283096da52617c2678 /include/libssh/session.h | |
parent | 4924ac8099be6fbd1f137c2887d3cb906e876170 (diff) | |
download | libssh-2f6fbbd7065c16b48dcba357589a62c4dd05e0b2.tar.gz libssh-2f6fbbd7065c16b48dcba357589a62c4dd05e0b2.tar.xz libssh-2f6fbbd7065c16b48dcba357589a62c4dd05e0b2.zip |
Trying to adapt client.c to use callbacks
Diffstat (limited to 'include/libssh/session.h')
-rw-r--r-- | include/libssh/session.h | 12 |
1 files changed, 12 insertions, 0 deletions
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. |