1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2026-01-06 14:21:55 +03:00

ssh_socket support for 2 fd + Proxyhost command

This commit is contained in:
Aris Adamantiadis
2010-05-09 00:48:10 +02:00
parent 7886326aa8
commit f31a14b793
10 changed files with 251 additions and 89 deletions

View File

@@ -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 {

View File

@@ -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);

View File

@@ -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_ */