- curl_easy_getinfo (3)
- curl_easy_setopt (3)
Protocol:
- - All
+ - TCP
+ - QUIC
Added-in: 7.21.0
---
Pass a pointer to a char pointer to receive the pointer to a null-terminated
string holding the IP address of the local end of most recent connection done
-with this **curl** handle. This string may be IPv6 when that is
-enabled. Note that you get a pointer to a memory area that is reused at next
-request so you need to copy the string if you want to keep the information.
+with this **curl** handle. This string may be IPv6 when that is enabled. Note
+that you get a pointer to a memory area that is reused at next request so you
+need to copy the string if you want to keep the information.
-The **ip** pointer is NULL or points to private memory. You MUST NOT free -
-it gets freed when you call curl_easy_cleanup(3) on the corresponding
-CURL handle.
+The **ip** pointer is NULL or points to private memory. You MUST NOT free - it
+gets freed when you call curl_easy_cleanup(3) on the corresponding CURL
+handle.
# %PROTOCOLS%
Source: libcurl
Protocol:
- TCP
+ - QUIC
See-also:
- CURLINFO_LOCAL_IP (3)
- CURLINFO_PRIMARY_PORT (3)
Pass a pointer to a long to receive the local port number of the most recent
connection done with this **curl** handle.
+If the connection was done using QUIC, the port number is a UDP port number,
+otherwise it is a TCP port number.
+
# %PROTOCOLS%
# EXAMPLE