sftp_client_misc.c
Path manipulation helper functions.
error_t sftpFormatPath(SftpClientContext *context, const char_t *path, uint8_t *p, size_t *written)
Format pathname.
Definition: sftp_client_misc.c:669
error_t sftpClientParsePacketLength(SftpClientContext *context, const uint8_t *packet)
Retrieve the length of an incoming SFTP packet.
Definition: sftp_client_misc.c:484
SFTP packet parsing and formatting.
SSH connection protocol.
SshConnection * sshOpenConnection(SshContext *context, Socket *socket)
Open a new SSH connection.
Definition: ssh_misc.c:66
error_t sftpClientOpenConnection(SftpClientContext *context)
Open SSH connection.
Definition: sftp_client_misc.c:72
error_t sftpClientProcessEvents(SftpClientContext *context)
Process SFTP client events.
Definition: sftp_client_misc.c:409
error_t sshInit(SshContext *context, SshConnection *connections, uint_t numConnections, SshChannel *channels, uint_t numChannels)
SSH context initialization.
Definition: ssh.c:58
error_t sshReadChannel(SshChannel *channel, void *data, size_t size, size_t *received, uint_t flags)
Receive data from the specified channel.
Definition: ssh.c:2180
error_t sftpClientParseFxpHandle(SftpClientContext *context, const uint8_t *packet, size_t length)
Parse SSH_FXP_HANDLE packet.
Definition: sftp_client_packet.c:1214
error_t sftpClientCheckTimeout(SftpClientContext *context)
Determine whether a timeout error has occurred.
Definition: sftp_client_misc.c:630
error_t sftpClientParseFxpName(SftpClientContext *context, const uint8_t *packet, size_t fragLen, size_t totalLen)
Parse SSH_FXP_NAME packet.
Definition: sftp_client_packet.c:1368
error_t sftpClientParseFxpAttrs(SftpClientContext *context, const uint8_t *packet, size_t length)
Parse SSH_FXP_ATTRS packet.
Definition: sftp_client_packet.c:1469
int_t socket(int_t family, int_t type, int_t protocol)
Create a socket that is bound to a specific transport service provider.
Definition: bsd_socket.c:65
error_t sftpClientEstablishConnection(SftpClientContext *context)
Establish SSH connection.
Definition: sftp_client_misc.c:141
SshChannel * sshCreateChannel(SshConnection *connection)
Create a new SSH channel.
Definition: ssh.c:1964
error_t sshProcessConnectionEvents(SshContext *context, SshConnection *connection)
Connection event handler.
Definition: ssh_misc.c:372
error_t sshWriteChannel(SshChannel *channel, const void *data, size_t length, size_t *written, uint_t flags)
Write data to the specified channel.
Definition: ssh.c:2051
SFTP client.
Socket * socketOpen(uint_t type, uint_t protocol)
Create a socket (UDP or TCP)
Definition: socket.c:125
error_t socketPoll(SocketEventDesc *eventDesc, uint_t size, OsEvent *extEvent, systime_t timeout)
Wait for one of a set of sockets to become ready to perform I/O.
Definition: socket.c:2149
error_t sftpClientParseFxpData(SftpClientContext *context, const uint8_t *packet, size_t fragLen, size_t totalLen)
Parse SSH_FXP_DATA packet.
Definition: sftp_client_packet.c:1293
Helper functions for SFTP client.
error_t sftpClientParseFxpStatus(SftpClientContext *context, const uint8_t *packet, size_t length)
Parse SSH_FXP_STATUS packet.
Definition: sftp_client_packet.c:1095
void sftpClientChangeState(SftpClientContext *context, SftpClientState newState)
Update SFTP client state.
Definition: sftp_client_misc.c:55
error_t sftpClientParsePacket(SftpClientContext *context, const uint8_t *packet, size_t fragLen, size_t totalLen)
SFTP packet processing.
Definition: sftp_client_misc.c:552
void sshRegisterConnectionEvents(SshContext *context, SshConnection *connection, SocketEventDesc *eventDesc)
Register connection events.
Definition: ssh_misc.c:280
void sftpGetAbsolutePath(SftpClientContext *context, const char_t *path, char_t *fullPath)
Retrieve the full pathname.
Definition: sftp_client_misc.c:699
SSH helper functions.
void sftpClientCloseConnection(SftpClientContext *context)
Close SSH connection.
Definition: sftp_client_misc.c:295
void pathRemoveSlash(char_t *path)
Remove the trailing slash from a given path.
Definition: path.c:360
error_t sshSendChannelRequest(SshChannel *channel, const char_t *requestType, const void *requestParams, bool_t wantReply)
Send SSH_MSG_CHANNEL_REQUEST message.
Definition: ssh_request.c:179
error_t sftpClientParseFxpVersion(SftpClientContext *context, const uint8_t *packet, size_t length)
Parse SSH_FXP_VERSION packet.
Definition: sftp_client_packet.c:1019
error_t sshSendChannelOpen(SshChannel *channel, const char_t *channelType, const void *channelParams)
Send SSH_MSG_CHANNEL_OPEN message.
Definition: ssh_connection.c:54
error_t sftpClientSendCommand(SftpClientContext *context)
Send SFTP request and wait for a response.
Definition: sftp_client_misc.c:315
error_t sshSetOperationMode(SshContext *context, SshOperationMode mode)
Set operation mode (client or server)
Definition: ssh.c:167
error_t sshSetChannelTimeout(SshChannel *channel, systime_t timeout)
Set timeout for read/write operations.
Definition: ssh.c:2027
@ SFTP_CLIENT_STATE_CHANNEL_OPEN_REPLY
Definition: sftp_client.h:121
Secure Shell (SSH)
error_t socketSetTimeout(Socket *socket, systime_t timeout)
Set timeout value for blocking operations.
Definition: socket.c:148
Global request and channel request handling.
Debugging facilities.
void pathCombine(char_t *path, const char_t *more, size_t maxLen)
Concatenate two paths.
Definition: path.c:394