TrustCore SDK NanoSSH API reference  version 7.0
sshSettings Struct Reference

Configuration settings and callback function pointers for NanoSSH servers. More...

Data Fields

sbyte4(* funcCancelTcpIpForward )(sbyte4 connectionInstance, ubyte4 dstPort)
 
sbyte4(* funcCheckPort )(ubyte4 dstPort)
 
sbyte4(* funcPortFwdPtrClosed )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen, ubyte4 channel)
 Respond to a client's close connection request. More...
 
sbyte4(* funcPortFwdPtrEof )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen, ubyte4 channel)
 Respond to a client's EOF request. More...
 
sbyte4(* funcPortFwdReceivedData )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen, ubyte4 channel)
 (Optional) Receive SSH port forwarding session data. More...
 
sbyte4(* funcPtrBreakOp )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 Respond to a client's break message. More...
 
sbyte4(* funcPtrCertStatus )(sbyte4 connectionInstance, const ubyte *pUser, ubyte4 userLength, sbyte4 cert_status, ubyte *pCertificate, ubyte4 certLen, certChainPtr pCertChain, const ubyte *pAnchorCert, ubyte4 anchorCertLen)
 Verify a client's certificate. More...
 
sbyte4(* funcPtrCloseChannel )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 Respond to a client's close channel request. More...
 
sbyte4(* funcPtrClosed )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 Respond to a client's close connection request. More...
 
sbyte4(* funcPtrConnect )(sbyte4 connectionInstance, sbyte4 sessionNum, ubyte *pConnectHost, ubyte2 port, sbyte4 *pIgnoreRequest, sbyte4 channel)
 (Optional) Custom connection handler. More...
 
void(* funcPtrConnection )(sbyte4 connectionInstance)
 Respond to a synchronous channel opening. More...
 
sbyte4(* funcPtrEof )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 Respond to a connection close request. More...
 
sbyte4(* funcPtrExec )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 Notify the NanoSSH server when a client issues a command. More...
 
sbyte4(* funcPtrGetAuthAdvertizedMethods )(sbyte4 connectionInstance)
 (Optional) Custom authorization methods handler. More...
 
sbyte4(* funcPtrKeyIntAuthReq )(sbyte4 connectionInstance, const ubyte *pUser, ubyte4 userLength, keyIntInfoResp *pResponseInfo, keyIntInfoReq *pRequestInfo, sbyte4 *pAuthState)
 Authorize a user for an interactive keyboard session. More...
 
sbyte4(* funcPtrNoneAuth )(sbyte4 connectionInstance, const ubyte *pUser, ubyte4 userLength)
 
sbyte4(* funcPtrOpenSftp )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 Respond to the opening of a client SFTP session. More...
 
sbyte4(* funcPtrOpenShell )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 Respond to the establishment of a secure session. More...
 
sbyte4(* funcPtrPasswordAuth )(sbyte4 connectionInstance, const ubyte *pUser, ubyte4 userLength, const ubyte *pPassword, ubyte4 passwordLength)
 Validate the provided password to complete authentication. More...
 
void(* funcPtrPostAccept )(sbyte4 connectionInstance, TCP_SOCKET tcpAcceptSocket)
 Initialize session data. More...
 
sbyte4(* funcPtrPtyRequest )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 Respond to receipt of a client's terminal emulation settings. More...
 
sbyte4(* funcPtrPubKeyAuth )(sbyte4 connectionInstance, const ubyte *pUser, ubyte4 userLength, const ubyte *pPubKey, ubyte4 pubKeyLength, ubyte4 keyType)
 Verify a client's public key. More...
 
sbyte4(* funcPtrReceivedData )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 (Optional) Custom receive data handler. More...
 
sbyte4(* funcPtrReleaseKeyIntReq )(sbyte4 connectionInstance, keyIntInfoReq *request)
 Release (free) memory used by an unneeded request data buffer. More...
 
sbyte4(* funcPtrRemotePortFwdSessionOpen )(sbyte4 connectionInstance, ubyte4 channel, ubyte4 myChannel)
 
sbyte4(* funcPtrReplyPing )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 (Optional) Respond to a Ping message. More...
 
sbyte4(* funcPtrSessionOpen )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 Respond to a client session request. More...
 
sbyte4(* funcPtrSessionReKey )(sbyte4 connectionInstance, intBoolean initiatedByRemote)
 Inform the calling application that Session Rekey has been initiated. More...
 
void(* funcPtrStartTimer )(sbyte4 connectionInstance, ubyte4 msTimerExpire, sbyte4 boolUserAuthenticated)
 Start the timeout notification timer. More...
 
sbyte4(* funcPtrStdErr )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 Process text data sent to stderr. More...
 
sbyte4(* funcPtrWindowChange )(sbyte4 connectionInstance, enum sshSessionTypes sessionEvent, ubyte *pMesg, ubyte4 mesgLen)
 Respond to a change in a client's terminal window size. More...
 
sbyte4(* funcStartTcpIpForward )(sbyte4 connectionInstance, ubyte *pSrc, ubyte4 dstport, ubyte4 orgPort)
 
ubyte4 ocspTimeout
 
sbyte * pBannerString
 
sbyte * pOcspResponderUrl
 
ubyte4 sshListenPort
 Port number for the connection context. More...
 
ubyte4 sshMaxAuthAttempts
 Number of authentication tries allowed before the connection is said to have failed. More...
 
sbyte4 sshMaxConnections
 Maximum number of connections to this server. More...
 
ubyte4 sshTimeOutAuthentication
 Number of milliseconds the server waits for an authentication response before timing out. More...
 
ubyte4 sshTimeOutDefaultOpenState
 Number of milliseconds the server waits after authentication for a client to make a request (such as open a shell). More...
 
ubyte4 sshTimeOutKeyExchange
 Number of milliseconds the server waits for a key exchange before timing out. More...
 
ubyte4 sshTimeOutNewKeys
 Number of milliseconds the server waits for new keys before timing out. More...
 
ubyte4 sshTimeOutOpen
 Number of milliseconds the server waits for an open session response before timing out. More...
 
ubyte4 sshTimeOutServiceRequest
 Number of milliseconds the server waits for a service request response before timing out. More...
 

Detailed Description

This structure is used for NanoSSH server configuration. Which products and features you've included (by defining the appropriate flags in moptions.h) determine which callback functions are present in this structure. Each included callback function should be customized for your application and then registered by assigning it to the appropriate structure function pointer(s).

Since
1.41
Version
1.41 and later

To use this structure, at least one of the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_SSL_SERVER__
  • __ENABLE_MOCANA_SSL_ASYNC_SERVER_API__

Field Documentation

◆ sshListenPort

ubyte4 sshSettings::sshListenPort

Port number for the connection context.

◆ sshMaxAuthAttempts

ubyte4 sshSettings::sshMaxAuthAttempts

Number of authentication tries allowed before the connection is said to have failed.

◆ sshMaxConnections

sbyte4 sshSettings::sshMaxConnections

Maximum number of connections to this server.

◆ sshTimeOutAuthentication

ubyte4 sshSettings::sshTimeOutAuthentication

Number of milliseconds the server waits for an authentication response before timing out.

◆ sshTimeOutDefaultOpenState

ubyte4 sshSettings::sshTimeOutDefaultOpenState

Number of milliseconds the server waits after authentication for a client to make a request (such as open a shell).

◆ sshTimeOutKeyExchange

ubyte4 sshSettings::sshTimeOutKeyExchange

Number of milliseconds the server waits for a key exchange before timing out.

◆ sshTimeOutNewKeys

ubyte4 sshSettings::sshTimeOutNewKeys

Number of milliseconds the server waits for new keys before timing out.

◆ sshTimeOutOpen

ubyte4 sshSettings::sshTimeOutOpen

Number of milliseconds the server waits for an open session response before timing out.

◆ sshTimeOutServiceRequest

ubyte4 sshSettings::sshTimeOutServiceRequest

Number of milliseconds the server waits for a service request response before timing out.


The documentation for this struct was generated from the following file: