diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-07-24 22:15:33 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-07-24 22:15:33 +0200 |
commit | 2bc8819e8f68014ba35d03e56393e4d0c16386f8 (patch) | |
tree | fc0b96589e24be0b1029b501ea8697b2d92d24f7 /include | |
parent | 23b6c95e04adeff7cf49d7d8dffc74f1e3e4bc60 (diff) | |
download | libssh-2bc8819e8f68014ba35d03e56393e4d0c16386f8.tar.gz libssh-2bc8819e8f68014ba35d03e56393e4d0c16386f8.tar.xz libssh-2bc8819e8f68014ba35d03e56393e4d0c16386f8.zip |
Changes all CHANNEL * to ssh_channel
Diffstat (limited to 'include')
-rw-r--r-- | include/libssh/libssh.h | 56 | ||||
-rw-r--r-- | include/libssh/priv.h | 22 | ||||
-rw-r--r-- | include/libssh/server.h | 4 | ||||
-rw-r--r-- | include/libssh/sftp.h | 4 |
4 files changed, 43 insertions, 43 deletions
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 6124c7d0..73ea536d 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -76,8 +76,8 @@ typedef struct ssh_string_struct STRING; typedef struct ssh_buffer_struct BUFFER; typedef struct ssh_public_key_struct PUBLIC_KEY; typedef struct ssh_private_key_struct PRIVATE_KEY; -#endif typedef struct ssh_channel_struct CHANNEL; +#endif typedef struct ssh_agent_struct AGENT; //#endif @@ -257,7 +257,7 @@ ssh_string ssh_get_pubkey(SSH_SESSION *session); /* in connect.c */ int ssh_fd_poll(SSH_SESSION *session,int *write, int *except); -int ssh_select(CHANNEL **channels, CHANNEL **outchannels, socket_t maxfd, +int ssh_select(ssh_channel *channels, ssh_channel *outchannels, socket_t maxfd, fd_set *readfds, struct timeval *timeout); void publickey_free(ssh_public_key key); @@ -276,37 +276,37 @@ int ssh_write_knownhost(SSH_SESSION *session); /* in channels.c */ -CHANNEL *channel_new(SSH_SESSION *session); -int channel_open_forward(CHANNEL *channel, const char *remotehost, +ssh_channel channel_new(SSH_SESSION *session); +int channel_open_forward(ssh_channel channel, const char *remotehost, int remoteport, const char *sourcehost, int localport); -int channel_open_session(CHANNEL *channel); -void channel_free(CHANNEL *channel); -int channel_request_pty(CHANNEL *channel); -int channel_request_pty_size(CHANNEL *channel, const char *term, +int channel_open_session(ssh_channel channel); +void channel_free(ssh_channel channel); +int channel_request_pty(ssh_channel channel); +int channel_request_pty_size(ssh_channel channel, const char *term, int cols, int rows); -int channel_change_pty_size(CHANNEL *channel,int cols,int rows); -int channel_request_shell(CHANNEL *channel); -int channel_request_subsystem(CHANNEL *channel, const char *system); -int channel_request_env(CHANNEL *channel, const char *name, const char *value); -int channel_request_exec(CHANNEL *channel, const char *cmd); -int channel_request_sftp(CHANNEL *channel); -int channel_write(CHANNEL *channel, const void *data, u32 len); -int channel_send_eof(CHANNEL *channel); -int channel_is_eof(CHANNEL *channel); -int channel_read(CHANNEL *channel, void *dest, u32 count, int is_stderr); -int channel_read_buffer(CHANNEL *channel, ssh_buffer buffer, u32 count, +int channel_change_pty_size(ssh_channel channel,int cols,int rows); +int channel_request_shell(ssh_channel channel); +int channel_request_subsystem(ssh_channel channel, const char *system); +int channel_request_env(ssh_channel channel, const char *name, const char *value); +int channel_request_exec(ssh_channel channel, const char *cmd); +int channel_request_sftp(ssh_channel channel); +int channel_write(ssh_channel channel, const void *data, u32 len); +int channel_send_eof(ssh_channel channel); +int channel_is_eof(ssh_channel channel); +int channel_read(ssh_channel channel, void *dest, u32 count, int is_stderr); +int channel_read_buffer(ssh_channel channel, ssh_buffer buffer, u32 count, int is_stderr); -int channel_poll(CHANNEL *channel, int is_stderr); -int channel_close(CHANNEL *channel); -void channel_set_blocking(CHANNEL *channel, int blocking); -int channel_read_nonblocking(CHANNEL *channel, void *dest, u32 count, +int channel_poll(ssh_channel channel, int is_stderr); +int channel_close(ssh_channel channel); +void channel_set_blocking(ssh_channel channel, int blocking); +int channel_read_nonblocking(ssh_channel channel, void *dest, u32 count, int is_stderr); -int channel_is_open(CHANNEL *channel); -int channel_is_closed(CHANNEL *channel); -int channel_select(CHANNEL **readchans, CHANNEL **writechans, CHANNEL **exceptchans, struct +int channel_is_open(ssh_channel channel); +int channel_is_closed(ssh_channel channel); +int channel_select(ssh_channel *readchans, ssh_channel *writechans, ssh_channel *exceptchans, struct timeval * timeout); -SSH_SESSION *channel_get_session(CHANNEL *channel); -int channel_get_exit_status(CHANNEL *channel); +SSH_SESSION *channel_get_session(ssh_channel channel); +int channel_get_exit_status(ssh_channel channel); /* in options.c */ /** diff --git a/include/libssh/priv.h b/include/libssh/priv.h index be7185d5..b951cbcd 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -378,7 +378,7 @@ struct ssh_session { CRYPTO *current_crypto; CRYPTO *next_crypto; /* next_crypto is going to be used after a SSH2_MSG_NEWKEYS */ - CHANNEL *channels; /* linked list of channels */ + ssh_channel channels; /* linked list of channels */ int maxchannel; int exec_channel_opened; /* version 1 only. more info in channels1.c */ @@ -441,7 +441,7 @@ struct ssh_service_request { struct ssh_channel_request { int type; - CHANNEL *channel; + ssh_channel channel; u8 want_reply; /* pty-req type specifics */ char *TERM; @@ -678,11 +678,11 @@ ssh_string ssh_sign_session_id(SSH_SESSION *session, ssh_private_key privatekey) ssh_string ssh_encrypt_rsa1(SSH_SESSION *session, ssh_string data, ssh_public_key key); /* channel.c */ void channel_handle(SSH_SESSION *session, int type); -CHANNEL *channel_new(SSH_SESSION *session); -int channel_default_bufferize(CHANNEL *channel, void *data, int len, +ssh_channel channel_new(SSH_SESSION *session); +int channel_default_bufferize(ssh_channel channel, void *data, int len, int is_stderr); u32 ssh_channel_new_id(SSH_SESSION *session); -CHANNEL *ssh_channel_from_local(SSH_SESSION *session, u32 id); +ssh_channel ssh_channel_from_local(SSH_SESSION *session, u32 id); /* options.c */ @@ -788,14 +788,14 @@ const void *_ssh_list_get_head(struct ssh_list *list); /* channels1.c */ -int channel_open_session1(CHANNEL *channel); -int channel_request_pty_size1(CHANNEL *channel, const char *terminal, +int channel_open_session1(ssh_channel channel); +int channel_request_pty_size1(ssh_channel channel, const char *terminal, int cols, int rows); -int channel_change_pty_size1(CHANNEL *channel, int cols, int rows); -int channel_request_shell1(CHANNEL *channel); -int channel_request_exec1(CHANNEL *channel, const char *cmd); +int channel_change_pty_size1(ssh_channel channel, int cols, int rows); +int channel_request_shell1(ssh_channel channel); +int channel_request_exec1(ssh_channel channel, const char *cmd); int channel_handle1(SSH_SESSION *session, int type); -int channel_write1(CHANNEL *channel, const void *data, int len); +int channel_write1(ssh_channel channel, const void *data, int len); /* session.c */ diff --git a/include/libssh/server.h b/include/libssh/server.h index 915edd8d..0fa8c1b2 100644 --- a/include/libssh/server.h +++ b/include/libssh/server.h @@ -162,9 +162,9 @@ char *ssh_message_auth_password(SSH_MESSAGE *msg); int ssh_message_auth_reply_success(SSH_MESSAGE *msg,int partial); int ssh_message_auth_set_methods(SSH_MESSAGE *msg, int methods); -CHANNEL *ssh_message_channel_request_open_reply_accept(SSH_MESSAGE *msg); +ssh_channel ssh_message_channel_request_open_reply_accept(SSH_MESSAGE *msg); -CHANNEL *ssh_message_channel_request_channel(SSH_MESSAGE *msg); +ssh_channel ssh_message_channel_request_channel(SSH_MESSAGE *msg); // returns the TERM env variable char *ssh_message_channel_request_pty_term(SSH_MESSAGE *msg); char *ssh_message_channel_request_subsystem(SSH_MESSAGE *msg); diff --git a/include/libssh/sftp.h b/include/libssh/sftp.h index e747e881..987c4635 100644 --- a/include/libssh/sftp.h +++ b/include/libssh/sftp.h @@ -60,7 +60,7 @@ extern "C" { typedef struct sftp_session_struct { SSH_SESSION *session; - CHANNEL *channel; + ssh_channel channel; int server_version; int client_version; int version; @@ -622,7 +622,7 @@ int sftp_server_version(SFTP_SESSION *sftp); * * @return A new sftp server session. */ -SFTP_SESSION *sftp_server_new(SSH_SESSION *session, CHANNEL *chan); +SFTP_SESSION *sftp_server_new(SSH_SESSION *session, ssh_channel chan); /** * @brief Intialize the sftp server. |