31 #ifndef __SFTP_HEADER__ 32 #define __SFTP_HEADER__ 38 #ifdef __ENABLE_MOCANA_SSH_FTP_SERVER__ 40 #define SFTP_OPEN_FILE_READ_BINARY 1 41 #define SFTP_OPEN_FILE_WRITE_BINARY 2 45 #define SSH_FTP_NO_SUCH_FILE 2 46 #define SSH_FTP_PERMISSION_DENIED 3 47 #define SSH_FTP_FAILURE 4 48 #define SSH_FTP_BAD_MESSAGE 5 49 #define SSH_FTP_NO_CONNECTION 6 50 #define SSH_FTP_CONNECTION_LOST 7 51 #define SSH_FTP_OP_UNSUPPORTED 8 52 #define SSH_FTP_INVALID_HANDLE 9 53 #define SSH_FTP_NO_SUCH_PATH 10 54 #define SSH_FTP_FILE_ALREADY_EXISTS 11 55 #define SSH_FTP_WRITE_PROTECT 12 56 #define SSH_FTP_NO_MEDIA 13 115 sbyte4 (*funcPtrOpenFileUpcall) (sbyte4 connectionInstance,
void* sftpInternelDescr, sbyte *pLongDirectoryName, sbyte *pFilename, sbyte4 flags);
145 sbyte4 (*funcPtrReadFileUpcall) (sbyte4 connectionInstance,
void* sftpInternelDescr);
175 sbyte4 (*funcPtrWriteFileUpcall) (sbyte4 connectionInstance,
void* sftpInternelDescr);
205 sbyte4 (*funcPtrCloseFileUpcall) (sbyte4 connectionInstance,
void* sftpInternelDescr);
237 sbyte4 (*funcPtrOpenDirUpcall) (sbyte4 connectionInstance,
const sbyte *pLongDirectoryName,
void* *pDirCookie);
272 sbyte4 (*funcPtrReadDirUpcall) (sbyte4 connectionInstance, sbyte *pLongDirectoryName,
sftpFileObjDescr* p_sftpFileDescr,
void* *pDirCookie);
302 sbyte4 (*funcPtrCloseDirUpcall) (sbyte4 connectionInstance,
void **pDirCookie);
335 sbyte4 (*funcPtrGetFileStats) (sbyte4 connectionInstance, ubyte *pPath, ubyte *pPathExt,
sftpFileObjDescr* p_sftpFileDescr);
367 sbyte4 (*funcPtrGetOpenFileStats) (sbyte4 connectionInstance, sbyte4 cookie,
sftpFileObjDescr* p_sftpFileDescr);
397 sbyte4 (*funcPtrRemoveFile) (sbyte4 connectionInstance, sbyte *pRemoveFilename);
427 sbyte4 (*funcPtrRenameFile) (sbyte4 connectionInstance, sbyte *pOldFilename, sbyte *pNewFilename);
457 sbyte4 (*funcPtrCreateDir) (sbyte4 connectionInstance, sbyte *pCreateDirectoryName);
487 sbyte4 (*funcPtrRemoveDir) (sbyte4 connectionInstance, sbyte *pRemoveDirectoryName);
MOC_EXTERN void * SSH_sftpGetCookie(void *sftpInternelDescr)
Get a connection's cookie (containing custom information).
MOC_EXTERN sbyte * SSH_sftpWriteBuffer(void *sftpInternelDescr)
Get a pointer to a buffer (received from an SFTP client) containing data to write to a file...
MOC_EXTERN sftpSettings * SSH_sftpSettings(void)
Get a pointer to NanoSSH SFTP server settings.
MOC_EXTERN sbyte4 SSH_sftpReadBufferSize(void *sftpInternelDescr)
Get the number of read bytes a client is requesting.
MOC_EXTERN sbyte4 SSH_sftpSetHomeDirectory(sbyte4 connectionInstance, sbyte *pHomeDirectory)
Define an SFTP client's default home directory.
MOC_EXTERN sbyte4 SSH_sftpWriteLocation(void *sftpInternelDescr)
Get a file's write byte position.
MOC_EXTERN void SSH_sftpNumBytesRead(void *sftpInternelDescr, sbyte4 numBytesRead)
Set an sftp file descriptor's $numBytesRead value to the number of bytes read from the incoming socke...
MOC_EXTERN void SSH_sftpSetCookie(void *sftpInternelDescr, void *sftpCookie)
Save a cookie containing custom information about a context connection.
MOC_EXTERN sbyte * SSH_sftpReadBuffer(void *sftpInternelDescr)
Get a pointer to a buffer containing a file's read data.
Configuration settings and callback function pointers for NanoSSH FTP servers.
Definition: sftp.h:78
MOC_EXTERN sbyte4 SSH_sftpSetMemberOfGroups(sbyte4 connectionInstance, ubyte4 memberGroups)
Set an individual SFTP user's permissions.
MOC_EXTERN sbyte4 SSH_sftpWriteBufferSize(void *sftpInternelDescr)
Get the number of bytes written to a file by an SFTP write upcall handler.
Definition: sshc_filesys.h:46
MOC_EXTERN sbyte4 SSH_sftpReadLocation(void *sftpInternelDescr)
Get a file's read byte position.