summaryrefslogtreecommitdiffstats
path: root/include/libssh/priv.h
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-06-18 23:48:55 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-06-18 23:48:55 +0200
commit1bea53375b2fb764d9a900a0946d71d7baafb00f (patch)
tree2b10cc34633155a0287895ac4120c09d146acbf1 /include/libssh/priv.h
parent3af55a4f49f32ba73af86c6c47f0ed05044eec13 (diff)
downloadlibssh-1bea53375b2fb764d9a900a0946d71d7baafb00f.tar.gz
libssh-1bea53375b2fb764d9a900a0946d71d7baafb00f.tar.xz
libssh-1bea53375b2fb764d9a900a0946d71d7baafb00f.zip
added ssh_message_callback support.
Not fully working yet. User can set his ssh_message_callback, and the function ssh_execute_message_callbacks will call them when appropriate. Messages are correctly stacked (in packet_parse) but no call to ssh_execute_callbacks exists yet.
Diffstat (limited to 'include/libssh/priv.h')
-rw-r--r--include/libssh/priv.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index d0d0ea2d..dab9aa73 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -324,6 +324,8 @@ struct keys_struct {
const char *publickey;
};
+struct ssh_message;
+
struct ssh_session {
struct error_struct error;
struct socket *socket;
@@ -386,7 +388,8 @@ struct ssh_session {
/* auths accepted by server */
int auth_methods;
int hostkeys; /* contains type of host key wanted by client, in server impl */
- struct ssh_message *ssh_message; /* ssh message */
+ struct ssh_list *ssh_message_list; /* list of delayed SSH messages */
+ int (*ssh_message_callback)( struct ssh_session *session,struct ssh_message *msg);
int log_verbosity; /*cached copy of the option structure */
int log_indent; /* indentation level in enter_function logs */
};
@@ -737,7 +740,7 @@ const void *_ssh_list_get_head(struct ssh_list *list);
* @return the first element of the list
*/
#define ssh_list_get_head(type, ssh_list)\
- ((type)_ssh_list_head(ssh_list))
+ ((type)_ssh_list_get_head(ssh_list))
/* channels1.c */
@@ -760,6 +763,7 @@ int match_hostname(const char *host, const char *pattern, unsigned int len);
/* messages.c */
void message_handle(SSH_SESSION *session, u32 type);
+int ssh_execute_message_callbacks(SSH_SESSION *session);
/* log.c */