aboutsummaryrefslogtreecommitdiff
path: root/include/libssh/channels.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libssh/channels.h')
-rw-r--r--include/libssh/channels.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/libssh/channels.h b/include/libssh/channels.h
index cd91793c..4bfcb524 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);