aboutsummaryrefslogtreecommitdiff
path: root/include/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-05-09 00:48:10 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-05-09 00:48:10 +0200
commitf31a14b7932ef4cc165ddd8f1f1a5b23eb21beb3 (patch)
tree2b4149ee9bbd8c264e63de9653d026f29d028a61 /include/libssh
parent7886326aa8a4ac2242c743bfe38f4266b0d24551 (diff)
downloadlibssh-f31a14b7932ef4cc165ddd8f1f1a5b23eb21beb3.tar.gz
libssh-f31a14b7932ef4cc165ddd8f1f1a5b23eb21beb3.tar.xz
libssh-f31a14b7932ef4cc165ddd8f1f1a5b23eb21beb3.zip
ssh_socket support for 2 fd + Proxyhost command
Diffstat (limited to 'include/libssh')
-rw-r--r--include/libssh/libssh.h3
-rw-r--r--include/libssh/session.h1
-rw-r--r--include/libssh/socket.h11
3 files changed, 11 insertions, 4 deletions
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h
index 0b9d5a44..d3ba1869 100644
--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -282,7 +282,8 @@ enum ssh_options_e {
SSH_OPTIONS_CIPHERS_S_C,
SSH_OPTIONS_COMPRESSION_C_S,
SSH_OPTIONS_COMPRESSION_S_C,
- SSH_OPTIONS_HOSTKEYCHECK
+ SSH_OPTIONS_HOSTKEYCHECK,
+ SSH_OPTIONS_PROXYCOMMAND
};
enum {
diff --git a/include/libssh/session.h b/include/libssh/session.h
index bc421c45..f4810e24 100644
--- a/include/libssh/session.h
+++ b/include/libssh/session.h
@@ -142,6 +142,7 @@ struct ssh_session_struct {
int ssh2;
int ssh1;
int StrictHostKeyChecking;
+ char *ProxyCommand;
};
int ssh_handle_packets(ssh_session session, int timeout);
diff --git a/include/libssh/socket.h b/include/libssh/socket.h
index c0bc7d52..9a2ee20d 100644
--- a/include/libssh/socket.h
+++ b/include/libssh/socket.h
@@ -33,9 +33,11 @@ int ssh_socket_init(void);
ssh_socket ssh_socket_new(ssh_session session);
void ssh_socket_free(ssh_socket s);
void ssh_socket_set_fd(ssh_socket s, socket_t fd);
-socket_t ssh_socket_get_fd(ssh_socket s);
+socket_t ssh_socket_get_fd_in(ssh_socket s);
#ifndef _WIN32
int ssh_socket_unix(ssh_socket s, const char *path);
+void ssh_execute_command(const char *command, socket_t in, socket_t out);
+int ssh_socket_connect_proxycommand(ssh_socket s, const char *command);
#endif
void ssh_socket_close(ssh_socket s);
int ssh_socket_read(ssh_socket s, void *buffer, int len);
@@ -43,6 +45,8 @@ int ssh_socket_write(ssh_socket s,const void *buffer, int len);
int ssh_socket_is_open(ssh_socket s);
int ssh_socket_fd_isset(ssh_socket s, fd_set *set);
void ssh_socket_fd_set(ssh_socket s, fd_set *set, int *fd_max);
+void ssh_socket_set_fd_in(ssh_socket s, socket_t fd);
+void ssh_socket_set_fd_out(ssh_socket s, socket_t fd);
int ssh_socket_completeread(ssh_socket s, void *buffer, uint32_t len);
int ssh_socket_completewrite(ssh_socket s, const void *buffer, uint32_t len);
int ssh_socket_wait_for_data(ssh_socket s, ssh_session session, uint32_t len);
@@ -58,8 +62,9 @@ int ssh_socket_data_writable(ssh_socket s);
void ssh_socket_set_callbacks(ssh_socket s, ssh_socket_callbacks callbacks);
int ssh_socket_pollcallback(struct ssh_poll_handle_struct *p, int fd, int revents, void *s);
-void ssh_socket_register_pollcallback(ssh_socket s, struct ssh_poll_handle_struct *p);
-struct ssh_poll_handle_struct * ssh_socket_get_poll_handle(ssh_socket s);
+struct ssh_poll_handle_struct * ssh_socket_get_poll_handle_in(ssh_socket s);
+struct ssh_poll_handle_struct * ssh_socket_get_poll_handle_out(ssh_socket s);
+
int ssh_socket_connect(ssh_socket s, const char *host, int port, const char *bind_addr);
#endif /* SOCKET_H_ */