Made parts of SSH asynchronous (inc kex1)

This commit is contained in:
Aris Adamantiadis
2010-01-24 21:03:03 +01:00
parent 6ae558b541
commit 758df26582
9 changed files with 201 additions and 210 deletions

View File

@@ -78,5 +78,9 @@ uint32_t ssh_channel_new_id(ssh_session session);
ssh_channel ssh_channel_from_local(ssh_session session, uint32_t id);
int channel_write_common(ssh_channel channel, const void *data,
uint32_t len, int is_stderr);
#ifdef WITH_SSH1
SSH_PACKET_CALLBACK(ssh_packet_data1);
SSH_PACKET_CALLBACK(ssh_packet_close1);
#endif
#endif /* CHANNELS_H_ */

View File

@@ -26,5 +26,8 @@
#include "libssh/callbacks.h"
SSH_PACKET_CALLBACK(ssh_packet_kexinit);
#ifdef WITH_SSH1
SSH_PACKET_CALLBACK(ssh_packet_publickey1);
#endif
#endif /* KEX_H_ */

View File

@@ -47,12 +47,16 @@ int packet_read(ssh_session session);
int packet_send1(ssh_session session) ;
void ssh_packet_set_default_callbacks1(ssh_session session);
SSH_PACKET_CALLBACK(ssh_packet_disconnect1);
SSH_PACKET_CALLBACK(ssh_packet_smsg_success1);
SSH_PACKET_CALLBACK(ssh_packet_smsg_failure1);
#endif
int packet_translate(ssh_session session);
/* TODO: remove it when packet_wait is stripped out from libssh */
#ifdef WITH_SSH1
int packet_wait(ssh_session session,int type,int blocking);
//int packet_wait(ssh_session session,int type,int blocking);
#endif
int packet_flush(ssh_session session, int enforce_blocking);

View File

@@ -191,6 +191,7 @@ int ssh_userauth1_offer_pubkey(ssh_session session, const char *username,
int ssh_userauth1_password(ssh_session session, const char *username,
const char *password);
#ifdef WITH_SSH1
/* channels1.c */
int channel_open_session1(ssh_channel channel);
int channel_request_pty_size1(ssh_channel channel, const char *terminal,
@@ -198,9 +199,9 @@ int channel_request_pty_size1(ssh_channel channel, const char *terminal,
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(ssh_channel channel, const void *data, int len);
#endif
/* match.c */
int match_hostname(const char *host, const char *pattern, unsigned int len);