libssh
0.11.2
The SSH library
Loading...
Searching...
No Matches
sftpserver.h
1
/*
2
* This file is part of the SSH Library
3
*
4
* Copyright (c) 2022 Zeyu Sheng <shengzeyu19_98@163.com>
5
* Copyright (c) 2023 Red Hat, Inc.
6
*
7
* Authors: Jakub Jelen <jjelen@redhat.com>
8
*
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Lesser General Public
11
* License as published by the Free Software Foundation; either
12
* version 2.1 of the License, or (at your option) any later version.
13
*
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Lesser General Public License for more details.
18
*
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with this library; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
*/
23
24
#ifndef SFTP_SERVER_H
25
#define SFTP_SERVER_H
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
31
#include <stdint.h>
32
33
#include "libssh/libssh.h"
34
#include "libssh/sftp.h"
35
45
46
#define SSH_SFTP_CALLBACK(name) \
47
static int name(sftp_client_message message)
48
49
typedef
int (*sftp_server_message_callback)(sftp_client_message message);
50
51
struct
sftp_message_handler
52
{
53
const
char
*name;
54
const
char
*extended_name;
55
uint8_t type;
56
57
sftp_server_message_callback cb;
58
};
59
60
LIBSSH_API
int
sftp_channel_default_subsystem_request
(ssh_session session,
61
ssh_channel channel,
62
const
char
*subsystem,
63
void
*userdata);
64
LIBSSH_API
int
sftp_channel_default_data_callback(ssh_session session,
65
ssh_channel channel,
66
void
*data,
67
uint32_t len,
68
int
is_stderr,
69
void
*userdata);
70
72
73
#ifdef __cplusplus
74
}
75
#endif
76
77
#endif
/* SFTP_SERVER_H */
sftp_channel_default_subsystem_request
LIBSSH_API int sftp_channel_default_subsystem_request(ssh_session session, ssh_channel channel, const char *subsystem, void *userdata)
Default subsystem request handler for SFTP subsystem.
Definition
sftpserver.c:1785
sftp_message_handler
Definition
sftpserver.h:52
include
libssh
sftpserver.h
Generated by
1.14.0