aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPreston A. Elder <prez@neuromancy.net>2009-07-28 10:21:40 -0700
committerAndreas Schneider <mail@cynapses.org>2009-07-29 18:41:48 +0200
commit4f70cc13e2aa28657e40f91dfcf03dd9c82a41e9 (patch)
tree5fd13768b42e2b0c93cc16f5f97a0f0a26088fa3 /include
parentb4111c5c187cf9212eba0ae459edb630dbddb656 (diff)
downloadlibssh-4f70cc13e2aa28657e40f91dfcf03dd9c82a41e9.tar.gz
libssh-4f70cc13e2aa28657e40f91dfcf03dd9c82a41e9.tar.xz
libssh-4f70cc13e2aa28657e40f91dfcf03dd9c82a41e9.zip
Fleshed out server interface
- Enables channel_request_open types of DIRECT_TCPIP, FORWARDED_TCPIP and X11 (ie. implemented the handling of those channel_request_open types). - Adds functions to retrieve the extra information relating to channel_request_open messages and channel_request messages. - Adds a channel_write_stderr method (obviously for writing to the STDERR channel from server side) - well, technically just converted the exiting channel_write to take an extra argument and created two wrapper functions. - Actually does the invoking of message_handle() from channel_recv_request. - Implemented the handling of the window-change and env channel_requests. - Implemented a few functions in server.h that were declared but not defined (eg. ssh_message_channel_request_channel). Signed-off-by: Preston A. Elder <prez@neuromancy.net> Signed-off-by: Andreas Schneider <mail@cynapses.org>
Diffstat (limited to 'include')
-rw-r--r--include/libssh/server.h35
1 files changed, 27 insertions, 8 deletions
diff --git a/include/libssh/server.h b/include/libssh/server.h
index e441226b..b06ff897 100644
--- a/include/libssh/server.h
+++ b/include/libssh/server.h
@@ -136,9 +136,10 @@ int ssh_accept(SSH_SESSION *session);
#define SSH_AUTH_UNKNOWN 0
#define SSH_CHANNEL_SESSION 1
-#define SSH_CHANNEL_TCPIP 2
-#define SSH_CHANNEL_X11 3
-#define SSH_CHANNEL_UNKNOWN 4
+#define SSH_CHANNEL_DIRECT_TCPIP 2
+#define SSH_CHANNEL_FORWARDED_TCPIP 3
+#define SSH_CHANNEL_X11 4
+#define SSH_CHANNEL_UNKNOWN 5
#define SSH_CHANNEL_REQUEST_PTY 1
#define SSH_CHANNEL_REQUEST_EXEC 2
@@ -165,11 +166,6 @@ int ssh_message_auth_reply_pk_ok(SSH_MESSAGE *msg, ssh_string algo, ssh_string p
int ssh_message_auth_set_methods(SSH_MESSAGE *msg, int methods);
ssh_channel ssh_message_channel_request_open_reply_accept(SSH_MESSAGE *msg);
-
-ssh_channel ssh_message_channel_request_channel(SSH_MESSAGE *msg);
-// returns the TERM env variable
-char *ssh_message_channel_request_pty_term(SSH_MESSAGE *msg);
-char *ssh_message_channel_request_subsystem(SSH_MESSAGE *msg);
int ssh_message_channel_request_reply_success(SSH_MESSAGE *msg);
int ssh_message_service_reply_success(SSH_MESSAGE *msg);
@@ -177,6 +173,29 @@ char *ssh_message_service_service(SSH_MESSAGE *msg);
void ssh_set_message_callback(SSH_SESSION *session,
int(*ssh_message_callback)(ssh_session session, struct ssh_message *msg));
+
+int channel_write_stderr(ssh_channel channel, const void *data, uint32_t len);
+
+char *ssh_message_channel_request_open_originator(SSH_MESSAGE *msg);
+int ssh_message_channel_request_open_originator_port(SSH_MESSAGE *msg);
+char *ssh_message_channel_request_open_destination(SSH_MESSAGE *msg);
+int ssh_message_channel_request_open_destination_port(SSH_MESSAGE *msg);
+
+ssh_channel ssh_message_channel_request_channel(SSH_MESSAGE *msg);
+
+char *ssh_message_channel_request_pty_term(SSH_MESSAGE *msg);
+int ssh_message_channel_request_pty_width(SSH_MESSAGE *msg);
+int ssh_message_channel_request_pty_height(SSH_MESSAGE *msg);
+int ssh_message_channel_request_pty_pxwidth(SSH_MESSAGE *msg);
+int ssh_message_channel_request_pty_pxheight(SSH_MESSAGE *msg);
+
+char *ssh_message_channel_request_env_name(SSH_MESSAGE *msg);
+char *ssh_message_channel_request_env_value(SSH_MESSAGE *msg);
+
+char *ssh_message_channel_request_command(SSH_MESSAGE *msg);
+
+char *ssh_message_channel_request_subsystem(SSH_MESSAGE *msg);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */