diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-06-06 17:33:35 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-06-06 17:33:35 +0000 |
commit | 930a45e7a93c964ec224bdddb59f97479b7e4a5d (patch) | |
tree | d567e363980655d50c73408540262b6ddaa3fff2 /lib/getinfo.c | |
parent | afc66554d7225766a7b9ad773de38b9d0801ff84 (diff) | |
download | curl-930a45e7a93c964ec224bdddb59f97479b7e4a5d.tar.gz |
- Added CURLINFO_PRIMARY_IP as a new information retrievable with
curl_easy_getinfo. It returns a pointer to a string with the most recently
used IP address. Modified test case 500 to also verify this feature. The
implementing of this feature was sponsored by Lenny Rachitsky at NeuStar.
Diffstat (limited to 'lib/getinfo.c')
-rw-r--r-- | lib/getinfo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/getinfo.c b/lib/getinfo.c index 078154246..bef2ebac4 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -210,6 +210,10 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) option had been enabled! */ *param_charp = data->info.wouldredirect; break; + case CURLINFO_PRIMARY_IP: + /* Return the ip address of the most recent (primary) connection */ + *param_charp = data->info.ip; + break; default: return CURLE_BAD_FUNCTION_ARGUMENT; } |