/* Declarations for FTP support.
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Need it for struct rbuf. */
#include "rbuf.h"
+/* System types. */
+enum stype
+{
+ ST_UNIX,
+ ST_VMS,
+ ST_WINNT,
+ ST_MACOS,
+ ST_OTHER
+};
+
uerr_t ftp_response PARAMS ((struct rbuf *, char **));
uerr_t ftp_login PARAMS ((struct rbuf *, const char *, const char *));
uerr_t ftp_port PARAMS ((struct rbuf *));
uerr_t ftp_retr PARAMS ((struct rbuf *, const char *));
uerr_t ftp_rest PARAMS ((struct rbuf *, long));
uerr_t ftp_list PARAMS ((struct rbuf *, const char *));
+uerr_t ftp_syst PARAMS ((struct rbuf *, enum stype *));
+uerr_t ftp_pwd PARAMS ((struct rbuf *, char **));
struct urlinfo;
};
/* Commands for FTP functions. */
-enum command
+enum wget_ftp_command
{
DO_LOGIN = 0x0001, /* Connect and login to the server. */
DO_CWD = 0x0002, /* Change current directory. */
LEAVE_PENDING = 0x0010 /* Do not close the socket. */
};
-enum fstatus
+enum wget_ftp_fstatus
{
NOTHING = 0x0000, /* Nothing done yet. */
ON_YOUR_OWN = 0x0001, /* The ftp_loop_internal sets the
int cmd; /* command code */
struct rbuf rbuf; /* control connection buffer */
long dltime; /* time of the download */
+ enum stype rs; /* remote system reported by ftp server */
+ char *id; /* initial directory */
} ccon;
-struct fileinfo *ftp_parse_ls PARAMS ((const char *));
+struct fileinfo *ftp_parse_ls PARAMS ((const char *, enum stype));
uerr_t ftp_loop PARAMS ((struct urlinfo *, int *));
uerr_t ftp_index (const char *, struct urlinfo *, struct fileinfo *);