1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-09-10 02:09:25 +03:00

channels: Add originator to ssh_channel_accept

Added API function ssh_channel_open_forward_port that is the same as
ssh_channel_accept_forward with the addition to determine the
originator address and port

Signed-off-by: Tomas Holmqvist <tomhol@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Tomas Holmqvist
2021-03-12 17:52:56 +01:00
committed by Jakub Jelen
parent fef0b3208a
commit dd318aa1a1
4 changed files with 52 additions and 9 deletions

View File

@@ -510,7 +510,12 @@ LIBSSH_API char *ssh_dirname (const char *path);
LIBSSH_API int ssh_finalize(void);
/* REVERSE PORT FORWARDING */
LIBSSH_API ssh_channel ssh_channel_accept_forward(ssh_session session,
LIBSSH_API ssh_channel ssh_channel_open_forward_port(ssh_session session,
int timeout_ms,
int *destination_port,
char **originator,
int *originator_port);
SSH_DEPRECATED LIBSSH_API ssh_channel ssh_channel_accept_forward(ssh_session session,
int timeout_ms,
int *destination_port);
LIBSSH_API int ssh_channel_cancel_forward(ssh_session session,