summaryrefslogtreecommitdiff
path: root/sftp-client.h
diff options
context:
space:
mode:
Diffstat (limited to 'sftp-client.h')
-rw-r--r--sftp-client.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/sftp-client.h b/sftp-client.h
index c8a41f377..edb46790f 100644
--- a/sftp-client.h
+++ b/sftp-client.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-client.h,v 1.14 2005/04/26 12:59:02 jmc Exp $ */ 1/* $OpenBSD: sftp-client.h,v 1.17 2008/06/08 20:15:29 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 4 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
@@ -30,6 +30,24 @@ struct SFTP_DIRENT {
30}; 30};
31 31
32/* 32/*
33 * Used for statvfs responses on the wire from the server, because the
34 * server's native format may be larger than the client's.
35 */
36struct sftp_statvfs {
37 u_int64_t f_bsize;
38 u_int64_t f_frsize;
39 u_int64_t f_blocks;
40 u_int64_t f_bfree;
41 u_int64_t f_bavail;
42 u_int64_t f_files;
43 u_int64_t f_ffree;
44 u_int64_t f_favail;
45 u_int64_t f_fsid;
46 u_int64_t f_flag;
47 u_int64_t f_namemax;
48};
49
50/*
33 * Initialise a SSH filexfer connection. Returns NULL on error or 51 * Initialise a SSH filexfer connection. Returns NULL on error or
34 * a pointer to a initialized sftp_conn struct on success. 52 * a pointer to a initialized sftp_conn struct on success.
35 */ 53 */
@@ -61,9 +79,6 @@ Attrib *do_stat(struct sftp_conn *, char *, int);
61/* Get file attributes of 'path' (does not follow symlinks) */ 79/* Get file attributes of 'path' (does not follow symlinks) */
62Attrib *do_lstat(struct sftp_conn *, char *, int); 80Attrib *do_lstat(struct sftp_conn *, char *, int);
63 81
64/* Get file attributes of open file 'handle' */
65Attrib *do_fstat(struct sftp_conn *, char *, u_int, int);
66
67/* Set file attributes of 'path' */ 82/* Set file attributes of 'path' */
68int do_setstat(struct sftp_conn *, char *, Attrib *); 83int do_setstat(struct sftp_conn *, char *, Attrib *);
69 84
@@ -73,15 +88,15 @@ int do_fsetstat(struct sftp_conn *, char *, u_int, Attrib *);
73/* Canonicalise 'path' - caller must free result */ 88/* Canonicalise 'path' - caller must free result */
74char *do_realpath(struct sftp_conn *, char *); 89char *do_realpath(struct sftp_conn *, char *);
75 90
91/* Get statistics for filesystem hosting file at "path" */
92int do_statvfs(struct sftp_conn *, const char *, struct sftp_statvfs *, int);
93
76/* Rename 'oldpath' to 'newpath' */ 94/* Rename 'oldpath' to 'newpath' */
77int do_rename(struct sftp_conn *, char *, char *); 95int do_rename(struct sftp_conn *, char *, char *);
78 96
79/* Rename 'oldpath' to 'newpath' */ 97/* Rename 'oldpath' to 'newpath' */
80int do_symlink(struct sftp_conn *, char *, char *); 98int do_symlink(struct sftp_conn *, char *, char *);
81 99
82/* Return target of symlink 'path' - caller must free result */
83char *do_readlink(struct sftp_conn *, char *);
84
85/* XXX: add callbacks to do_download/do_upload so we can do progress meter */ 100/* XXX: add callbacks to do_download/do_upload so we can do progress meter */
86 101
87/* 102/*