diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-01-03 22:14:21 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-01-03 22:14:21 +0100 |
commit | 648e5d62bad63c90d6c5eca3665a1b5572307656 (patch) | |
tree | f5ec65d69167016b4ed4dc467bf26942acb1065f /include/libssh | |
parent | 49de20aa5c34b86c6f1cd064d46aa5748d654b3d (diff) | |
download | libssh-648e5d62bad63c90d6c5eca3665a1b5572307656.tar.gz libssh-648e5d62bad63c90d6c5eca3665a1b5572307656.tar.xz libssh-648e5d62bad63c90d6c5eca3665a1b5572307656.zip |
Some work for async channel requests
Diffstat (limited to 'include/libssh')
-rw-r--r-- | include/libssh/channels.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/libssh/channels.h b/include/libssh/channels.h index cd91793..4bfcb52 100644 --- a/include/libssh/channels.h +++ b/include/libssh/channels.h @@ -23,6 +23,23 @@ #define CHANNELS_H_ #include "libssh/priv.h" +/** @internal + * Describes the different possible states in a + * outgoing (client) channel request + */ +enum ssh_channel_request_state_e { + /** No request has been made */ + SSH_CHANNEL_REQ_STATE_NONE = 0, + /** A request has been made and answer is pending */ + SSH_CHANNEL_REQ_STATE_PENDING, + /** A request has been replied and accepted */ + SSH_CHANNEL_REQ_STATE_ACCEPTED, + /** A request has been replied and refused */ + SSH_CHANNEL_REQ_STATE_DENIED, + /** A request has been replied and an error happend */ + SSH_CHANNEL_REQ_STATE_ERROR +}; + struct ssh_channel_struct { struct ssh_channel_struct *prev; struct ssh_channel_struct *next; @@ -44,10 +61,13 @@ struct ssh_channel_struct { int version; int blocking; int exit_status; + enum ssh_channel_request_state_e request_state; }; SSH_PACKET_CALLBACK(ssh_packet_channel_open_conf); SSH_PACKET_CALLBACK(ssh_packet_channel_open_fail); +SSH_PACKET_CALLBACK(ssh_packet_channel_success); +SSH_PACKET_CALLBACK(ssh_packet_channel_failure); void channel_handle(ssh_session session, int type); ssh_channel channel_new(ssh_session session); |