00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef CHANNELS_H_
00023 #define CHANNELS_H_
00024 #include "libssh/priv.h"
00025
00026 struct ssh_channel_struct {
00027 struct ssh_channel_struct *prev;
00028 struct ssh_channel_struct *next;
00029 ssh_session session;
00030 uint32_t local_channel;
00031 uint32_t local_window;
00032 int local_eof;
00033 uint32_t local_maxpacket;
00034
00035 uint32_t remote_channel;
00036 uint32_t remote_window;
00037 int remote_eof;
00038 uint32_t remote_maxpacket;
00039 int open;
00040 int delayed_close;
00041 ssh_buffer stdout_buffer;
00042 ssh_buffer stderr_buffer;
00043 void *userarg;
00044 int version;
00045 int blocking;
00046 int exit_status;
00047 };
00048
00049 void channel_handle(ssh_session session, int type);
00050 ssh_channel channel_new(ssh_session session);
00051 int channel_default_bufferize(ssh_channel channel, void *data, int len,
00052 int is_stderr);
00053 uint32_t ssh_channel_new_id(ssh_session session);
00054 ssh_channel ssh_channel_from_local(ssh_session session, uint32_t id);
00055 int channel_write_common(ssh_channel channel, const void *data,
00056 uint32_t len, int is_stderr);
00057
00058 #endif