diff -Naur curl-7.14.0.orig/include/curl/multi.h curl-7.14.0.mod/include/curl/multi.h
--- curl-7.14.0.orig/include/curl/multi.h	2005-04-18 04:45:13.000000000 -0700
+++ curl-7.14.0.mod/include/curl/multi.h	2005-07-14 10:02:16.000000000 -0700
@@ -126,6 +126,15 @@
  */
 CURL_EXTERN CURLM *curl_multi_init(void);
 
+CURL_EXTERN CURLcode curl_multi_getlastip(CURLM *multi_handle,
+                                            CURL *easy_handle,
+                                            char* cachedIp,
+                                            int cachedIpSize,
+                                            int port);
+
+
+
+
 /*
  * Name:    curl_multi_add_handle()
  *
diff -Naur curl-7.14.0.orig/lib/multi.c curl-7.14.0.mod/lib/multi.c
--- curl-7.14.0.orig/lib/multi.c	2005-03-08 14:21:59.000000000 -0800
+++ curl-7.14.0.mod/lib/multi.c	2005-07-14 10:01:54.000000000 -0700
@@ -793,3 +793,50 @@
   else
     return NULL;
 }
+
+
+CURLcode curl_multi_getlastip
+(
+    CURLM *multi_handle,
+    CURL *easy_handle,
+    char* cachedIp,
+    int cachedIpSize,
+    int port
+)
+{
+
+  if ( !cachedIp ) return CURLE_FAILED_INIT;
+
+  struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
+  struct SessionHandle *easy=(struct SessionHandle *)easy_handle;
+
+  cachedIp[0]=0;
+
+  struct curl_hash * hc = multi->hostcache;
+
+  if ( easy && easy->state.first_host != NULL )
+  {
+      static char entry_id[4096];
+      sprintf(entry_id, "%s:80", easy->state.first_host);
+
+      /* if ( !hc ) printf("No hostcache.\n"); */
+
+      if ( entry_id && hc )
+      {
+          int entry_len = strlen(entry_id);
+          struct Curl_dns_entry* dns = Curl_hash_pick(hc, entry_id, entry_len+1);
+          if ( dns )
+          {
+              Curl_printable_address(dns->addr, cachedIp, cachedIpSize);
+          }
+          /* else printf("Null dns returned for %s (%d)", entry_id, entry_len+1); */
+
+          free(entry_id);
+
+          return CURLE_OK;
+      }
+  }
+  return CURLE_FAILED_INIT;
+}
+
+
