SSHChannelOpenRequest Event

Fired when the peer attempts to open a new channel.

Syntax

ANSI (Cross Platform)
virtual int FireSSHChannelOpenRequest(SSHReverseTunnelSSHChannelOpenRequestEventParams *e);
typedef struct {
const char *ChannelId;
const char *Service;
const char *ConnectedAddress;
int ConnectedPort;
const char *OriginAddress;
int OriginPort;
int Accept; int reserved; } SSHReverseTunnelSSHChannelOpenRequestEventParams; Unicode (Windows) virtual INT FireSSHChannelOpenRequest(SSHReverseTunnelSSHChannelOpenRequestEventParams *e);
typedef struct {
LPCWSTR ChannelId;
LPCWSTR Service;
LPCWSTR ConnectedAddress;
INT ConnectedPort;
LPCWSTR OriginAddress;
INT OriginPort;
BOOL Accept; INT reserved; } SSHReverseTunnelSSHChannelOpenRequestEventParams;
- (void)onSSHChannelOpenRequest:(NSString*)channelId :(NSString*)service :(NSString*)connectedAddress :(int)connectedPort :(NSString*)originAddress :(int)originPort :(int*)accept;
#define EID_SSHREVERSETUNNEL_SSHCHANNELOPENREQUEST 11

virtual INT IPWORKSSSH_CALL FireSSHChannelOpenRequest(LPSTR &lpszChannelId, LPSTR &lpszService, LPSTR &lpszConnectedAddress, INT &iConnectedPort, LPSTR &lpszOriginAddress, INT &iOriginPort, BOOL &bAccept);

Remarks

This event is fired whenever a peer attempts to open a new channel for a given connection. ChannelId will contain the id of the channel to be created. Service will identify the type of channel that is being requested. Usually, this will be "forwarded-tcpip", in which case ConnectedAddress and ConnectedPort will contain the remote TCP/IP address and port on the peer to which the connection was established; OriginAddress and OriginPort contain the originating TCP/IP address and port of the connection.

By default Accept is True and the channel will be opened. Set Accept to False to reject the request.

Copyright (c) 2023 /n software inc. - All rights reserved.
IPWorks SSH 2020 C++ Edition - Version 20.0 [Build 8501]