]> granicus.if.org Git - curl/commitdiff
the IP address we want/request/use from the interface is the 'local'
authorYang Tse <yangsita@gmail.com>
Mon, 17 Nov 2008 19:08:35 +0000 (19:08 +0000)
committerYang Tse <yangsita@gmail.com>
Mon, 17 Nov 2008 19:08:35 +0000 (19:08 +0000)
address, the one on the box libcurl is running, not the 'remote' one.

lib/config-riscos.h
lib/if2ip.c
lib/if2ip.h
lib/setup-os400.h
src/config-riscos.h

index 938a8fc3ee5399a433fbe8e261f0141fbf2ec6ae..82d579e53ab290e1edc399bfd5cb22f8417b93ae 100644 (file)
 /* Define to `int' if <sys/types.h> does not define. */
 #undef ssize_t
 
-/* this is a quick hack.  I hope it's correct. */
-#define ifr_dstaddr ifr_addr
-
 /* Define if you have the ioctl function. */
 #define HAVE_IOCTL
 
index 1c82373f17c1df877ddbf0f505fb07903a621694..842cd9947d935f5255893e2903decac8bd540e2e 100644 (file)
@@ -137,7 +137,7 @@ char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
     else {
       struct in_addr in;
 
-      struct sockaddr_in *s = (struct sockaddr_in *)&req.ifr_dstaddr;
+      struct sockaddr_in *s = (struct sockaddr_in *)&req.ifr_addr;
       memcpy(&in, &s->sin_addr, sizeof(in));
       ip = (char *) Curl_inet_ntop(s->sin_family, &in, buf, buf_size);
     }
index 6888a4cb8e10562c1e256409c3dd60237003a5cd..a7e341907a891106d6d782a55235dcc78504d537 100644 (file)
@@ -50,7 +50,6 @@ struct ifreq {
 
 /* This define was added by Daniel to avoid an extra #ifdef INTERIX in the
    C code. */
-#define ifr_dstaddr ifr_addr
 
 #define ifr_name ifr_ifrn.ifrn_name /* interface name */
 #define ifr_addr ifr_ifru.ifru_addr /* address */
index 5efa6863b7f01ccbe98e9127c653519dc470ab7f..eb51bc24c149808e5b938161aa344638e6b31240 100644 (file)
@@ -30,9 +30,6 @@
 /* OS/400 netdb.h does not define NI_MAXSERV. */
 #define NI_MAXSERV      32
 
-/* OS/400 does not define the ifr_dstaddr union member. */
-#define ifr_dstaddr     ifr_addr
-
 /* No OS/400 header file defines u_int32_t. */
 typedef unsigned long   u_int32_t;
 
index 840b94f6b870d5a765aed58800631e817913ab03..f8df38ed5c6f546733b91b2ea35f9a24a479721b 100644 (file)
 /* Define to `int' if <sys/types.h> does not define. */
 #undef ssize_t
 
-/* this is a quick hack.  I hope it's correct. */
-#define ifr_dstaddr ifr_addr
-
 /* Define if you have the ioctl function. */
 #define HAVE_IOCTL