summaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-11-30 06:20:54 +0100
committerYang Tse <yangsita@gmail.com>2010-11-30 06:20:54 +0100
commitf6f5d7874f6a890f2626195f169abcbfc785b220 (patch)
tree94039bb2a957ead238095ddb5a67bec225373e67 /lib/urldata.h
parent5db0a412ff6972e51ccddaf1e8d6a27c8de4990f (diff)
downloadcurl-f6f5d7874f6a890f2626195f169abcbfc785b220.tar.gz
fix getinfo CURLINFO_LOCAL* for reused connections
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 93c2d4078..19ed4beb3 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -914,15 +914,24 @@ struct PureInfo {
long numconnects; /* how many new connection did libcurl created */
char *contenttype; /* the content type of the object */
char *wouldredirect; /* URL this would've been redirected to if asked to */
- char ip[MAX_IPADR_LEN]; /* this buffer gets the numerical ip version stored
- at the connect *attempt* so it will get the last
- tried connect IP even on failures */
- long port; /* the remote port the last connection was established to */
- char localip[MAX_IPADR_LEN]; /* this buffer gets the numerical (local) ip
- stored from where the last connection was
- established */
- long localport; /* the local (src) port the last connection
- originated from */
+
+ /* 'primary_ip' and 'primary_port' get filled with peer's numerical
+ ip address and port number whenever an outgoing connection is
+ *attemted* from the primary socket to a remote address. When more
+ than one address is tried for a connection these will hold data
+ for the last attempt. When the connection is actualy established
+ these are updated with data which comes directly from the socket. */
+
+ char primary_ip[MAX_IPADR_LEN];
+ long primary_port;
+
+ /* 'local_ip' and 'local_port' get filled with local's numerical
+ ip address and port number whenever an outgoing connection is
+ **established** from the primary socket to a remote address. */
+
+ char local_ip[MAX_IPADR_LEN];
+ long local_port;
+
struct curl_certinfo certs; /* info about the certs, only populated in
OpenSSL builds. Asked for with
CURLOPT_CERTINFO / CURLINFO_CERTINFO */