sftp_server_packet.c
error_t sftpServerOpenDir(SftpServerSession *session, const SshString *path, uint32_t *handle)
Open a directory.
Definition: sftp_server_directory.c:131
error_t sftpServerParseFxpMkDir(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_MKDIR packet.
Definition: sftp_server_packet.c:679
error_t sftpServerWriteFile(SftpServerSession *session, const SshBinaryString *handle, uint64_t offset, const uint8_t *data, uint32_t fragLen, uint32_t totalLen)
Write the specified file.
Definition: sftp_server_file.c:561
Path manipulation helper functions.
error_t sftpServerCloseDir(SftpServerSession *session, const SshBinaryString *handle)
Close a directory.
Definition: sftp_server_directory.c:345
error_t sftpServerParseFxpSetStat(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_SETSTAT packet.
Definition: sftp_server_packet.c:1025
error_t sftpServerParseFxpFstat(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_FSTAT packet.
Definition: sftp_server_packet.c:959
error_t sftpServerParseFxpRename(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_RENAME packet.
Definition: sftp_server_packet.c:1184
error_t sftpServerReadDir(SftpServerSession *session, const SshBinaryString *handle, SftpName *name)
Read an entry from the specified directory.
Definition: sftp_server_directory.c:223
error_t sftpFormatName(SftpVersion version, const SftpName *name, uint8_t *p, size_t *written)
Format name structure.
Definition: sftp_common.c:50
error_t sftpServerRemoveDir(SftpServerSession *session, const SshString *path)
Remove a directory.
Definition: sftp_server_directory.c:92
error_t sshParseString(const uint8_t *p, size_t length, SshString *string)
Parse a string.
Definition: ssh_misc.c:1152
error_t sftpServerReadFile(SftpServerSession *session, const SshBinaryString *handle, uint64_t offset, uint32_t *length)
Read the specified file.
Definition: sftp_server_file.c:660
error_t sftpServerParseFxpSetFstat(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_FSETSTAT packet.
Definition: sftp_server_packet.c:1105
SFTP server.
error_t sftpServerParseFxpRead(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_READ packet.
Definition: sftp_server_packet.c:269
error_t sftpServerParseFxpInit(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_INIT packet.
Definition: sftp_server_packet.c:56
error_t sftpFormatFxpName(SftpServerSession *session, uint32_t id, const SftpName *name)
Format SSH_FXP_NAME packet.
Definition: sftp_server_packet.c:1567
Directory operations.
error_t sftpServerParseFxpOpen(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_OPEN packet.
Definition: sftp_server_packet.c:98
error_t sftpServerParseFxpExtended(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_EXTENDED packet.
Definition: sftp_server_packet.c:1262
File operations.
error_t sftpParseAttributes(SftpVersion version, SftpFileAttrs *attributes, const uint8_t *data, size_t length, size_t *consumed)
Parse file attributes.
Definition: sftp_common.c:454
error_t sftpServerGetRealPath(SftpServerSession *session, const SshString *path, SftpName *name)
Canonicalize a given path name to an absolute path.
Definition: sftp_server_file.c:53
error_t sftpFormatAttributes(SftpVersion version, const SftpFileAttrs *attributes, uint8_t *p, size_t *written)
Format file attributes.
Definition: sftp_common.c:255
error_t sftpServerRemoveFile(SftpServerSession *session, const SshString *path)
Remove a file.
Definition: sftp_server_file.c:356
error_t sftpServerParseFxpOpenDir(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_OPENDIR packet.
Definition: sftp_server_packet.c:462
error_t sftpServerParseFxpWrite(SftpServerSession *session, const uint8_t *packet, size_t fragLen, size_t totalLen)
Parse SSH_FXP_WRITE packet.
Definition: sftp_server_packet.c:375
error_t sftpFormatFxpStatus(SftpServerSession *session, uint32_t id, uint32_t statusCode, const char_t *message)
Format SSH_FXP_STATUS message.
Definition: sftp_server_packet.c:1365
error_t sftpFormatFxpData(SftpServerSession *session, uint32_t id, size_t dataLen)
Format SSH_FXP_DATA message.
Definition: sftp_server_packet.c:1507
error_t sftpServerRenameFile(SftpServerSession *session, const SshString *oldPath, const SshString *newPath)
Rename the specified file.
Definition: sftp_server_file.c:302
error_t sftpServerCloseFile(SftpServerSession *session, const SshBinaryString *handle)
Close a file.
Definition: sftp_server_file.c:780
error_t sftpFormatFxpAttrs(SftpServerSession *session, uint32_t id, const SftpFileAttrs *attributes)
Format SSH_FXP_ATTRS packet.
Definition: sftp_server_packet.c:1637
SFTP packet parsing and formatting.
@ SFTP_SERVER_SESSION_STATE_SENDING_DATA
Definition: sftp_server.h:161
error_t sftpServerParseFxpClose(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_CLOSE packet.
Definition: sftp_server_packet.c:195
error_t sftpServerOpenFile(SftpServerSession *session, const SshString *path, uint32_t pflags, const SftpFileAttrs *attributes, uint32_t *handle)
Open a file.
Definition: sftp_server_file.c:397
error_t sftpServerSetFileStat(SftpServerSession *session, const SshString *path, const SftpFileAttrs *attributes)
Modify file attributes.
Definition: sftp_server_file.c:231
error_t sftpFormatFxpHandle(SftpServerSession *session, uint32_t id, uint32_t handle)
Format SSH_FXP_HANDLE message.
Definition: sftp_server_packet.c:1445
error_t sftpServerParseFxpRealPath(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_REALPATH packet.
Definition: sftp_server_packet.c:825
error_t sftpServerParseFxpStat(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_STAT packet.
Definition: sftp_server_packet.c:892
error_t sftpServerParseFxpReadDir(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_READDIR packet.
Definition: sftp_server_packet.c:534
Helper functions for SFTP server.
SSH helper functions.
error_t sftpFormatFxpVersion(SftpServerSession *session, uint32_t version)
Format SSH_FXP_VERSION packet.
Definition: sftp_server_packet.c:1313
error_t sftpServerSetFileStatEx(SftpServerSession *session, const SshBinaryString *handle, const SftpFileAttrs *attributes)
Modify file attributes.
Definition: sftp_server_file.c:267
error_t sshParseBinaryString(const uint8_t *p, size_t length, SshBinaryString *string)
Parse a binary string.
Definition: ssh_misc.c:1189
error_t sshFormatString(const char_t *value, uint8_t *p, size_t *written)
Format a string.
Definition: ssh_misc.c:1384
error_t sftpServerGetFileStat(SftpServerSession *session, const SshString *path, SftpFileAttrs *attributes)
Retrieve file attributes.
Definition: sftp_server_file.c:93
error_t sftpServerCreateDir(SftpServerSession *session, const SshString *path, const SftpFileAttrs *attributes)
Create a directory.
Definition: sftp_server_directory.c:54
error_t sftpServerParseFxpRemove(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_REMOVE packet.
Definition: sftp_server_packet.c:612
error_t sftpServerGetFileStatEx(SftpServerSession *session, const SshBinaryString *handle, SftpFileAttrs *attributes)
Retrieve file attributes.
Definition: sftp_server_file.c:191
Debugging facilities.
error_t sftpServerParseFxpRmDir(SftpServerSession *session, const uint8_t *packet, size_t length)
Parse SSH_FXP_RMDIR packet.
Definition: sftp_server_packet.c:758