X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/61e9624802b421b3087730b8dbb768af2021dc6d..da073eee149b3148bd37411ca93644bcb7e26fdc:/sftp-common.h?ds=sidebyside diff --git a/sftp-common.h b/sftp-common.h index 6dc1a32f..9b584846 100644 --- a/sftp-common.h +++ b/sftp-common.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-common.h,v 1.1 2001/02/04 11:11:54 djm Exp $ */ +/* $OpenBSD: sftp-common.h,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -25,6 +25,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* Maximum packet that we are willing to send/accept */ +#define SFTP_MAX_MSG_LENGTH (256 * 1024) + typedef struct Attrib Attrib; /* File attributes */ @@ -38,18 +41,11 @@ struct Attrib { u_int32_t mtime; }; -/* Clear contents of attributes structure */ -void attrib_clear(Attrib *a); - -/* Convert from struct stat to filexfer attribs */ -void stat_to_attrib(struct stat *st, Attrib *a); - -/* Decode attributes in buffer */ -Attrib *decode_attrib(Buffer *b); - -/* Encode attributes to buffer */ -void encode_attrib(Buffer *b, Attrib *a); - -/* Convert from SSH2_FX_ status to text error message */ -const char *fx2txt(int status); +void attrib_clear(Attrib *); +void stat_to_attrib(const struct stat *, Attrib *); +void attrib_to_stat(const Attrib *, struct stat *); +Attrib *decode_attrib(Buffer *); +void encode_attrib(Buffer *, const Attrib *); +char *ls_file(const char *, const struct stat *, int); +const char *fx2txt(int);