TrustCore SDK NanoSSH API reference  version 7.0
SFTP Client General Purpose Functions

Functions

MOC_EXTERN void * SSHC_sftpGetCookie (sftpcFileHandleDescr *p_sftpFileHandleDescr)
 Get a file's cookie value. More...
 
MOC_EXTERN sbyte4 SSHC_sftpRequestStatusCode (sftpcFileHandleDescr *p_sftpFileHandleDescr)
 Get a file's SFTP operation status. More...
 
MOC_EXTERN void SSHC_sftpSetCookie (sftpcFileHandleDescr *p_sftpFileHandleDescr, void *sftpCookie)
 Set a file's cookie value (custom information). More...
 

Detailed Description

Function Documentation

◆ SSHC_sftpGetCookie()

MOC_EXTERN void* SSHC_sftpGetCookie ( sftpcFileHandleDescr p_sftpFileHandleDescr)

This function returns the cookie value of the specified file handle descriptor.

Since
1.41
Version
1.41 and later

(changes to return type)

To enable this function, the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_SSH_CLIENT__
  • __ENABLE_MOCANA_SSH_FTP_CLIENT__

sshc.h

Parameters
p_sftpFileHandleDescrPointer to file handle descriptor.
Returns
Cookie's value.
See also
SSHC_sftpSetCookie
Remarks
This function is applicable to synchronous SFTP clients.

sshc.h

◆ SSHC_sftpRequestStatusCode()

MOC_EXTERN sbyte4 SSHC_sftpRequestStatusCode ( sftpcFileHandleDescr p_sftpFileHandleDescr)

This function returns the specified file's SFTP operation status (see sshc_ftp_status_codes).

Since
1.41
Version
1.41 and later

To enable this function, the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_SSH_CLIENT__
  • __ENABLE_MOCANA_SSH_FTP_CLIENT__

sshc.h

Parameters
p_sftpFileHandleDescrPointer to file handle descriptor.
Returns
File's SFTP operation status (see sshc_ftp_status_codes).
Remarks
This function is applicable to synchronous SFTP clients.

sshc.h

◆ SSHC_sftpSetCookie()

MOC_EXTERN void SSHC_sftpSetCookie ( sftpcFileHandleDescr p_sftpFileHandleDescr,
void *  sftpCookie 
)

This function assigns the specified cookie value (custom information) to the specified file handle descriptor's cookie field.

Since
1.41
Version
1.41 and later

(changes to sftpCookie arg type)

To enable this function, the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_SSH_CLIENT__
  • __ENABLE_MOCANA_SSH_FTP_CLIENT__

sshc.h

Parameters
p_sftpFileHandleDescrPointer to file handle descriptor.
sftpCookieValue to assign to the cookie.
Returns
None.
See also
SSHC_sftpGetCookie
Remarks
This function is applicable to synchronous SFTP clients.

sshc.h