diff options
Diffstat (limited to 'sftp-client.h')
-rw-r--r-- | sftp-client.h | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/sftp-client.h b/sftp-client.h index 09ffcc05c..a322b2571 100644 --- a/sftp-client.h +++ b/sftp-client.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp-client.h,v 1.5 2001/04/05 10:42:52 markus Exp $ */ | 1 | /* $OpenBSD: sftp-client.h,v 1.6 2001/06/26 06:33:01 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2001 Damien Miller. All rights reserved. | 4 | * Copyright (c) 2001 Damien Miller. All rights reserved. |
@@ -38,57 +38,55 @@ struct SFTP_DIRENT { | |||
38 | * Initialiase a SSH filexfer connection. Returns -1 on error or | 38 | * Initialiase a SSH filexfer connection. Returns -1 on error or |
39 | * protocol version on success. | 39 | * protocol version on success. |
40 | */ | 40 | */ |
41 | int do_init(int fd_in, int fd_out); | 41 | int do_init(int, int); |
42 | 42 | ||
43 | /* Close file referred to by 'handle' */ | 43 | /* Close file referred to by 'handle' */ |
44 | int do_close(int fd_in, int fd_out, char *handle, u_int handle_len); | 44 | int do_close(int, int, char *, u_int); |
45 | 45 | ||
46 | /* List contents of directory 'path' to stdout */ | 46 | /* List contents of directory 'path' to stdout */ |
47 | int do_ls(int fd_in, int fd_out, char *path); | 47 | int do_ls(int, int, char *); |
48 | 48 | ||
49 | /* Read contents of 'path' to NULL-terminated array 'dir' */ | 49 | /* Read contents of 'path' to NULL-terminated array 'dir' */ |
50 | int do_readdir(int fd_in, int fd_out, char *path, SFTP_DIRENT ***dir); | 50 | int do_readdir(int, int, char *, SFTP_DIRENT ***); |
51 | 51 | ||
52 | /* Frees a NULL-terminated array of SFTP_DIRENTs (eg. from do_readdir) */ | 52 | /* Frees a NULL-terminated array of SFTP_DIRENTs (eg. from do_readdir) */ |
53 | void free_sftp_dirents(SFTP_DIRENT **s); | 53 | void free_sftp_dirents(SFTP_DIRENT **); |
54 | 54 | ||
55 | /* Delete file 'path' */ | 55 | /* Delete file 'path' */ |
56 | int do_rm(int fd_in, int fd_out, char *path); | 56 | int do_rm(int, int, char *); |
57 | 57 | ||
58 | /* Create directory 'path' */ | 58 | /* Create directory 'path' */ |
59 | int do_mkdir(int fd_in, int fd_out, char *path, Attrib *a); | 59 | int do_mkdir(int, int, char *, Attrib *); |
60 | 60 | ||
61 | /* Remove directory 'path' */ | 61 | /* Remove directory 'path' */ |
62 | int do_rmdir(int fd_in, int fd_out, char *path); | 62 | int do_rmdir(int, int, char *); |
63 | 63 | ||
64 | /* Get file attributes of 'path' (follows symlinks) */ | 64 | /* Get file attributes of 'path' (follows symlinks) */ |
65 | Attrib *do_stat(int fd_in, int fd_out, char *path, int quiet); | 65 | Attrib *do_stat(int, int, char *, int); |
66 | 66 | ||
67 | /* Get file attributes of 'path' (does not follow symlinks) */ | 67 | /* Get file attributes of 'path' (does not follow symlinks) */ |
68 | Attrib *do_lstat(int fd_in, int fd_out, char *path, int quiet); | 68 | Attrib *do_lstat(int, int, char *, int); |
69 | 69 | ||
70 | /* Get file attributes of open file 'handle' */ | 70 | /* Get file attributes of open file 'handle' */ |
71 | Attrib *do_fstat(int fd_in, int fd_out, char *handle, u_int handle_len, | 71 | Attrib *do_fstat(int, int, char *, u_int, int); |
72 | int quiet); | ||
73 | 72 | ||
74 | /* Set file attributes of 'path' */ | 73 | /* Set file attributes of 'path' */ |
75 | int do_setstat(int fd_in, int fd_out, char *path, Attrib *a); | 74 | int do_setstat(int, int, char *, Attrib *); |
76 | 75 | ||
77 | /* Set file attributes of open file 'handle' */ | 76 | /* Set file attributes of open file 'handle' */ |
78 | int do_fsetstat(int fd_in, int fd_out, char *handle, | 77 | int do_fsetstat(int, int, char *, u_int, Attrib *); |
79 | u_int handle_len, Attrib *a); | ||
80 | 78 | ||
81 | /* Canonicalise 'path' - caller must free result */ | 79 | /* Canonicalise 'path' - caller must free result */ |
82 | char *do_realpath(int fd_in, int fd_out, char *path); | 80 | char *do_realpath(int, int, char *); |
83 | 81 | ||
84 | /* Rename 'oldpath' to 'newpath' */ | 82 | /* Rename 'oldpath' to 'newpath' */ |
85 | int do_rename(int fd_in, int fd_out, char *oldpath, char *newpath); | 83 | int do_rename(int, int, char *, char *); |
86 | 84 | ||
87 | /* Rename 'oldpath' to 'newpath' */ | 85 | /* Rename 'oldpath' to 'newpath' */ |
88 | int do_symlink(int fd_in, int fd_out, char *oldpath, char *newpath); | 86 | int do_symlink(int, int, char *, char *); |
89 | 87 | ||
90 | /* Return target of symlink 'path' - caller must free result */ | 88 | /* Return target of symlink 'path' - caller must free result */ |
91 | char *do_readlink(int fd_in, int fd_out, char *path); | 89 | char *do_readlink(int, int, char *); |
92 | 90 | ||
93 | /* XXX: add callbacks to do_download/do_upload so we can do progress meter */ | 91 | /* XXX: add callbacks to do_download/do_upload so we can do progress meter */ |
94 | 92 | ||
@@ -96,12 +94,10 @@ char *do_readlink(int fd_in, int fd_out, char *path); | |||
96 | * Download 'remote_path' to 'local_path'. Preserve permissions and times | 94 | * Download 'remote_path' to 'local_path'. Preserve permissions and times |
97 | * if 'pflag' is set | 95 | * if 'pflag' is set |
98 | */ | 96 | */ |
99 | int do_download(int fd_in, int fd_out, char *remote_path, char *local_path, | 97 | int do_download(int, int, char *, char *, int); |
100 | int pflag); | ||
101 | 98 | ||
102 | /* | 99 | /* |
103 | * Upload 'local_path' to 'remote_path'. Preserve permissions and times | 100 | * Upload 'local_path' to 'remote_path'. Preserve permissions and times |
104 | * if 'pflag' is set | 101 | * if 'pflag' is set |
105 | */ | 102 | */ |
106 | int do_upload(int fd_in, int fd_out, char *local_path, char *remote_path, | 103 | int do_upload(int, int, char *, char *, int); |
107 | int pflag); | ||