projects
/
oftp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
passive mode
[oftp]
/
src
/
ftp.h
diff --git
a/src/ftp.h
b/src/ftp.h
index
e8bcf10
..
faf057b
100644
(file)
--- a/
src/ftp.h
+++ b/
src/ftp.h
@@
-6,6
+6,7
@@
enum {FTP_DIR, FTP_FILE}; /* ftp_dirent type */
enum {
FTP_PWD,
FTP_CHDIR,
enum {
FTP_PWD,
FTP_CHDIR,
+ FTP_CDUP,
FTP_MKDIR,
FTP_RMDIR,
FTP_DEL,
FTP_MKDIR,
FTP_RMDIR,
FTP_DEL,
@@
-20,6
+21,16
@@
enum {
FTP_CONN_ACT
};
FTP_CONN_ACT
};
+enum {
+ FTP_REMOTE,
+ FTP_LOCAL
+};
+
+enum {
+ FTP_MOD_REMDIR = 0x100,
+ FTP_MOD_LOCDIR = 0x200
+};
+
struct ftp_op {
int op;
char *arg;
struct ftp_op {
int op;
char *arg;
@@
-30,14
+41,16
@@
struct ftp_op {
struct ftp_dirent {
char *name;
int type;
struct ftp_dirent {
char *name;
int type;
+ long size;
};
struct ftp {
int ctl, lis, data; /* sockets */
int lis_port;
};
struct ftp {
int ctl, lis, data; /* sockets */
int lis_port;
- int status;
+ int status, busy;
char *user, *pass;
char *user, *pass;
+ int passive;
struct ftp_op *qhead, *qtail;
struct ftp_op *qhead, *qtail;
@@
-49,8
+62,8
@@
struct ftp {
int num_crecv;
char drecv[256];
int num_crecv;
char drecv[256];
- char *curdir_rem, *curdir_loc;
- struct ftp_dirent *dent_rem, *dent_loc;
+ char *curdir[2];
+ struct ftp_dirent *dirent[2]; /* dynamic array */
int last_resp;
int modified;
int last_resp;
int modified;
@@
-81,5
+94,9
@@
int ftp_list(struct ftp *ftp);
int ftp_retrieve(struct ftp *ftp, const char *fname);
int ftp_store(struct ftp *ftp, const char *fname);
int ftp_retrieve(struct ftp *ftp, const char *fname);
int ftp_store(struct ftp *ftp, const char *fname);
+const char *ftp_curdir(struct ftp *ftp, int whichdir);
+int ftp_num_dirent(struct ftp *ftp, int whichdir);
+struct ftp_dirent *ftp_dirent(struct ftp *ftp, int whichdir, int idx);
+
#endif /* FTP_H_ */
#endif /* FTP_H_ */