summaryrefslogtreecommitdiff
path: root/sftp-client.h
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2008-06-09 22:49:36 +1000
committerDarren Tucker <dtucker@zip.com.au>2008-06-09 22:49:36 +1000
commit7b598892be09a9da2855b57086dddce502a150dc (patch)
treede3a5563691daa606ddd936538574f4ea2b510dd /sftp-client.h
parent422c34c96dd7e6dcb507747bdbb499e96000aa5f (diff)
downloadopenssh-git-7b598892be09a9da2855b57086dddce502a150dc.tar.gz
- dtucker@cvs.openbsd.org 2008/06/08 20:15:29
[sftp.c sftp-client.c sftp-client.h] Have the sftp client store the statvfs replies in wire format, which prevents problems when the server's native sizes exceed the client's. Also extends the sizes of the remaining 32bit wire format to 64bit, they're specified as unsigned long in the standard.
Diffstat (limited to 'sftp-client.h')
-rw-r--r--sftp-client.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/sftp-client.h b/sftp-client.h
index b102e118..edb46790 100644
--- a/sftp-client.h
+++ b/sftp-client.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.h,v 1.16 2008/04/18 12:32:11 djm Exp $ */
+/* $OpenBSD: sftp-client.h,v 1.17 2008/06/08 20:15:29 dtucker Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
@@ -30,6 +30,24 @@ struct SFTP_DIRENT {
};
/*
+ * Used for statvfs responses on the wire from the server, because the
+ * server's native format may be larger than the client's.
+ */
+struct sftp_statvfs {
+ u_int64_t f_bsize;
+ u_int64_t f_frsize;
+ u_int64_t f_blocks;
+ u_int64_t f_bfree;
+ u_int64_t f_bavail;
+ u_int64_t f_files;
+ u_int64_t f_ffree;
+ u_int64_t f_favail;
+ u_int64_t f_fsid;
+ u_int64_t f_flag;
+ u_int64_t f_namemax;
+};
+
+/*
* Initialise a SSH filexfer connection. Returns NULL on error or
* a pointer to a initialized sftp_conn struct on success.
*/
@@ -71,8 +89,7 @@ int do_fsetstat(struct sftp_conn *, char *, u_int, Attrib *);
char *do_realpath(struct sftp_conn *, char *);
/* Get statistics for filesystem hosting file at "path" */
-struct statvfs;
-int do_statvfs(struct sftp_conn *, const char *, struct statvfs *, int);
+int do_statvfs(struct sftp_conn *, const char *, struct sftp_statvfs *, int);
/* Rename 'oldpath' to 'newpath' */
int do_rename(struct sftp_conn *, char *, char *);