ProtoCore
v0.0.2
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
ssh_sftp.h
Go to the documentation of this file.
1
// Copyright (C) 2026 Douglas Quigg (dstroy0) <dquigg123@gmail.com>
2
// SPDX-License-Identifier: AGPL-3.0-or-later
3
4
/**
5
* @file ssh_sftp.h
6
* @brief SFTP server subsystem - the fs::FS binding (PC_ENABLE_SSH_SFTP).
7
*
8
* Binds the pure SFTP v3 codec (services/file_transfer/sftp) to an SSH session channel + an Arduino fs::FS mount: when
9
* a client requests the "sftp" subsystem, this serves SSH_FXP_* requests (open/read/write/opendir/readdir/
10
* stat/mkdir/rmdir/remove/rename/realpath) against files under @p root, with a fixed handle table and
11
* streamed reads/writes (no heap beyond the fs layer's own file handles). Call pc_ssh_sftp_begin() once
12
* after pc_ssh_conn_setup(); it installs the channel subsystem + data callbacks.
13
*
14
* @author Douglas Quigg (dstroy0)
15
* @date 2026
16
*/
17
18
#ifndef PROTOCORE_SSH_SFTP_H
19
#define PROTOCORE_SSH_SFTP_H
20
21
#include "
protocore_config.h
"
22
23
#if PC_ENABLE_SSH_SFTP
24
25
#include <FS.h>
26
27
/**
28
* @brief Serve the SFTP subsystem from @p fs under @p root (a persistent string, e.g. "/" or "/gcode").
29
* Installs the channel subsystem + data callbacks. Call once, after pc_ssh_conn_setup().
30
*/
31
void
pc_ssh_sftp_begin(fs::FS &fs,
const
char
*root);
32
33
#endif
// PC_ENABLE_SSH_SFTP
34
35
#endif
// PROTOCORE_SSH_SFTP_H
protocore_config.h
User-facing configuration for ProtoCore.
src
server
ssh_sftp.h
Generated by
1.9.8