libcurl: updated to 7.49.1
[tomato.git] / release / src / router / libcurl / docs / libcurl / curl_easy_getinfo.3
blob2b4c7fe5311d1b29da11abfa57ccf9b7bf2cd3d4
1 .\" **************************************************************************
2 .\" *                                  _   _ ____  _
3 .\" *  Project                     ___| | | |  _ \| |
4 .\" *                             / __| | | | |_) | |
5 .\" *                            | (__| |_| |  _ <| |___
6 .\" *                             \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
9 .\" *
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at https://curl.haxx.se/docs/copyright.html.
13 .\" *
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
17 .\" *
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
20 .\" *
21 .\" **************************************************************************
22 .\"
23 .TH curl_easy_getinfo 3 "11 Feb 2009" "libcurl 7.19.4" "libcurl Manual"
24 .SH NAME
25 curl_easy_getinfo - extract information from a curl handle
26 .SH SYNOPSIS
27 .B #include <curl/curl.h>
29 .B "CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... );"
31 .SH DESCRIPTION
32 Request internal information from the curl session with this function.  The
33 third argument \fBMUST\fP be a pointer to a long, a pointer to a char *, a
34 pointer to a struct curl_slist * or a pointer to a double (as this
35 documentation describes further down).  The data pointed-to will be filled in
36 accordingly and can be relied upon only if the function returns CURLE_OK.  Use
37 this function AFTER a performed transfer if you want to get transfer related
38 data.
40 You should not free the memory returned by this function unless it is
41 explicitly mentioned below.
42 .SH AVAILABLE INFORMATION
43 The following information can be extracted:
44 .IP CURLINFO_EFFECTIVE_URL
45 Last used URL.
46 See \fICURLINFO_EFFECTIVE_URL(3)\fP
47 .IP CURLINFO_RESPONSE_CODE
48 Last received response code.
49 See \fICURLINFO_RESPONSE_CODE(3)\fP
50 .IP CURLINFO_HTTP_CONNECTCODE
51 Last proxy CONNECT response code.
52 See \fICURLINFO_HTTP_CONNECTCODE(3)\fP
53 .IP CURLINFO_FILETIME
54 Remote time of the retrieved document.
55 See \fICURLINFO_FILETIME(3)\fP
56 .IP CURLINFO_TOTAL_TIME
57 Total time of previous transfer.
58 See \fICURLINFO_TOTAL_TIME(3)\fP
59 .IP CURLINFO_NAMELOOKUP_TIME
60 Time from start until name resolving completed.
61 See \fICURLINFO_NAMELOOKUP_TIME(3)\fP
62 .IP CURLINFO_CONNECT_TIME
63 Time from start until remote host or proxy completed.
64 See \fICURLINFO_CONNECT_TIME(3)\fP
65 .IP CURLINFO_APPCONNECT_TIME
66 Time from start until SSL/SSH handshake completed.
67 See \fICURLINFO_APPCONNECT_TIME(3)\fP
68 .IP CURLINFO_PRETRANSFER_TIME
69 Time from start until just before the transfer begins.
70 See \fICURLINFO_PRETRANSFER_TIME(3)\fP
71 .IP CURLINFO_STARTTRANSFER_TIME
72 Time from start until just when the first byte is received.
73 See \fICURLINFO_STARTTRANSFER_TIME(3)\fP
74 .IP CURLINFO_REDIRECT_TIME
75 Time taken for all redirect steps before the final transfer.
76 See \fICURLINFO_REDIRECT_TIME(3)\fP
77 .IP CURLINFO_REDIRECT_COUNT
78 Total number of redirects that were followed.
79 See \fICURLINFO_REDIRECT_COUNT(3)\fP
80 .IP CURLINFO_REDIRECT_URL
81 URL a redirect would take you to, had you enabled redirects.
82 See \fICURLINFO_REDIRECT_URL(3)\fP
83 .IP CURLINFO_SIZE_UPLOAD
84 Number of bytes uploaded.
85 See \fICURLINFO_SIZE_UPLOAD(3)\fP
86 .IP CURLINFO_SIZE_DOWNLOAD
87 Number of bytes downloaded.
88 See \fICURLINFO_SIZE_DOWNLOAD(3)\fP
89 .IP CURLINFO_SPEED_DOWNLOAD
90 Average download speed.
91 See \fICURLINFO_SPEED_DOWNLOAD(3)\fP
92 .IP CURLINFO_SPEED_UPLOAD
93 Average upload speed.
94 See \fICURLINFO_SPEED_UPLOAD(3)\fP
95 .IP CURLINFO_HEADER_SIZE
96 Number of bytes of all headers received.
97 See \fICURLINFO_HEADER_SIZE(3)\fP
98 .IP CURLINFO_REQUEST_SIZE
99 Number of bytes sent in the issued HTTP requests.
100 See \fICURLINFO_REQUEST_SIZE(3)\fP
101 .IP CURLINFO_SSL_VERIFYRESULT
102 Certificate verification result.
103 See \fICURLINFO_SSL_VERIFYRESULT(3)\fP
104 .IP CURLINFO_SSL_ENGINES
105 A list of OpenSSL crypto engines.
106 See \fICURLINFO_SSL_ENGINES(3)\fP
107 .IP CURLINFO_CONTENT_LENGTH_DOWNLOAD
108 Content length from the Content-Length header.
109 See \fICURLINFO_CONTENT_LENGTH_DOWNLOAD(3)\fP
110 .IP CURLINFO_CONTENT_LENGTH_UPLOAD
111 Upload size.
112 See \fICURLINFO_CONTENT_LENGTH_UPLOAD(3)\fP
113 .IP CURLINFO_CONTENT_TYPE
114 Content type from the Content-Type header.
115 See \fICURLINFO_CONTENT_TYPE(3)\fP
116 .IP CURLINFO_PRIVATE
117 User's private data pointer.
118 See \fICURLINFO_PRIVATE(3)\fP
119 .IP CURLINFO_HTTPAUTH_AVAIL
120 Available HTTP authentication methods.
121 See \fICURLINFO_HTTPAUTH_AVAIL(3)\fP
122 .IP CURLINFO_PROXYAUTH_AVAIL
123 Available HTTP proxy authentication methods.
124 See \fICURLINFO_PROXYAUTH_AVAIL(3)\fP
125 .IP CURLINFO_OS_ERRNO
126 The errno from the last failure to connect.
127 See \fICURLINFO_OS_ERRNO(3)\fP
128 .IP CURLINFO_NUM_CONNECTS
129 Number of new successful connections used for previous transfer.
130 See \fICURLINFO_NUM_CONNECTS(3)\fP
131 .IP CURLINFO_PRIMARY_IP
132 IP address of the last connection.
133 See \fICURLINFO_PRIMARY_IP(3)\fP
134 .IP CURLINFO_PRIMARY_PORT
135 Port of the last connection.
136 See \fICURLINFO_PRIMARY_PORT(3)\fP
137 .IP CURLINFO_LOCAL_IP
138 Local-end IP address of last connection.
139 See \fICURLINFO_LOCAL_IP(3)\fP
140 .IP CURLINFO_LOCAL_PORT
141 Local-end port of last connection.
142 See \fICURLINFO_LOCAL_PORT(3)\fP
143 .IP CURLINFO_COOKIELIST
144 List of all known cookies.
145 See \fICURLINFO_COOKIELIST(3)\fP
146 .IP CURLINFO_LASTSOCKET
147 Last socket used.
148 See \fICURLINFO_LASTSOCKET(3)\fP
149 .IP CURLINFO_ACTIVESOCKET
150 The session's active socket.
151 See \fICURLINFO_ACTIVESOCKET(3)\fP
152 .IP CURLINFO_FTP_ENTRY_PATH
153 The entry path after logging in to an FTP server.
154 See \fICURLINFO_FTP_ENTRY_PATH(3)\fP
155 .IP CURLINFO_CERTINFO
156 Certificate chain.
157 See \fICURLINFO_CERTINFO(3)\fP
158 .IP CURLINFO_TLS_SSL_PTR
159 TLS session info that can be used for further processing.
160 See \fICURLINFO_TLS_SSL_PTR(3)\fP
161 .IP CURLINFO_TLS_SESSION
162 TLS session info that can be used for further processing.  See
163 \fICURLINFO_TLS_SESSION(3)\fP. Deprecated option, use
164 \fICURLINFO_TLS_SSL_PTR(3)\fP instead!
165 .IP CURLINFO_CONDITION_UNMET
166 Whether or not a time conditional was met.
167 See \fICURLINFO_CONDITION_UNMET(3)\fP
168 .IP CURLINFO_RTSP_SESSION_ID
169 RTSP session ID.
170 See \fICURLINFO_RTSP_SESSION_ID(3)\fP
171 .IP CURLINFO_RTSP_CLIENT_CSEQ
172 RTSP CSeq that will next be used.
173 See \fICURLINFO_RTSP_CLIENT_CSEQ(3)\fP
174 .IP CURLINFO_RTSP_SERVER_CSEQ
175 RTSP CSeq that will next be expected.
176 See \fICURLINFO_RTSP_SERVER_CSEQ(3)\fP
177 .IP CURLINFO_RTSP_CSEQ_RECV
178 RTSP CSeq last received.
179 See \fICURLINFO_RTSP_CSEQ_RECV(3)\fP
180 .SH TIMES
182 An overview of the six time values available from curl_easy_getinfo()
184 curl_easy_perform()
185     |
186     |--NAMELOOKUP
187     |--|--CONNECT
188     |--|--|--APPCONNECT
189     |--|--|--|--PRETRANSFER
190     |--|--|--|--|--STARTTRANSFER
191     |--|--|--|--|--|--TOTAL
192     |--|--|--|--|--|--REDIRECT
194 .IP NAMELOOKUP
195 \fICURLINFO_NAMELOOKUP_TIME\fP. The time it took from the start until the name
196 resolving was completed.
197 .IP CONNECT
198 \fICURLINFO_CONNECT_TIME\fP. The time it took from the start until the connect
199 to the remote host (or proxy) was completed.
200 .IP APPCONNECT
201 \fICURLINFO_APPCONNECT_TIME\fP. The time it took from the start until the SSL
202 connect/handshake with the remote host was completed. (Added in in 7.19.0)
203 .IP PRETRANSFER
204 \fICURLINFO_PRETRANSFER_TIME\fP. The time it took from the start until the
205 file transfer is just about to begin. This includes all pre-transfer commands
206 and negotiations that are specific to the particular protocol(s) involved.
207 .IP STARTTRANSFER
208 \fICURLINFO_STARTTRANSFER_TIME\fP. The time it took from the start until the
209 first byte is received by libcurl.
210 .IP TOTAL
211 \fICURLINFO_TOTAL_TIME\fP. Total time of the previous request.
212 .IP REDIRECT
213 \fICURLINFO_REDIRECT_TIME\fP. The time it took for all redirection steps
214 include name lookup, connect, pretransfer and transfer before final
215 transaction was started. So, this is zero if no redirection took place.
216 .SH RETURN VALUE
217 If the operation was successful, CURLE_OK is returned. Otherwise an
218 appropriate error code will be returned.
219 .SH "SEE ALSO"
220 .BR curl_easy_setopt "(3)"