2006-03-21 17:30:03 -05:00
|
|
|
.\" **************************************************************************
|
|
|
|
.\" * _ _ ____ _
|
|
|
|
.\" * Project ___| | | | _ \| |
|
|
|
|
.\" * / __| | | | |_) | |
|
|
|
|
.\" * | (__| |_| | _ <| |___
|
|
|
|
.\" * \___|\___/|_| \_\_____|
|
|
|
|
.\" *
|
2016-04-28 10:26:42 -04:00
|
|
|
.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2006-03-21 17:30:03 -05:00
|
|
|
.\" *
|
|
|
|
.\" * This software is licensed as described in the file COPYING, which
|
|
|
|
.\" * you should have received as part of this distribution. The terms
|
2016-02-02 18:19:02 -05:00
|
|
|
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
|
2006-03-21 17:30:03 -05:00
|
|
|
.\" *
|
|
|
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
.\" * copies of the Software, and permit persons to whom the Software is
|
|
|
|
.\" * furnished to do so, under the terms of the COPYING file.
|
|
|
|
.\" *
|
|
|
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
.\" * KIND, either express or implied.
|
|
|
|
.\" *
|
|
|
|
.\" **************************************************************************
|
2002-03-04 05:09:48 -05:00
|
|
|
.\"
|
2009-02-11 16:47:14 -05:00
|
|
|
.TH curl_easy_getinfo 3 "11 Feb 2009" "libcurl 7.19.4" "libcurl Manual"
|
2002-03-04 05:09:48 -05:00
|
|
|
.SH NAME
|
2003-11-04 08:27:28 -05:00
|
|
|
curl_easy_getinfo - extract information from a curl handle
|
2002-03-04 05:09:48 -05:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B #include <curl/curl.h>
|
2003-11-04 08:27:28 -05:00
|
|
|
|
|
|
|
.B "CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... );"
|
|
|
|
|
2002-03-04 05:09:48 -05:00
|
|
|
.SH DESCRIPTION
|
|
|
|
Request internal information from the curl session with this function. The
|
2004-12-14 17:47:13 -05:00
|
|
|
third argument \fBMUST\fP be a pointer to a long, a pointer to a char *, a
|
|
|
|
pointer to a struct curl_slist * or a pointer to a double (as this
|
|
|
|
documentation describes further down). The data pointed-to will be filled in
|
2005-08-18 02:14:17 -04:00
|
|
|
accordingly and can be relied upon only if the function returns CURLE_OK. Use
|
2015-08-15 17:56:28 -04:00
|
|
|
this function AFTER a performed transfer if you want to get transfer related
|
2005-08-18 02:14:17 -04:00
|
|
|
data.
|
2004-08-24 16:36:38 -04:00
|
|
|
|
|
|
|
You should not free the memory returned by this function unless it is
|
2007-05-03 15:12:45 -04:00
|
|
|
explicitly mentioned below.
|
2002-03-04 05:09:48 -05:00
|
|
|
.SH AVAILABLE INFORMATION
|
2004-03-24 16:40:45 -05:00
|
|
|
The following information can be extracted:
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_EFFECTIVE_URL
|
2015-09-25 02:37:42 -04:00
|
|
|
Last used URL.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_EFFECTIVE_URL(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_RESPONSE_CODE
|
2015-09-25 02:37:42 -04:00
|
|
|
Last received response code.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_RESPONSE_CODE(3)\fP
|
2004-12-22 07:31:55 -05:00
|
|
|
.IP CURLINFO_HTTP_CONNECTCODE
|
2015-09-25 02:37:42 -04:00
|
|
|
Last proxy CONNECT response code.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_HTTP_CONNECTCODE(3)\fP
|
2016-05-11 08:23:37 -04:00
|
|
|
.IP CURLINFO_HTTP_VERSION
|
|
|
|
The http version used in the connection.
|
|
|
|
See \fICURLINFO_HTTP_VERSION(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_FILETIME
|
2015-09-25 02:37:42 -04:00
|
|
|
Remote time of the retrieved document.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_FILETIME(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_TOTAL_TIME
|
2015-09-25 02:37:42 -04:00
|
|
|
Total time of previous transfer.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_TOTAL_TIME(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_NAMELOOKUP_TIME
|
2015-09-25 02:37:42 -04:00
|
|
|
Time from start until name resolving completed.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_NAMELOOKUP_TIME(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_CONNECT_TIME
|
2015-09-25 02:37:42 -04:00
|
|
|
Time from start until remote host or proxy completed.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_CONNECT_TIME(3)\fP
|
2008-07-03 02:56:03 -04:00
|
|
|
.IP CURLINFO_APPCONNECT_TIME
|
2015-09-25 02:37:42 -04:00
|
|
|
Time from start until SSL/SSH handshake completed.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_APPCONNECT_TIME(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_PRETRANSFER_TIME
|
2015-09-25 02:37:42 -04:00
|
|
|
Time from start until just before the transfer begins.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_PRETRANSFER_TIME(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_STARTTRANSFER_TIME
|
2015-09-25 02:37:42 -04:00
|
|
|
Time from start until just when the first byte is received.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_STARTTRANSFER_TIME(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_REDIRECT_TIME
|
2015-09-25 02:37:42 -04:00
|
|
|
Time taken for all redirect steps before the final transfer.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_REDIRECT_TIME(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_REDIRECT_COUNT
|
2015-09-25 02:37:42 -04:00
|
|
|
Total number of redirects that were followed.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_REDIRECT_COUNT(3)\fP
|
2008-04-30 17:20:08 -04:00
|
|
|
.IP CURLINFO_REDIRECT_URL
|
2015-09-25 02:37:42 -04:00
|
|
|
URL a redirect would take you to, had you enabled redirects.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_REDIRECT_URL(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_SIZE_UPLOAD
|
2015-09-25 02:37:42 -04:00
|
|
|
Number of bytes uploaded.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_SIZE_UPLOAD(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_SIZE_DOWNLOAD
|
2015-09-25 02:37:42 -04:00
|
|
|
Number of bytes downloaded.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_SIZE_DOWNLOAD(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_SPEED_DOWNLOAD
|
2015-09-25 02:37:42 -04:00
|
|
|
Average download speed.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_SPEED_DOWNLOAD(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_SPEED_UPLOAD
|
2015-09-25 02:37:42 -04:00
|
|
|
Average upload speed.
|
2015-08-31 09:27:58 -04:00
|
|
|
See \fICURLINFO_SPEED_UPLOAD(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_HEADER_SIZE
|
2015-09-25 02:37:42 -04:00
|
|
|
Number of bytes of all headers received.
|
2015-09-01 18:00:53 -04:00
|
|
|
See \fICURLINFO_HEADER_SIZE(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_REQUEST_SIZE
|
2015-09-25 02:37:42 -04:00
|
|
|
Number of bytes sent in the issued HTTP requests.
|
2015-09-01 18:00:53 -04:00
|
|
|
See \fICURLINFO_REQUEST_SIZE(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_SSL_VERIFYRESULT
|
2015-09-25 02:37:42 -04:00
|
|
|
Certificate verification result.
|
2015-09-01 18:00:53 -04:00
|
|
|
See \fICURLINFO_SSL_VERIFYRESULT(3)\fP
|
2016-11-16 12:49:15 -05:00
|
|
|
.IP CURLINFO_PROXY_SSL_VERIFYRESULT
|
|
|
|
Proxy certificate verification result.
|
|
|
|
See \fICURLINFO_PROXY_SSL_VERIFYRESULT(3)\fP
|
2004-12-13 15:14:04 -05:00
|
|
|
.IP CURLINFO_SSL_ENGINES
|
2015-09-25 02:37:42 -04:00
|
|
|
A list of OpenSSL crypto engines.
|
2015-09-01 18:00:53 -04:00
|
|
|
See \fICURLINFO_SSL_ENGINES(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_CONTENT_LENGTH_DOWNLOAD
|
2015-09-25 02:37:42 -04:00
|
|
|
Content length from the Content-Length header.
|
2015-09-01 18:00:53 -04:00
|
|
|
See \fICURLINFO_CONTENT_LENGTH_DOWNLOAD(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_CONTENT_LENGTH_UPLOAD
|
2015-09-25 02:37:42 -04:00
|
|
|
Upload size.
|
2015-09-01 18:00:53 -04:00
|
|
|
See \fICURLINFO_CONTENT_LENGTH_UPLOAD(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_CONTENT_TYPE
|
2015-09-25 02:37:42 -04:00
|
|
|
Content type from the Content-Type header.
|
2015-09-01 18:00:53 -04:00
|
|
|
See \fICURLINFO_CONTENT_TYPE(3)\fP
|
2003-11-04 08:27:28 -05:00
|
|
|
.IP CURLINFO_PRIVATE
|
2015-09-25 02:37:42 -04:00
|
|
|
User's private data pointer.
|
2015-09-01 18:00:53 -04:00
|
|
|
See \fICURLINFO_PRIVATE(3)\fP
|
2003-12-18 08:33:14 -05:00
|
|
|
.IP CURLINFO_HTTPAUTH_AVAIL
|
2015-09-25 02:37:42 -04:00
|
|
|
Available HTTP authentication methods.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_HTTPAUTH_AVAIL(3)\fP
|
2003-12-18 08:33:14 -05:00
|
|
|
.IP CURLINFO_PROXYAUTH_AVAIL
|
2015-09-25 02:37:42 -04:00
|
|
|
Available HTTP proxy authentication methods.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_PROXYAUTH_AVAIL(3)\fP
|
2004-09-30 17:01:23 -04:00
|
|
|
.IP CURLINFO_OS_ERRNO
|
2015-09-25 02:37:42 -04:00
|
|
|
The errno from the last failure to connect.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_OS_ERRNO(3)\fP
|
2004-10-19 11:30:08 -04:00
|
|
|
.IP CURLINFO_NUM_CONNECTS
|
2015-09-25 02:37:42 -04:00
|
|
|
Number of new successful connections used for previous transfer.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_NUM_CONNECTS(3)\fP
|
2008-06-06 13:33:35 -04:00
|
|
|
.IP CURLINFO_PRIMARY_IP
|
2015-09-25 02:37:42 -04:00
|
|
|
IP address of the last connection.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_PRIMARY_IP(3)\fP
|
2010-06-04 18:29:09 -04:00
|
|
|
.IP CURLINFO_PRIMARY_PORT
|
2015-09-25 02:37:42 -04:00
|
|
|
Port of the last connection.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_PRIMARY_PORT(3)\fP
|
2010-06-04 18:29:09 -04:00
|
|
|
.IP CURLINFO_LOCAL_IP
|
2015-09-25 02:37:42 -04:00
|
|
|
Local-end IP address of last connection.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_LOCAL_IP(3)\fP
|
2010-06-04 18:29:09 -04:00
|
|
|
.IP CURLINFO_LOCAL_PORT
|
2015-09-25 02:37:42 -04:00
|
|
|
Local-end port of last connection.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_LOCAL_PORT(3)\fP
|
2005-07-27 18:17:14 -04:00
|
|
|
.IP CURLINFO_COOKIELIST
|
2015-09-25 02:37:42 -04:00
|
|
|
List of all known cookies.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_COOKIELIST(3)\fP
|
2006-02-11 17:35:16 -05:00
|
|
|
.IP CURLINFO_LASTSOCKET
|
2015-09-25 02:37:42 -04:00
|
|
|
Last socket used.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_LASTSOCKET(3)\fP
|
2015-08-21 04:29:05 -04:00
|
|
|
.IP CURLINFO_ACTIVESOCKET
|
2015-09-25 02:37:42 -04:00
|
|
|
The session's active socket.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_ACTIVESOCKET(3)\fP
|
2006-03-21 17:30:03 -05:00
|
|
|
.IP CURLINFO_FTP_ENTRY_PATH
|
2015-09-25 02:37:42 -04:00
|
|
|
The entry path after logging in to an FTP server.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_FTP_ENTRY_PATH(3)\fP
|
2008-10-16 07:35:19 -04:00
|
|
|
.IP CURLINFO_CERTINFO
|
2015-09-25 02:37:42 -04:00
|
|
|
Certificate chain.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_CERTINFO(3)\fP
|
2016-02-23 19:03:03 -05:00
|
|
|
.IP CURLINFO_TLS_SSL_PTR
|
2015-09-25 02:37:42 -04:00
|
|
|
TLS session info that can be used for further processing.
|
2016-02-23 19:03:03 -05:00
|
|
|
See \fICURLINFO_TLS_SSL_PTR(3)\fP
|
2016-04-28 10:26:42 -04:00
|
|
|
.IP CURLINFO_TLS_SESSION
|
|
|
|
TLS session info that can be used for further processing. See
|
|
|
|
\fICURLINFO_TLS_SESSION(3)\fP. Deprecated option, use
|
|
|
|
\fICURLINFO_TLS_SSL_PTR(3)\fP instead!
|
2009-02-11 16:47:14 -05:00
|
|
|
.IP CURLINFO_CONDITION_UNMET
|
2015-09-25 02:37:42 -04:00
|
|
|
Whether or not a time conditional was met.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_CONDITION_UNMET(3)\fP
|
2010-01-21 08:58:30 -05:00
|
|
|
.IP CURLINFO_RTSP_SESSION_ID
|
2015-09-25 02:37:42 -04:00
|
|
|
RTSP session ID.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_RTSP_SESSION_ID(3)\fP
|
2010-01-21 08:58:30 -05:00
|
|
|
.IP CURLINFO_RTSP_CLIENT_CSEQ
|
2015-09-25 02:37:42 -04:00
|
|
|
RTSP CSeq that will next be used.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_RTSP_CLIENT_CSEQ(3)\fP
|
2010-01-21 08:58:30 -05:00
|
|
|
.IP CURLINFO_RTSP_SERVER_CSEQ
|
2015-09-25 02:37:42 -04:00
|
|
|
RTSP CSeq that will next be expected.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_RTSP_SERVER_CSEQ(3)\fP
|
2010-01-21 08:58:30 -05:00
|
|
|
.IP CURLINFO_RTSP_CSEQ_RECV
|
2015-09-25 02:37:42 -04:00
|
|
|
RTSP CSeq last received.
|
2015-09-12 17:13:08 -04:00
|
|
|
See \fICURLINFO_RTSP_CSEQ_RECV(3)\fP
|
2005-10-06 04:58:44 -04:00
|
|
|
.SH TIMES
|
2009-05-07 05:31:24 -04:00
|
|
|
.nf
|
2005-10-06 04:58:44 -04:00
|
|
|
An overview of the six time values available from curl_easy_getinfo()
|
|
|
|
|
2006-03-13 14:44:36 -05:00
|
|
|
curl_easy_perform()
|
2005-10-06 04:58:44 -04:00
|
|
|
|
|
2008-07-03 02:56:03 -04:00
|
|
|
|--NAMELOOKUP
|
|
|
|
|--|--CONNECT
|
|
|
|
|--|--|--APPCONNECT
|
|
|
|
|--|--|--|--PRETRANSFER
|
|
|
|
|--|--|--|--|--STARTTRANSFER
|
|
|
|
|--|--|--|--|--|--TOTAL
|
|
|
|
|--|--|--|--|--|--REDIRECT
|
2009-05-07 05:31:24 -04:00
|
|
|
.fi
|
2008-07-03 02:56:03 -04:00
|
|
|
.IP NAMELOOKUP
|
2005-10-06 05:03:36 -04:00
|
|
|
\fICURLINFO_NAMELOOKUP_TIME\fP. The time it took from the start until the name
|
2005-10-06 04:58:44 -04:00
|
|
|
resolving was completed.
|
2008-07-03 02:56:03 -04:00
|
|
|
.IP CONNECT
|
2005-10-06 05:03:36 -04:00
|
|
|
\fICURLINFO_CONNECT_TIME\fP. The time it took from the start until the connect
|
|
|
|
to the remote host (or proxy) was completed.
|
2008-07-03 02:56:03 -04:00
|
|
|
.IP APPCONNECT
|
|
|
|
\fICURLINFO_APPCONNECT_TIME\fP. The time it took from the start until the SSL
|
|
|
|
connect/handshake with the remote host was completed. (Added in in 7.19.0)
|
|
|
|
.IP PRETRANSFER
|
2005-10-06 05:03:36 -04:00
|
|
|
\fICURLINFO_PRETRANSFER_TIME\fP. The time it took from the start until the
|
|
|
|
file transfer is just about to begin. This includes all pre-transfer commands
|
|
|
|
and negotiations that are specific to the particular protocol(s) involved.
|
2008-07-03 02:56:03 -04:00
|
|
|
.IP STARTTRANSFER
|
2005-10-06 05:03:36 -04:00
|
|
|
\fICURLINFO_STARTTRANSFER_TIME\fP. The time it took from the start until the
|
2011-05-03 16:47:56 -04:00
|
|
|
first byte is received by libcurl.
|
2008-07-03 02:56:03 -04:00
|
|
|
.IP TOTAL
|
2006-06-08 07:06:26 -04:00
|
|
|
\fICURLINFO_TOTAL_TIME\fP. Total time of the previous request.
|
2008-07-03 02:56:03 -04:00
|
|
|
.IP REDIRECT
|
2005-10-06 05:03:36 -04:00
|
|
|
\fICURLINFO_REDIRECT_TIME\fP. The time it took for all redirection steps
|
|
|
|
include name lookup, connect, pretransfer and transfer before final
|
|
|
|
transaction was started. So, this is zero if no redirection took place.
|
2002-03-04 05:09:48 -05:00
|
|
|
.SH RETURN VALUE
|
|
|
|
If the operation was successful, CURLE_OK is returned. Otherwise an
|
|
|
|
appropriate error code will be returned.
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR curl_easy_setopt "(3)"
|