- 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>
When OpenSSH's sftp-server was implemented, the order of the arguments
to the SSH_FXP_SYMLINK method was inadvertently reversed. Unfortunately,
the reversal was not noticed until the server was widely deployed.
Since fixing this to follow the specification would cause
incompatibility, the current order was retained.
libssh now uses a regular expression against destination
hostnames to match numerical IP addresses and set the
appropriate hint.
Patches also add init and finalize code to compile the regexp
It's based on poll objects, each of which store a socket, it's events and a callback,
which gets called whenever an event is set. The poll objects are attached to a poll
context, which should be allocated on per thread basis.
Polling the poll context will poll all the attached poll objects and call their
callbacks (handlers) if any of the socket events are set. This should be done within
the main loop of an application.
This is intended as a ground work for making libssh asynchronous.
Signed-off-by: Aleksandar Kanchev <aleksandar.kanchev@googlemail.com>
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.
ssh_message_retrieve parses a specific SSH message and returns a pointer to it.
Hacked ssh_message_get to use it. This is the first step to have asynchronous ssh messages callbacks.