![]() |
TrustCore SDK NanoSSH API reference
version 7.0
|
Variables | |
sbyte4(* | sshSettings::funcCancelTcpIpForward )(sbyte4 connectionInstance, ubyte4 dstPort) |
sbyte4(* | sshSettings::funcCheckPort )(ubyte4 dstPort) |
sbyte4(* | sshSettings::funcPortFwdPtrClosed )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen, ubyte4 channel) |
Respond to a client's close connection request. More... | |
sbyte4(* | sshSettings::funcPortFwdPtrEof )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen, ubyte4 channel) |
Respond to a client's EOF request. More... | |
sbyte4(* | sshSettings::funcPortFwdReceivedData )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen, ubyte4 channel) |
(Optional) Receive SSH port forwarding session data. More... | |
sbyte4(* | sshSettings::funcPtrRemotePortFwdSessionOpen )(sbyte4 connectionInstance, ubyte4 channel, ubyte4 myChannel) |
sbyte4(* | sshSettings::funcStartTcpIpForward )(sbyte4 connectionInstance, ubyte *pSrc, ubyte4 dstport, ubyte4 orgPort) |
sbyte4(* sshSettings::funcPortFwdPtrClosed) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen, ubyte4 channel) |
This function is invoked when a client's connection with the NanoSSH server is closed for a port forwarding session (message type SSH_SESSION_CLOSED
). This callback is applicable only to port forwarding.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSH_PORT_FORWARDING__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_SERVER__
__ENABLE_MOCANA_SSH_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSH_acceptConnection() or SSH_ASYNC_acceptConnection(). |
sessionEvent | Any of the sshSessionTypes enumerated values (see ssh.h). |
pMesg | Not used for this upcall. |
mesgLen | Not used for this upcall. |
channel | Associated channel number on the client side. |
OK
(0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR
macro.sbyte4(* sshSettings::funcPortFwdPtrEof) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen, ubyte4 channel) |
This function is invoked when a client's connection with the NanoSSH server sends an EOF for a port forwarding session (message type SSH_SESSION_CLOSED
). This callback is applicable only to port forwarding.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSH_PORT_FORWARDING__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_SERVER__
__ENABLE_MOCANA_SSH_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSH_acceptConnection() or SSH_ASYNC_acceptConnection(). |
sessionEvent | Any of the sshSessionTypes enumerated values (see ssh.h). |
pMesg | Not used for this upcall. |
mesgLen | Not used for this upcall. |
channel | Associated channel number on the client side. |
OK
(0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR
macro.sbyte4(* sshSettings::funcPortFwdReceivedData) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen, ubyte4 channel) |
This callback function is invoked when the server receives text data from a client in a port forwarding session. Your application can do anything when it receives this call, but no particular action is required. This callback is applicable only to port forwarding.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSH_PORT_FORWARDING__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_SERVER__
__ENABLE_MOCANA_SSH_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSH_acceptConnection() or SSH_ASYNC_acceptConnection(). |
sessionEvent | Any of the sshSessionTypes enumerated values (see ssh.h). |
pMesg | Pointer to received message. |
mesgLen | Number of bytes in received message (pMesg ). |
channel | Associated channel number on the client side. |
OK
(0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR
macro.