4 enum {FTP_DIR, FTP_FILE}; /* ftp_dirent type */
36 int ctl, lis, data; /* sockets */
42 struct ftp_op *qhead, *qtail;
44 int (*cproc)(struct ftp *ftp, int code, const char *buf, void *cls);
45 void (*dproc)(struct ftp *ftp, const char *buf, int sz, void *cls);
46 void *cproc_cls, *dproc_cls;
52 char *curdir_rem, *curdir_loc;
53 struct ftp_dirent *dent_rem, *dent_loc;
59 struct ftp *ftp_alloc(void);
60 void ftp_free(struct ftp *ftp);
62 void ftp_auth(const char *user, const char *pass);
64 int ftp_connect(struct ftp *ftp, const char *host, int port);
65 void ftp_close(struct ftp *ftp);
67 int ftp_sockets(struct ftp *ftp, int *sockv, int maxsize);
69 int ftp_handle(struct ftp *ftp, int s);
71 int ftp_queue(struct ftp *ftp, int op, const char *arg);
72 int ftp_waitresp(struct ftp *ftp, time_t timeout);
74 int ftp_update(struct ftp *ftp);
75 int ftp_pwd(struct ftp *ftp);
76 int ftp_chdir(struct ftp *ftp, const char *dirname);
77 int ftp_mkdir(struct ftp *ftp, const char *dirname);
78 int ftp_rmdir(struct ftp *ftp, const char *dirname);
79 int ftp_delete(struct ftp *ftp, const char *fname);
80 int ftp_list(struct ftp *ftp);
81 int ftp_retrieve(struct ftp *ftp, const char *fname);
82 int ftp_store(struct ftp *ftp, const char *fname);