![]() |
TrustCore SDK NanoSSH API reference
version 7.0
|
Variables | |
sbyte4(* | sshSettings::funcPtrBreakOp )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
Respond to a client's break message. More... | |
sbyte4(* | sshSettings::funcPtrCloseChannel )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
Respond to a client's close channel request. More... | |
sbyte4(* | sshSettings::funcPtrClosed )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
Respond to a client's close connection request. More... | |
sbyte4(* | sshSettings::funcPtrEof )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
Respond to a connection close request. More... | |
sbyte4(* | sshSettings::funcPtrExec )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
Notify the NanoSSH server when a client issues a command. More... | |
sbyte4(* | sshSettings::funcPtrOpenSftp )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
Respond to the opening of a client SFTP session. More... | |
sbyte4(* | sshSettings::funcPtrOpenShell )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
Respond to the establishment of a secure session. More... | |
sbyte4(* | sshSettings::funcPtrPtyRequest )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
Respond to receipt of a client's terminal emulation settings. More... | |
sbyte4(* | sshSettings::funcPtrReceivedData )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
(Optional) Custom receive data handler. More... | |
sbyte4(* | sshSettings::funcPtrReplyPing )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
(Optional) Respond to a Ping message. More... | |
sbyte4(* | sshSettings::funcPtrSessionOpen )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
Respond to a client session request. More... | |
sbyte4(* | sshSettings::funcPtrStdErr )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
Process text data sent to stderr . More... | |
sbyte4(* | sshSettings::funcPtrWindowChange )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
Respond to a change in a client's terminal window size. More... | |
sbyte4(* sshSettings::funcPtrBreakOp) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
This function is invoked when a client sends a break message (message type SSH_SESSION_BREAK_OP
). Not all applications will send this message.
To enable this function, 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. |
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::funcPtrCloseChannel) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
This function is invoked when a client requests for the channel with the NanoSSH server be closed (message type SSH_SESSION_CHANNEL_CLOSED
).
To enable this function, 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. |
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::funcPtrClosed) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
This function is invoked when a client's connection with the NanoSSH server is closed (message type SSH_SESSION_CLOSED
).
To enable this function, 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. |
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::funcPtrEof) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
This function is invoked when a client requests that its connection to the NanoSSH server be closed (message type SSH_SESSION_EOF
). Upon receiving this event, your application should perform cleanup and shutdown operations.
To enable this function, 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. |
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::funcPtrExec) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
This function notifies the NanoSSH server that an SSH client is requesting an open channel for command execution. The function is invoked when a client sends a break message (message type SSH_SESSION_OPEN_EXEC
), as described in RFC 4254, Secure Shell (SSH) Connection Protocol, section 6.5.
To enable this function, 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. |
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::funcPtrOpenSftp) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
This callback function is invoked when a client opens an SFTP session to the NanoSSH server (message type SSH_SESSION_OPEN_SFTP
).
To enable this function, 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. |
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::funcPtrOpenShell) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
This callback function is invoked when a secure session is established after authentication (message type SSH_SESSION_OPEN_SHELL
).
To enable this function, 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. |
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::funcPtrPtyRequest) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
This callback function is invoked when a client sends terminal emulation settings to the NanoSSH Server (message type SSH_SESSION_PTY_REQUEST
).
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_SERVER__
__ENABLE_MOCANA_SSH_ASYNC_SERVER_API__
connectionInstanc | 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. |
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::funcPtrReceivedData) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
This callback function is invoked when the server receives text data from a client. Your application can do anything when it receives this call, but no particular action is required.
To enable this function, 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 ). |
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::funcPtrReplyPing) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
(Optional) This callback function is invoked when a Ping
message is received. Your application can do anything when it receives this call, but no particular action is required.
To enable this function, 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. |
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::funcPtrSessionOpen) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
This callback function is invoked when a client requests a session with the NanoSSH server, after the client is successfully authenticated (message type SSH_SESSION_OPEN
). Your application can do anything when it receives this call, but no particular action is required.
To enable this function, 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. |
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::funcPtrStdErr) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
This callback function is invoked when a client sends text data to stderr
. Unless you've built a special application on top of SSH to use this text data, you can ignore this event (message type SSH_SESSION_STDERR
).
To enable this function, 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 message buffer. |
mesgLen | Number of bytes in the message buffer (pMesg ). |
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::funcPtrWindowChange) (sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen) |
This callback function is invoked when a client's terminal window changes size. Your application can do anything when it receives this call, but no particular action is required.
To enable this function, 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. |
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.