aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormilo <milo@r0ot.me>2010-09-29 23:53:56 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-10-02 22:52:06 +0200
commit524302ca7e8dfdc11bc6aec3efa37889139ed294 (patch)
tree2d839924127ddadb6896e99dbb61308de3525ee3 /src
parent26170241363b6b1911b5515f23fc38ff081296cf (diff)
downloadlibssh-524302ca7e8dfdc11bc6aec3efa37889139ed294.tar.gz
libssh-524302ca7e8dfdc11bc6aec3efa37889139ed294.tar.xz
libssh-524302ca7e8dfdc11bc6aec3efa37889139ed294.zip
Added ssh_channel_write_stderr() for the server
Diffstat (limited to 'src')
-rw-r--r--src/channels.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/channels.c b/src/channels.c
index 2463bb0d..08dee367 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -2596,6 +2596,23 @@ int ssh_channel_select(ssh_channel *readchans, ssh_channel *writechans,
#if WITH_SERVER
/**
+ * @brief Blocking write on a channel stderr.
+ *
+ * @param[in] channel The channel to write to.
+ *
+ * @param[in] data A pointer to the data to write.
+ *
+ * @param[in] len The length of the buffer to write to.
+ *
+ * @return The number of bytes written, SSH_ERROR on error.
+ *
+ * @see channel_read()
+ */
+int ssh_channel_write_stderr(ssh_channel channel, const void *data, uint32_t len) {
+ return channel_write_common(channel, data, len, 1);
+}
+
+/**
* @brief Open a TCP/IP reverse forwarding channel.
*
* @param[in] channel An allocated channel.