diff options
author | djm@openbsd.org <djm@openbsd.org> | 2021-08-07 00:02:41 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2021-08-07 10:20:24 +1000 |
commit | de7115b373ba0be3861c65de9b606a3e0e9d29a3 (patch) | |
tree | bb0bd2e622ad11a2a7e6c3909c3f1c841f0b5ceb /sftp-client.h | |
parent | a50bd0367ff2063bbc70a387740a2aa6914de094 (diff) | |
download | openssh-git-de7115b373ba0be3861c65de9b606a3e0e9d29a3.tar.gz |
upstream: support for "cross"-loading files/directories, i.e.
downloading from one SFTP server while simultaneously uploading to another.
feedback & ok markus@
OpenBSD-Commit-ID: 3982878e29d8df0fa4ddc502f5ff6126ac714235
Diffstat (limited to 'sftp-client.h')
-rw-r--r-- | sftp-client.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sftp-client.h b/sftp-client.h index 6f6c49fb..c7fa04f5 100644 --- a/sftp-client.h +++ b/sftp-client.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.h,v 1.30 2021/03/31 22:16:34 djm Exp $ */ +/* $OpenBSD: sftp-client.h,v 1.31 2021/08/07 00:02:41 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> @@ -150,6 +150,23 @@ int do_upload(struct sftp_conn *, const char *, const char *, int, int, int); int upload_dir(struct sftp_conn *, const char *, const char *, int, int, int, int); +/* + * Download a 'from_path' from the 'from' connection and upload it to + * to 'to' connection at 'to_path'. + */ +int +do_crossload(struct sftp_conn *from, struct sftp_conn *to, + const char *from_path, const char *to_path, + Attrib *a, int preserve_flag); + +/* + * Recursively download a directory from 'from_path' from the 'from' + * connection and upload it to 'to' connection at 'to_path'. + */ +int crossload_dir(struct sftp_conn *from, struct sftp_conn *to, + const char *from_path, const char *to_path, + Attrib *dirattrib, int preserve_flag, int print_flag); + /* Concatenate paths, taking care of slashes. Caller must free result. */ char *path_append(const char *, const char *); |