From bae409071522ae65c02bc36fccb87ee2a7179edf Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Mon, 10 May 2010 22:32:52 +0200 Subject: Backport of the proxycommand feature --- include/libssh/libssh.h | 3 ++- include/libssh/session.h | 1 + include/libssh/socket.h | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 75e7da0e..c25f8e67 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -264,7 +264,8 @@ enum ssh_options_e { SSH_OPTIONS_CIPHERS_C_S, SSH_OPTIONS_CIPHERS_S_C, SSH_OPTIONS_COMPRESSION_C_S, - SSH_OPTIONS_COMPRESSION_S_C + SSH_OPTIONS_COMPRESSION_S_C, + SSH_OPTIONS_PROXYCOMMAND }; enum { diff --git a/include/libssh/session.h b/include/libssh/session.h index 9bd97315..e95e2351 100644 --- a/include/libssh/session.h +++ b/include/libssh/session.h @@ -114,6 +114,7 @@ struct ssh_session_struct { socket_t fd; int ssh2; int ssh1; + char *ProxyCommand; }; int ssh_handle_packets(ssh_session session); diff --git a/include/libssh/socket.h b/include/libssh/socket.h index bb54c7ea..ade755d7 100644 --- a/include/libssh/socket.h +++ b/include/libssh/socket.h @@ -52,4 +52,10 @@ int ssh_socket_get_status(struct socket *s); int ssh_socket_data_available(struct socket *s); int ssh_socket_data_writable(struct socket *s); +#ifndef _WIN32 +void ssh_execute_command(const char *command, socket_t in, socket_t out); +socket_t ssh_socket_connect_proxycommand(ssh_session session, + const char *command); +#endif + #endif /* SOCKET_H_ */ -- cgit