Annotation of embedaddon/curl/docs/libcurl/curl_easy_getinfo.3, revision 1.1.1.1
1.1 misho 1: .\" **************************************************************************
2: .\" * _ _ ____ _
3: .\" * Project ___| | | | _ \| |
4: .\" * / __| | | | |_) | |
5: .\" * | (__| |_| | _ <| |___
6: .\" * \___|\___/|_| \_\_____|
7: .\" *
8: .\" * Copyright (C) 1998 - 2020, 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 "April 06, 2020" "libcurl 7.70.0" "libcurl Manual"
24:
25: .SH NAME
26: curl_easy_getinfo - extract information from a curl handle
27: .SH SYNOPSIS
28: .B #include <curl/curl.h>
29:
30: .B "CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... );"
31:
32: .SH DESCRIPTION
33: Request internal information from the curl session with this function. The
34: third argument \fBMUST\fP be a pointer to a long, a pointer to a char *, a
35: pointer to a struct curl_slist * or a pointer to a double (as this
36: documentation describes further down). The data pointed-to will be filled in
37: accordingly and can be relied upon only if the function returns CURLE_OK. Use
38: this function AFTER a performed transfer if you want to get transfer related
39: data.
40:
41: You should not free the memory returned by this function unless it is
42: explicitly mentioned below.
43: .SH AVAILABLE INFORMATION
44: The following information can be extracted:
45: .IP CURLINFO_EFFECTIVE_URL
46: Last used URL.
47: See \fICURLINFO_EFFECTIVE_URL(3)\fP
48: .IP CURLINFO_RESPONSE_CODE
49: Last received response code.
50: See \fICURLINFO_RESPONSE_CODE(3)\fP
51: .IP CURLINFO_HTTP_CONNECTCODE
52: Last proxy CONNECT response code.
53: See \fICURLINFO_HTTP_CONNECTCODE(3)\fP
54: .IP CURLINFO_HTTP_VERSION
55: The http version used in the connection.
56: See \fICURLINFO_HTTP_VERSION(3)\fP
57: .IP CURLINFO_FILETIME
58: Remote time of the retrieved document. See \fICURLINFO_FILETIME(3)\fP
59: .IP CURLINFO_FILETIME_T
60: Remote time of the retrieved document. See \fICURLINFO_FILETIME_T(3)\fP
61: .IP CURLINFO_TOTAL_TIME
62: Total time of previous transfer.
63: See \fICURLINFO_TOTAL_TIME(3)\fP
64: .IP CURLINFO_TOTAL_TIME_T
65: Total time of previous transfer.
66: See \fICURLINFO_TOTAL_TIME_T(3)\fP
67: .IP CURLINFO_NAMELOOKUP_TIME
68: Time from start until name resolving completed.
69: See \fICURLINFO_NAMELOOKUP_TIME(3)\fP
70: .IP CURLINFO_NAMELOOKUP_TIME_T
71: Time from start until name resolving completed.
72: See \fICURLINFO_NAMELOOKUP_TIME_T(3)\fP
73: .IP CURLINFO_CONNECT_TIME
74: Time from start until remote host or proxy completed.
75: See \fICURLINFO_CONNECT_TIME(3)\fP
76: .IP CURLINFO_CONNECT_TIME_T
77: Time from start until remote host or proxy completed.
78: See \fICURLINFO_CONNECT_TIME_T(3)\fP
79: .IP CURLINFO_APPCONNECT_TIME
80: Time from start until SSL/SSH handshake completed.
81: See \fICURLINFO_APPCONNECT_TIME(3)\fP
82: .IP CURLINFO_APPCONNECT_TIME_T
83: Time from start until SSL/SSH handshake completed.
84: See \fICURLINFO_APPCONNECT_TIME_T(3)\fP
85: .IP CURLINFO_PRETRANSFER_TIME
86: Time from start until just before the transfer begins.
87: See \fICURLINFO_PRETRANSFER_TIME(3)\fP
88: .IP CURLINFO_PRETRANSFER_TIME_T
89: Time from start until just before the transfer begins.
90: See \fICURLINFO_PRETRANSFER_TIME_T(3)\fP
91: .IP CURLINFO_STARTTRANSFER_TIME
92: Time from start until just when the first byte is received.
93: See \fICURLINFO_STARTTRANSFER_TIME(3)\fP
94: .IP CURLINFO_STARTTRANSFER_TIME_T
95: Time from start until just when the first byte is received.
96: See \fICURLINFO_STARTTRANSFER_TIME_T(3)\fP
97: .IP CURLINFO_REDIRECT_TIME
98: Time taken for all redirect steps before the final transfer.
99: See \fICURLINFO_REDIRECT_TIME(3)\fP
100: .IP CURLINFO_REDIRECT_TIME_T
101: Time taken for all redirect steps before the final transfer.
102: See \fICURLINFO_REDIRECT_TIME_T(3)\fP
103: .IP CURLINFO_REDIRECT_COUNT
104: Total number of redirects that were followed.
105: See \fICURLINFO_REDIRECT_COUNT(3)\fP
106: .IP CURLINFO_REDIRECT_URL
107: URL a redirect would take you to, had you enabled redirects.
108: See \fICURLINFO_REDIRECT_URL(3)\fP
109: .IP CURLINFO_SIZE_UPLOAD
110: (Deprecated) Number of bytes uploaded.
111: See \fICURLINFO_SIZE_UPLOAD(3)\fP
112: .IP CURLINFO_SIZE_UPLOAD_T
113: Number of bytes uploaded.
114: See \fICURLINFO_SIZE_UPLOAD_T(3)\fP
115: .IP CURLINFO_SIZE_DOWNLOAD
116: (Deprecated) Number of bytes downloaded.
117: See \fICURLINFO_SIZE_DOWNLOAD(3)\fP
118: .IP CURLINFO_SIZE_DOWNLOAD_T
119: Number of bytes downloaded.
120: See \fICURLINFO_SIZE_DOWNLOAD_T(3)\fP
121: .IP CURLINFO_SPEED_DOWNLOAD
122: (Deprecated) Average download speed.
123: See \fICURLINFO_SPEED_DOWNLOAD(3)\fP
124: .IP CURLINFO_SPEED_DOWNLOAD_T
125: Average download speed.
126: See \fICURLINFO_SPEED_DOWNLOAD_T(3)\fP
127: .IP CURLINFO_SPEED_UPLOAD
128: (Deprecated) Average upload speed.
129: See \fICURLINFO_SPEED_UPLOAD(3)\fP
130: .IP CURLINFO_SPEED_UPLOAD_T
131: Average upload speed.
132: See \fICURLINFO_SPEED_UPLOAD_T(3)\fP
133: .IP CURLINFO_HEADER_SIZE
134: Number of bytes of all headers received.
135: See \fICURLINFO_HEADER_SIZE(3)\fP
136: .IP CURLINFO_REQUEST_SIZE
137: Number of bytes sent in the issued HTTP requests.
138: See \fICURLINFO_REQUEST_SIZE(3)\fP
139: .IP CURLINFO_SSL_VERIFYRESULT
140: Certificate verification result.
141: See \fICURLINFO_SSL_VERIFYRESULT(3)\fP
142: .IP CURLINFO_PROXY_SSL_VERIFYRESULT
143: Proxy certificate verification result.
144: See \fICURLINFO_PROXY_SSL_VERIFYRESULT(3)\fP
145: .IP CURLINFO_SSL_ENGINES
146: A list of OpenSSL crypto engines.
147: See \fICURLINFO_SSL_ENGINES(3)\fP
148: .IP CURLINFO_CONTENT_LENGTH_DOWNLOAD
149: (Deprecated) Content length from the Content-Length header.
150: See \fICURLINFO_CONTENT_LENGTH_DOWNLOAD(3)\fP
151: .IP CURLINFO_CONTENT_LENGTH_DOWNLOAD_T
152: Content length from the Content-Length header.
153: See \fICURLINFO_CONTENT_LENGTH_DOWNLOAD_T(3)\fP
154: .IP CURLINFO_CONTENT_LENGTH_UPLOAD
155: (Deprecated) Upload size. See \fICURLINFO_CONTENT_LENGTH_UPLOAD(3)\fP
156: .IP CURLINFO_CONTENT_LENGTH_UPLOAD_T
157: Upload size. See \fICURLINFO_CONTENT_LENGTH_UPLOAD_T(3)\fP
158: .IP CURLINFO_CONTENT_TYPE
159: Content type from the Content-Type header.
160: See \fICURLINFO_CONTENT_TYPE(3)\fP
161: .IP CURLINFO_RETRY_AFTER
162: The value from the from the Retry-After header.
163: See \fICURLINFO_RETRY_AFTER(3)\fP
164: .IP CURLINFO_PRIVATE
165: User's private data pointer.
166: See \fICURLINFO_PRIVATE(3)\fP
167: .IP CURLINFO_HTTPAUTH_AVAIL
168: Available HTTP authentication methods.
169: See \fICURLINFO_HTTPAUTH_AVAIL(3)\fP
170: .IP CURLINFO_PROXYAUTH_AVAIL
171: Available HTTP proxy authentication methods.
172: See \fICURLINFO_PROXYAUTH_AVAIL(3)\fP
173: .IP CURLINFO_OS_ERRNO
174: The errno from the last failure to connect.
175: See \fICURLINFO_OS_ERRNO(3)\fP
176: .IP CURLINFO_NUM_CONNECTS
177: Number of new successful connections used for previous transfer.
178: See \fICURLINFO_NUM_CONNECTS(3)\fP
179: .IP CURLINFO_PRIMARY_IP
180: IP address of the last connection.
181: See \fICURLINFO_PRIMARY_IP(3)\fP
182: .IP CURLINFO_PRIMARY_PORT
183: Port of the last connection.
184: See \fICURLINFO_PRIMARY_PORT(3)\fP
185: .IP CURLINFO_LOCAL_IP
186: Local-end IP address of last connection.
187: See \fICURLINFO_LOCAL_IP(3)\fP
188: .IP CURLINFO_LOCAL_PORT
189: Local-end port of last connection.
190: See \fICURLINFO_LOCAL_PORT(3)\fP
191: .IP CURLINFO_COOKIELIST
192: List of all known cookies.
193: See \fICURLINFO_COOKIELIST(3)\fP
194: .IP CURLINFO_LASTSOCKET
195: Last socket used.
196: See \fICURLINFO_LASTSOCKET(3)\fP
197: .IP CURLINFO_ACTIVESOCKET
198: The session's active socket.
199: See \fICURLINFO_ACTIVESOCKET(3)\fP
200: .IP CURLINFO_FTP_ENTRY_PATH
201: The entry path after logging in to an FTP server.
202: See \fICURLINFO_FTP_ENTRY_PATH(3)\fP
203: .IP CURLINFO_CERTINFO
204: Certificate chain.
205: See \fICURLINFO_CERTINFO(3)\fP
206: .IP CURLINFO_TLS_SSL_PTR
207: TLS session info that can be used for further processing.
208: See \fICURLINFO_TLS_SSL_PTR(3)\fP
209: .IP CURLINFO_TLS_SESSION
210: TLS session info that can be used for further processing. See
211: \fICURLINFO_TLS_SESSION(3)\fP. Deprecated option, use
212: \fICURLINFO_TLS_SSL_PTR(3)\fP instead!
213: .IP CURLINFO_CONDITION_UNMET
214: Whether or not a time conditional was met or 304 HTTP response.
215: See \fICURLINFO_CONDITION_UNMET(3)\fP
216: .IP CURLINFO_RTSP_SESSION_ID
217: RTSP session ID.
218: See \fICURLINFO_RTSP_SESSION_ID(3)\fP
219: .IP CURLINFO_RTSP_CLIENT_CSEQ
220: RTSP CSeq that will next be used.
221: See \fICURLINFO_RTSP_CLIENT_CSEQ(3)\fP
222: .IP CURLINFO_RTSP_SERVER_CSEQ
223: RTSP CSeq that will next be expected.
224: See \fICURLINFO_RTSP_SERVER_CSEQ(3)\fP
225: .IP CURLINFO_RTSP_CSEQ_RECV
226: RTSP CSeq last received.
227: See \fICURLINFO_RTSP_CSEQ_RECV(3)\fP
228: .IP CURLINFO_PROTOCOL
229: The protocol used for the connection. (Added in 7.52.0)
230: See \fICURLINFO_PROTOCOL(3)\fP
231: .IP CURLINFO_SCHEME
232: The scheme used for the connection. (Added in 7.52.0)
233: See \fICURLINFO_SCHEME(3)\fP
234: .SH TIMES
235: .nf
236: An overview of the six time values available from curl_easy_getinfo()
237:
238: curl_easy_perform()
239: |
240: |--NAMELOOKUP
241: |--|--CONNECT
242: |--|--|--APPCONNECT
243: |--|--|--|--PRETRANSFER
244: |--|--|--|--|--STARTTRANSFER
245: |--|--|--|--|--|--TOTAL
246: |--|--|--|--|--|--REDIRECT
247: .fi
248: .IP NAMELOOKUP
249: \fICURLINFO_NAMELOOKUP_TIME\fP and \fICURLINFO_NAMELOOKUP_TIME_T\fP.
250: The time it took from the start until the name resolving was completed.
251: .IP CONNECT
252: \fICURLINFO_CONNECT_TIME\fP and \fICURLINFO_CONNECT_TIME_T\fP.
253: The time it took from the start until the connect
254: to the remote host (or proxy) was completed.
255: .IP APPCONNECT
256: \fICURLINFO_APPCONNECT_TIME\fP and \fICURLINFO_APPCONNECT_TIME_T\fP.
257: The time it took from the start until the SSL
258: connect/handshake with the remote host was completed. (Added in 7.19.0)
259: The latter is the integer version (measuring microseconds). (Added in 7.60.0)
260: .IP PRETRANSFER
261: \fICURLINFO_PRETRANSFER_TIME\fP and \fICURLINFO_PRETRANSFER_TIME_T\fP.
262: The time it took from the start until the
263: file transfer is just about to begin. This includes all pre-transfer commands
264: and negotiations that are specific to the particular protocol(s) involved.
265: .IP STARTTRANSFER
266: \fICURLINFO_STARTTRANSFER_TIME\fP and \fICURLINFO_STARTTRANSFER_TIME_T\fP.
267: The time it took from the start until the
268: first byte is received by libcurl.
269: .IP TOTAL
270: \fICURLINFO_TOTAL_TIME\fP and \fICURLINFO_TOTAL_TIME_T\fP.
271: Total time of the previous request.
272: .IP REDIRECT
273: \fICURLINFO_REDIRECT_TIME\fP and \fICURLINFO_REDIRECT_TIME_T\fP.
274: The time it took for all redirection steps
275: include name lookup, connect, pretransfer and transfer before final
276: transaction was started. So, this is zero if no redirection took place.
277: .SH RETURN VALUE
278: If the operation was successful, CURLE_OK is returned. Otherwise an
279: appropriate error code will be returned.
280: .SH "SEE ALSO"
281: .BR curl_easy_setopt "(3)"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>