X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fftp.h;fp=src%2Fftp.h;h=c843e537dde44ff5e2aa337cf004fd41dbfe7d7c;hb=2f4fb7c15c5017546238241ea318b16b9a032c52;hp=0000000000000000000000000000000000000000;hpb=8091cf11d15e1363d8d608fb640f4f12b0887e52;p=oftp diff --git a/src/ftp.h b/src/ftp.h new file mode 100644 index 0000000..c843e53 --- /dev/null +++ b/src/ftp.h @@ -0,0 +1,29 @@ +#ifndef FTP_H_ +#define FTP_H_ + +enum {FTP_DIR, FTP_FILE}; /* ftp_dirent type */ + +struct ftp_dirent { + char *name; + int type; +}; + +struct ftp { + int ctl, data; /* sockets */ + + char *cwd; + struct ftp_dirent *dent; + int num_dent; +}; + +struct ftp *ftp_alloc(void); +void ftp_free(struct ftp *ftp); + +int ftp_connect(struct ftp *ftp, const char *host, int port); +void ftp_close(struct ftp *ftp); + +int ftp_update(struct ftp *ftp); +int ftp_chdir(struct ftp *ftp, const char *dirname); + + +#endif /* FTP_H_ */