4 enum {FTP_DIR, FTP_FILE}; /* ftp_dirent type */
28 int ctl, data; /* sockets */
33 void (*cproc)(struct ftp *ftp, int code, const char *buf, void *cls);
34 void (*dproc)(struct ftp *ftp, const char *buf, int sz, void *cls);
35 void *cproc_cls, *dproc_cls;
42 char *curdir_rem, *curdir_loc;
43 struct ftp_dirent *dent;
49 struct ftp *ftp_alloc(void);
50 void ftp_free(struct ftp *ftp);
52 void ftp_auth(const char *user, const char *pass);
54 int ftp_connect(struct ftp *ftp, const char *host, int port);
55 void ftp_close(struct ftp *ftp);
57 int ftp_sockets(struct ftp *ftp, int *sockv, int maxsize);
58 int ftp_pending(struct ftp *ftp);
60 int ftp_handle(struct ftp *ftp, int s);
62 int ftp_update(struct ftp *ftp);
63 int ftp_pwd(struct ftp *ftp);
64 int ftp_chdir(struct ftp *ftp, const char *dirname);