ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
PORT_RTMP, /* defport */
- PROT_RTMP, /* protocol */
+ CURLPROTO_RTMP, /* protocol */
PROTOPT_NONE /* flags*/
};
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
PORT_RTMPT, /* defport */
- PROT_RTMPT, /* protocol */
+ CURLPROTO_RTMPT, /* protocol */
PROTOPT_NONE /* flags*/
};
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
PORT_RTMP, /* defport */
- PROT_RTMPE, /* protocol */
+ CURLPROTO_RTMPE, /* protocol */
PROTOPT_NONE /* flags*/
};
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
PORT_RTMPT, /* defport */
- PROT_RTMPTE, /* protocol */
+ CURLPROTO_RTMPTE, /* protocol */
PROTOPT_NONE /* flags*/
};
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
PORT_RTMPS, /* defport */
- PROT_RTMPS, /* protocol */
+ CURLPROTO_RTMPS, /* protocol */
PROTOPT_NONE /* flags*/
};
const struct Curl_handler Curl_handler_rtmpts = {
ZERO_NULL, /* perform_getsock */
rtmp_disconnect, /* disconnect */
PORT_RTMPS, /* defport */
- PROT_RTMPTS, /* protocol */
+ CURLPROTO_RTMPTS, /* protocol */
PROTOPT_NONE /* flags*/
};
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_DICT, /* defport */
- PROT_DICT, /* protocol */
+ CURLPROTO_DICT, /* protocol */
PROTOPT_NONE /* flags */
};
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
0, /* defport */
- PROT_FILE, /* protocol */
+ CURLPROTO_FILE, /* protocol */
PROTOPT_BANPROXY /* flags */
};
ZERO_NULL, /* perform_getsock */
ftp_disconnect, /* disconnect */
PORT_FTP, /* defport */
- PROT_FTP, /* protocol */
+ CURLPROTO_FTP, /* protocol */
PROTOPT_DUAL | PROTOPT_CLOSEACTION /* flags */
};
ZERO_NULL, /* perform_getsock */
ftp_disconnect, /* disconnect */
PORT_FTPS, /* defport */
- PROT_FTP | PROT_FTPS, /* protocol */
+ CURLPROTO_FTP | CURLPROTO_FTPS, /* protocol */
PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION /* flags */
};
#endif
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_FTP, /* defport */
- PROT_HTTP, /* protocol */
+ CURLPROTO_HTTP, /* protocol */
PROTOPT_NONE /* flags */
};
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_FTPS, /* defport */
- PROT_HTTP, /* protocol */
+ CURLPROTO_HTTP, /* protocol */
PROTOPT_NONE /* flags */
};
#endif
}
#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
- if(conn->handler->protocol & PROT_FTPS) {
+ if(conn->handler->protocol & CURLPROTO_FTPS) {
/* BLOCKING */
/* FTPS is simply ftp with SSL for the control channel */
/* now, perform the SSL initialization for this socket */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_GOPHER, /* defport */
- PROT_GOPHER, /* protocol */
+ CURLPROTO_GOPHER, /* protocol */
PROTOPT_NONE /* flags */
};
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_HTTP, /* defport */
- PROT_HTTP, /* protocol */
+ CURLPROTO_HTTP, /* protocol */
PROTOPT_NONE /* flags */
};
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_HTTPS, /* defport */
- PROT_HTTP | PROT_HTTPS, /* protocol */
+ CURLPROTO_HTTP | CURLPROTO_HTTPS, /* protocol */
PROTOPT_SSL /* flags */
};
#endif
curl_off_t bytessent;
curl_off_t expectsend = -1; /* default is unknown */
- if(!http || !(conn->handler->protocol & PROT_HTTP))
+ if(!http || !(conn->handler->protocol & CURLPROTO_HTTP))
/* If this is still NULL, we have not reach very far and we can
safely skip this rewinding stuff, or this is attempted to get used
when HTTP isn't activated */
}
#endif /* CURL_DOES_CONVERSIONS */
- if(conn->handler->protocol & PROT_HTTPS) {
+ if(conn->handler->protocol & CURLPROTO_HTTPS) {
/* We never send more than CURL_MAX_WRITE_SIZE bytes in one single chunk
when we speak HTTPS, as if only a fraction of it is sent now, this data
needs to fit into the normal read-callback buffer later on and that
}
#endif /* CURL_DISABLE_PROXY */
- if(conn->handler->protocol & PROT_HTTPS) {
+ if(conn->handler->protocol & CURLPROTO_HTTPS) {
/* perform SSL initialization */
if(data->state.used_interface == Curl_if_multi) {
result = https_connecting(conn, done);
static CURLcode https_connecting(struct connectdata *conn, bool *done)
{
CURLcode result;
- DEBUGASSERT((conn) && (conn->handler->protocol & PROT_HTTPS));
+ DEBUGASSERT((conn) && (conn->handler->protocol & CURLPROTO_HTTPS));
/* perform SSL initialization for this socket */
result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, done);
curl_socket_t *socks,
int numsocks)
{
- if(conn->handler->protocol & PROT_HTTPS) {
+ if(conn->handler->protocol & CURLPROTO_HTTPS) {
struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET];
if(!numsocks)
return CURLE_OUT_OF_MEMORY;
}
- if( (conn->handler->protocol&(PROT_HTTP|PROT_FTP)) &&
+ if( (conn->handler->protocol&(CURLPROTO_HTTP|CURLPROTO_FTP)) &&
data->set.upload) {
httpreq = HTTPREQ_PUT;
}
Curl_compareheader(ptr, "Transfer-Encoding:", "chunked");
}
else {
- if((conn->handler->protocol&PROT_HTTP) &&
+ if((conn->handler->protocol&CURLPROTO_HTTP) &&
data->set.upload &&
(data->set.infilesize == -1)) {
if(conn->bits.authneg)
/* When building Host: headers, we must put the host name within
[brackets] if the host name is a plain IPv6-address. RFC2732-style. */
- if(((conn->given->protocol&PROT_HTTPS) &&
+ if(((conn->given->protocol&CURLPROTO_HTTPS) &&
(conn->remote_port == PORT_HTTPS)) ||
- ((conn->given->protocol&PROT_HTTP) &&
+ ((conn->given->protocol&CURLPROTO_HTTP) &&
(conn->remote_port == PORT_HTTP)) )
/* if(HTTPS on port 443) OR (HTTP on port 80) then don't include
the port number in the host string */
conn->allocptr.cookiehost?
conn->allocptr.cookiehost:host,
data->state.path,
- (bool)(conn->handler->protocol&PROT_HTTPS?
+ (bool)(conn->handler->protocol&CURLPROTO_HTTPS?
TRUE:FALSE));
Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
}
const char *s)
{
#ifndef CURL_DISABLE_RTSP
- if(conn->handler->protocol & PROT_RTSP)
+ if(conn->handler->protocol & CURLPROTO_RTSP)
return checkrtspprefix(data, s);
#else
(void)conn;
if((k->size == -1) && !k->chunk && !conn->bits.close &&
(conn->httpversion >= 11) &&
- !(conn->handler->protocol & PROT_RTSP)) {
+ !(conn->handler->protocol & CURLPROTO_RTSP)) {
/* On HTTP 1.1, when connection is not to get closed, but no
Content-Length nor Content-Encoding chunked have been
received, according to RFC2616 section 4.4 point 5, we
#define HEADER1 k->p /* no conversion needed, just use k->p */
#endif /* CURL_DOES_CONVERSIONS */
- if(conn->handler->protocol & PROT_HTTP) {
+ if(conn->handler->protocol & CURLPROTO_HTTP) {
nc = sscanf(HEADER1,
" HTTP/%d.%d %3d",
&httpversion_major,
}
}
}
- else if(conn->handler->protocol & PROT_RTSP) {
+ else if(conn->handler->protocol & CURLPROTO_RTSP) {
nc = sscanf(HEADER1,
" RTSP/%d.%d %3d",
&rtspversion_major,
conn->bits.close = TRUE; /* close when done */
}
else if(Curl_compareheader(k->p, "Transfer-Encoding:", "chunked") &&
- !(conn->handler->protocol & PROT_RTSP)) {
+ !(conn->handler->protocol & CURLPROTO_RTSP)) {
/*
* [RFC 2616, section 3.6.1] A 'chunked' transfer encoding
* means that the server will send a series of "chunks". Each
}
}
#ifndef CURL_DISABLE_RTSP
- else if(conn->handler->protocol & PROT_RTSP) {
+ else if(conn->handler->protocol & CURLPROTO_RTSP) {
result = Curl_rtsp_parseheader(conn, k->p);
if(result)
return result;
ZERO_NULL, /* perform_getsock */
imap_disconnect, /* disconnect */
PORT_IMAP, /* defport */
- PROT_IMAP, /* protocol */
+ CURLPROTO_IMAP, /* protocol */
PROTOPT_CLOSEACTION /* flags */
};
ZERO_NULL, /* perform_getsock */
imap_disconnect, /* disconnect */
PORT_IMAPS, /* defport */
- PROT_IMAP | PROT_IMAPS, /* protocol */
+ CURLPROTO_IMAP | CURLPROTO_IMAPS, /* protocol */
PROTOPT_CLOSEACTION | PROTOPT_SSL /* flags */
};
#endif
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_IMAP, /* defport */
- PROT_HTTP, /* protocol */
+ CURLPROTO_HTTP, /* protocol */
PROTOPT_NONE /* flags */
};
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_IMAPS, /* defport */
- PROT_HTTP, /* protocol */
+ CURLPROTO_HTTP, /* protocol */
PROTOPT_NONE /* flags */
};
#endif
struct imap_conn *imapc = &conn->proto.imapc;
CURLcode result;
- if((conn->handler->protocol & PROT_IMAPS) && !imapc->ssldone) {
+ if((conn->handler->protocol & CURLPROTO_IMAPS) && !imapc->ssldone) {
result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &imapc->ssldone);
}
else {
}
#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
- if((conn->handler->protocol & PROT_IMAPS) &&
+ if((conn->handler->protocol & CURLPROTO_IMAPS) &&
data->state.used_interface != Curl_if_multi) {
/* BLOCKING */
/* IMAPS is simply imap with SSL for the control channel */
ZERO_NULL, /* perform_getsock */
ldap_disconnect, /* disconnect */
PORT_LDAP, /* defport */
- PROT_LDAP, /* protocol */
+ CURLPROTO_LDAP, /* protocol */
PROTOPT_NONE /* flags */
};
ZERO_NULL, /* perform_getsock */
ldap_disconnect, /* disconnect */
PORT_LDAPS, /* defport */
- PROT_LDAP, /* protocol */
+ CURLPROTO_LDAP, /* protocol */
PROTOPT_SSL /* flags */
};
#endif
ZERO_NULL, /* perform_getsock */
pop3_disconnect, /* disconnect */
PORT_POP3, /* defport */
- PROT_POP3, /* protocol */
+ CURLPROTO_POP3, /* protocol */
PROTOPT_CLOSEACTION /* flags */
};
ZERO_NULL, /* perform_getsock */
pop3_disconnect, /* disconnect */
PORT_POP3S, /* defport */
- PROT_POP3 | PROT_POP3S, /* protocol */
+ CURLPROTO_POP3 | CURLPROTO_POP3S, /* protocol */
PROTOPT_CLOSEACTION | PROTOPT_SSL /* flags */
};
#endif
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_POP3, /* defport */
- PROT_HTTP, /* protocol */
+ CURLPROTO_HTTP, /* protocol */
PROTOPT_NONE /* flags */
};
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_POP3S, /* defport */
- PROT_HTTP, /* protocol */
+ CURLPROTO_HTTP, /* protocol */
PROTOPT_NONE /* flags */
};
#endif
}
#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
- if(conn->handler->protocol & PROT_POP3S) {
+ if(conn->handler->protocol & CURLPROTO_POP3S) {
/* BLOCKING */
/* POP3S is simply pop3 with SSL for the control channel */
/* now, perform the SSL initialization for this socket */
ZERO_NULL, /* perform_getsock */
Curl_rtsp_disconnect, /* disconnect */
PORT_RTSP, /* defport */
- PROT_RTSP, /* protocol */
+ CURLPROTO_RTSP, /* protocol */
PROTOPT_NONE /* flags */
};
}
if(type & CLIENTWRITE_BODY) {
- if((conn->handler->protocol&PROT_FTP) &&
+ if((conn->handler->protocol&CURLPROTO_FTP) &&
conn->proto.ftpc.transfertype == 'A') {
#ifdef CURL_DOES_CONVERSIONS
/* convert from the network encoding */
ZERO_NULL, /* perform_getsock */
smtp_disconnect, /* disconnect */
PORT_SMTP, /* defport */
- PROT_SMTP, /* protocol */
+ CURLPROTO_SMTP, /* protocol */
PROTOPT_CLOSEACTION /* flags */
};
ZERO_NULL, /* perform_getsock */
smtp_disconnect, /* disconnect */
PORT_SMTPS, /* defport */
- PROT_SMTP | PROT_SMTPS, /* protocol */
+ CURLPROTO_SMTP | CURLPROTO_SMTPS, /* protocol */
PROTOPT_CLOSEACTION | PROTOPT_SSL /* flags */
};
#endif
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_SMTP, /* defport */
- PROT_HTTP, /* protocol */
+ CURLPROTO_HTTP, /* protocol */
PROTOPT_NONE /* flags */
};
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_SMTPS, /* defport */
- PROT_HTTP, /* protocol */
+ CURLPROTO_HTTP, /* protocol */
PROTOPT_NONE /* flags */
};
#endif
}
#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
- if(conn->handler->protocol & PROT_SMTPS) {
+ if(conn->handler->protocol & CURLPROTO_SMTPS) {
/* BLOCKING */
/* SMTPS is simply smtp with SSL for the control channel */
/* now, perform the SSL initialization for this socket */
ssh_perform_getsock, /* perform_getsock */
scp_disconnect, /* disconnect */
PORT_SSH, /* defport */
- PROT_SCP, /* protocol */
+ CURLPROTO_SCP, /* protocol */
PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION /* flags */
};
ssh_perform_getsock, /* perform_getsock */
sftp_disconnect, /* disconnect */
PORT_SSH, /* defport */
- PROT_SFTP, /* protocol */
+ CURLPROTO_SFTP, /* protocol */
PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION /* flags */
};
return CURLE_OUT_OF_MEMORY;
/* Check for /~/ , indicating relative to the user's home directory */
- if(conn->handler->protocol & PROT_SCP) {
+ if(conn->handler->protocol & CURLPROTO_SCP) {
real_path = malloc(working_path_len+1);
if(real_path == NULL) {
free(working_path);
else
memcpy(real_path, working_path, 1 + working_path_len);
}
- else if(conn->handler->protocol & PROT_SFTP) {
+ else if(conn->handler->protocol & CURLPROTO_SFTP) {
if((working_path_len > 1) && (working_path[1] == '~')) {
size_t homelen = strlen(homedir);
real_path = malloc(homelen + working_path_len + 1);
conn->sockfd = sock;
conn->writesockfd = CURL_SOCKET_BAD;
- if(conn->handler->protocol == PROT_SFTP) {
+ if(conn->handler->protocol == CURLPROTO_SFTP) {
state(conn, SSH_SFTP_INIT);
break;
}
if(result)
return result;
- if(conn->handler->protocol & PROT_SCP) {
+ if(conn->handler->protocol & CURLPROTO_SCP) {
conn->recv[FIRSTSOCKET] = scp_recv;
conn->send[FIRSTSOCKET] = scp_send;
} else {
Curl_pgrsSetUploadSize(data, 0);
Curl_pgrsSetDownloadSize(data, 0);
- if(conn->handler->protocol & PROT_SCP)
+ if(conn->handler->protocol & CURLPROTO_SCP)
res = scp_perform(conn, &connected, done);
else
res = sftp_perform(conn, &connected, done);
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_TELNET, /* defport */
- PROT_TELNET, /* protocol */
+ CURLPROTO_TELNET, /* protocol */
PROTOPT_NONE /* flags */
};
ZERO_NULL, /* perform_getsock */
tftp_disconnect, /* disconnect */
PORT_TFTP, /* defport */
- PROT_TFTP, /* protocol */
+ CURLPROTO_TFTP, /* protocol */
PROTOPT_NONE /* flags */
};
#ifdef CURL_DOES_CONVERSIONS
bool sending_http_headers = FALSE;
- if((conn->protocol&(PROT_HTTP|PROT_RTSP)) &&
+ if((conn->protocol&(CURLPROTO_HTTP|CURLPROTO_RTSP)) &&
(data->state.proto.http->sending == HTTPSEND_REQUEST)) {
/* We're sending the HTTP request headers, not the data.
Remember that so we don't re-translate them into garbage. */
{
/* in the case of libssh2, we can never be really sure that we have emptied
its internal buffers so we MUST always try until we get EAGAIN back */
- return conn->handler->protocol&(PROT_SCP|PROT_SFTP) ||
+ return conn->handler->protocol&(CURLPROTO_SCP|CURLPROTO_SFTP) ||
Curl_ssl_data_pending(conn, FIRSTSOCKET);
}
#ifndef CURL_DISABLE_RTSP
/* Check for RTP at the beginning of the data */
- if(conn->handler->protocol & PROT_RTSP) {
+ if(conn->handler->protocol & CURLPROTO_RTSP) {
result = Curl_rtsp_rtp_readwrite(data, conn, &nread, &readmore);
if(result)
return result;
#ifndef CURL_DISABLE_RTSP
/* Check for RTP after the headers if there is no Content */
if(k->maxdownload <= 0 && nread > 0 &&
- (conn->handler->protocol & PROT_RTSP)) {
+ (conn->handler->protocol & CURLPROTO_RTSP)) {
result = Curl_rtsp_rtp_readwrite(data, conn, &nread, &readmore);
if(result)
return result;
if(0 == k->bodywrites && !is_empty_data) {
/* These checks are only made the first time we are about to
write a piece of the body */
- if(conn->handler->protocol&(PROT_HTTP|PROT_RTSP)) {
+ if(conn->handler->protocol&(CURLPROTO_HTTP|CURLPROTO_RTSP)) {
/* HTTP-only checks */
if(data->req.newurl) {
if(!k->ignorebody) {
#ifndef CURL_DISABLE_POP3
- if(conn->handler->protocol&PROT_POP3)
+ if(conn->handler->protocol&CURLPROTO_POP3)
result = Curl_pop3_write(conn, k->str, nread);
else
#endif /* CURL_DISABLE_POP3 */
#ifndef CURL_DISABLE_RTSP
if(excess > 0 && !conn->bits.stream_was_rewound &&
- (conn->handler->protocol & PROT_RTSP)) {
+ (conn->handler->protocol & CURLPROTO_RTSP)) {
/* Check for RTP after the content if there is unrewound excess */
/* Parse the excess data */
break;
}
- if(conn->handler->protocol&(PROT_HTTP|PROT_RTSP)) {
+ if(conn->handler->protocol&(CURLPROTO_HTTP|CURLPROTO_RTSP)) {
if(data->state.proto.http->sending == HTTPSEND_REQUEST)
/* We're sending the HTTP request headers, not the data.
Remember that so we don't change the line endings. */
data->req.upload_present = nread;
#ifndef CURL_DISABLE_SMTP
- if(conn->handler->protocol & PROT_SMTP) {
+ if(conn->handler->protocol & CURLPROTO_SMTP) {
result = Curl_smtp_escape_eob(conn, nread);
if(result)
return result;
/* if we're talking upload, we can't do the checks below, unless the protocol
is HTTP as when uploading over HTTP we will still get a response */
- if(data->set.upload && !(conn->handler->protocol&(PROT_HTTP|PROT_RTSP)))
+ if(data->set.upload &&
+ !(conn->handler->protocol&(CURLPROTO_HTTP|CURLPROTO_RTSP)))
return CURLE_OK;
if(/* workaround for broken TLS servers */ data->state.ssl_connect_retry ||
/* for the *protocols fields we don't use the CURLPROTO_ALL convenience
define since we internally only use the lower 16 bits for the passed
in bitmask to not conflict with the private bits */
- set->allowed_protocols = PROT_ALL;
+ set->allowed_protocols = CURLPROTO_ALL;
set->redir_protocols =
- PROT_ALL & ~(CURLPROTO_FILE|CURLPROTO_SCP); /* not FILE or SCP */
+ CURLPROTO_ALL & ~(CURLPROTO_FILE|CURLPROTO_SCP); /* not FILE or SCP */
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
/*
static bool IsPipeliningPossible(const struct SessionHandle *handle,
const struct connectdata *conn)
{
- if((conn->handler->protocol & PROT_HTTP) &&
+ if((conn->handler->protocol & CURLPROTO_HTTP) &&
handle->multi && Curl_multi_canPipeline(handle->multi) &&
(handle->set.httpreq == HTTPREQ_GET ||
handle->set.httpreq == HTTPREQ_HEAD) &&
use */
bool dead;
#ifndef CURL_DISABLE_RTSP
- if(check->handler->protocol & PROT_RTSP)
+ if(check->handler->protocol & CURLPROTO_RTSP)
/* RTSP is a special case due to RTP interleaving */
dead = RTSPConnIsDead(check);
else
continue;
}
}
- if((needle->handler->protocol & PROT_FTP) ||
- ((needle->handler->protocol & PROT_HTTP) &&
+ if((needle->handler->protocol & CURLPROTO_FTP) ||
+ ((needle->handler->protocol & CURLPROTO_HTTP) &&
(data->state.authhost.want==CURLAUTH_NTLM))) {
/* This is FTP or HTTP+NTLM, verify that we're using the same name
and password as well */
const char *user, const char *passwd)
{
/* If our protocol needs a password and we have none, use the defaults */
- if( (conn->handler->protocol & (PROT_FTP|PROT_IMAP)) &&
+ if( (conn->handler->protocol & (CURLPROTO_FTP|CURLPROTO_IMAP)) &&
!conn->bits.user_passwd) {
conn->user = strdup(CURL_DEFAULT_USER);
* file: is a special case in that it doesn't need a network connection
***********************************************************************/
#ifndef CURL_DISABLE_FILE
- if(conn->handler->protocol & PROT_FILE) {
+ if(conn->handler->protocol & CURLPROTO_FILE) {
bool done;
/* this is supposed to be the connect function so we better at least check
that the file is present here! */
Curl_pgrsTime(data, TIMER_NAMELOOKUP);
- if(conn->handler->protocol & PROT_FILE) {
+ if(conn->handler->protocol & CURLPROTO_FILE) {
/* There's nothing in this function to setup if we're only doing
a file:// transfer */
*protocol_done = TRUE;
CURLcode (*disconnect)(struct connectdata *, bool dead_connection);
long defport; /* Default port. */
- unsigned int protocol; /* PROT_* flags concerning the protocol set */
+ unsigned int protocol; /* See CURLPROTO_* */
unsigned int flags; /* Extra particular characteristics, see PROTOPT_* */
};
+#define PROTOPT_NONE 0 /* nothing extra */
+#define PROTOPT_SSL (1<<0) /* uses SSL */
+#define PROTOPT_DUAL (1<<1) /* this protocol uses two connections */
+#define PROTOPT_CLOSEACTION (1<<2) /* need action before socket close */
+/* some protocols will have to call the underlying functions without regard to
+ what exact state the socket signals. IE even if the socket says "readable",
+ the send function might need to be called while uploading, or vice versa.
+*/
+#define PROTOPT_DIRLOCK (1<<3)
+#define PROTOPT_BANPROXY (1<<4) /* not allowed to use proxy */
+
+
/* return the count of bytes sent, or -1 on error */
typedef ssize_t (Curl_send)(struct connectdata *conn, /* connection data */
int sockindex, /* socketindex */
long connectindex; /* what index in the connection cache connects index this
particular struct has */
-#define PROT_HTTP CURLPROTO_HTTP
-#define PROT_HTTPS CURLPROTO_HTTPS
-#define PROT_FTP CURLPROTO_FTP
-#define PROT_TELNET CURLPROTO_TELNET
-#define PROT_DICT CURLPROTO_DICT
-#define PROT_LDAP CURLPROTO_LDAP
-#define PROT_FILE CURLPROTO_FILE
-#define PROT_FTPS CURLPROTO_FTPS
-#define PROT_TFTP CURLPROTO_TFTP
-#define PROT_SCP CURLPROTO_SCP
-#define PROT_SFTP CURLPROTO_SFTP
-#define PROT_IMAP CURLPROTO_IMAP
-#define PROT_IMAPS CURLPROTO_IMAPS
-#define PROT_POP3 CURLPROTO_POP3
-#define PROT_POP3S CURLPROTO_POP3S
-#define PROT_SMTP CURLPROTO_SMTP
-#define PROT_SMTPS CURLPROTO_SMTPS
-#define PROT_RTSP CURLPROTO_RTSP
-#define PROT_RTMP CURLPROTO_RTMP
-#define PROT_RTMPT CURLPROTO_RTMPT
-#define PROT_RTMPE CURLPROTO_RTMPE
-#define PROT_RTMPTE CURLPROTO_RTMPTE
-#define PROT_RTMPS CURLPROTO_RTMPS
-#define PROT_RTMPTS CURLPROTO_RTMPTS
-#define PROT_GOPHER CURLPROTO_GOPHER
-
-#define PROT_ALL ~0
-
-#define PROTOPT_NONE 0 /* nothing extra */
-#define PROTOPT_SSL (1<<0) /* uses SSL */
-#define PROTOPT_DUAL (1<<1) /* this protocol uses two connections */
-#define PROTOPT_CLOSEACTION (1<<2) /* need action before socket close */
-/* some protocols will have to call the underlying functions without regard to
- what exact state the socket signals. IE even if the socket says "readable",
- the send function might need to be called while uploading, or vice versa.
-*/
-#define PROTOPT_DIRLOCK (1<<3)
-#define PROTOPT_BANPROXY (1<<4) /* not allowed to use proxy */
-
/* 'dns_entry' is the particular host we use. This points to an entry in the
DNS cache and it will not get pruned while locked. It gets unlocked in
Curl_done(). This entry will be NULL if the connection is re-used as then