]> git.ipfire.org Git - thirdparty/curl.git/commit
lib: add CURLINFO_CONN_ID and CURLINFO_XFER_ID
authorStefan Eissing <stefan@eissing.org>
Tue, 23 May 2023 10:48:58 +0000 (12:48 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 12 Jun 2023 21:53:00 +0000 (23:53 +0200)
commite024d5665d68083dca6d3debc4b210d84978ea87
tree8f412e3c5398d7a6135b3fbdb5da6bda07644b7e
parentfdda99c6eedfbf6ea95576d09dc7aea8ad65673d
lib: add CURLINFO_CONN_ID and CURLINFO_XFER_ID

- add an `id` long to Curl_easy, -1 on init
- once added to a multi (or its own multi), it gets
  a non-negative number assigned by the connection cache
- `id` is unique among all transfers using the same
  cache until reaching LONG_MAX where it will wrap
  around. So, not unique eternally.
- CURLINFO_CONN_ID returns the connection id attached to
  data or, if none present, data->state.lastconnect_id
- variables and type declared in tool for write out

Closes #11185
31 files changed:
docs/libcurl/curl_easy_getinfo.3
docs/libcurl/opts/CURLINFO_CONN_ID.3 [new file with mode: 0644]
docs/libcurl/opts/CURLINFO_XFER_ID.3 [new file with mode: 0644]
docs/libcurl/symbols-in-versions
include/curl/curl.h
lib/cfilters.c
lib/conncache.h
lib/connect.c
lib/curl_log.c
lib/curl_log.h
lib/easy.c
lib/getinfo.c
lib/http2.c
lib/imap.c
lib/multi.c
lib/sendf.c
lib/telnet.c
lib/transfer.c
lib/url.c
lib/urldata.h
lib/vquic/curl_msh3.c
lib/vquic/curl_ngtcp2.c
lib/vquic/curl_quiche.c
lib/vtls/vtls.c
lib/ws.c
src/tool_writeout.c
src/tool_writeout.h
tests/data/test1506
tests/data/test1542
tests/data/test970
tests/data/test972