summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/ftp.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libcurl/src/ftp.h')
-rw-r--r--libs/libcurl/src/ftp.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/libs/libcurl/src/ftp.h b/libs/libcurl/src/ftp.h
index ebbe2fc48d..c210cbc87c 100644
--- a/libs/libcurl/src/ftp.h
+++ b/libs/libcurl/src/ftp.h
@@ -37,6 +37,9 @@ extern const struct Curl_handler Curl_handler_ftps;
CURLcode Curl_GetFTPResponse(struct Curl_easy *data, ssize_t *nread,
int *ftpcode);
+
+bool ftp_conns_match(struct connectdata *needle, struct connectdata *conn);
+
#endif /* CURL_DISABLE_FTP */
/****************************************************************************
@@ -125,7 +128,8 @@ struct ftp_conn {
char *entrypath; /* the PWD reply when we logged on */
char *file; /* url-decoded filename (or path) */
char **dirs; /* realloc()ed array for path components */
- char *newhost;
+ char *newhost; /* the (allocated) IP addr or hostname to connect the data
+ connection to */
char *prevpath; /* url-decoded conn->path from the previous transfer */
char transfertype; /* set by ftp_transfertype for use by Curl_client_write()a
and others (A/I or zero) */
@@ -139,9 +143,8 @@ struct ftp_conn {
int count1; /* general purpose counter for the state machine */
int count2; /* general purpose counter for the state machine */
int count3; /* general purpose counter for the state machine */
- /* newhost is the (allocated) IP addr or hostname to connect the data
- connection to */
- unsigned short newport;
+ unsigned short newport; /* the port of 'newhost' to connect the data
+ connection to */
ftpstate state; /* always use ftp.c:state() to change state! */
ftpstate state_saved; /* transfer type saved to be reloaded after data
connection is established */
@@ -160,8 +163,14 @@ struct ftp_conn {
BIT(cwdfail); /* set TRUE if a CWD command fails, as then we must prevent
caching the current directory */
BIT(wait_data_conn); /* this is set TRUE if data connection is waited */
+ BIT(shutdown); /* connection is being shutdown, e.g. QUIT */
};
+/* meta key for storing `struct FTP` as easy meta data */
+#define CURL_META_FTP_EASY "meta:proto:ftp:easy"
+/* meta key for storing `struct ftp_conn` as connection meta data */
+#define CURL_META_FTP_CONN "meta:proto:ftp:conn"
+
#define DEFAULT_ACCEPT_TIMEOUT 60000 /* milliseconds == one minute */
#endif /* HEADER_CURL_FTP_H */