From ae1912cb0d494b48d514d937826c9fe83ec96c4d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 29 Dec 1999 14:20:26 +0000 Subject: Initial revision --- lib/if2ip.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 lib/if2ip.h (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h new file mode 100644 index 000000000..0b658f9d2 --- /dev/null +++ b/lib/if2ip.h @@ -0,0 +1,50 @@ +#ifndef __IF2IP_H +#define __IF2IP_H +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ +#include "setup.h" + +#if ! defined(WIN32) && ! defined(__BEOS__) +char *if2ip(char *interface); +#else +#define if2ip(x) NULL +#endif + +#endif -- cgit v1.2.1 From a0ce95e155de68bd5a088a7a539f45aa7134b00b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 29 May 2000 22:51:13 +0000 Subject: David LeBlanc's fixes! --- lib/if2ip.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 0b658f9d2..e6f73a54a 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -42,9 +42,9 @@ #include "setup.h" #if ! defined(WIN32) && ! defined(__BEOS__) -char *if2ip(char *interface); +extern char *if2ip(char *interface, char *buf, int buf_size); #else -#define if2ip(x) NULL +#define if2ip(a,b,c) NULL #endif #endif -- cgit v1.2.1 From 1ef3600a0731fef8f59563a1e49981f1b64b9746 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 20 Jun 2000 15:31:26 +0000 Subject: haxx.nu => haxx.se --- lib/if2ip.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index e6f73a54a..6a7947c8e 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -26,9 +26,9 @@ * * ------------------------------------------------------------ * Main author: - * - Daniel Stenberg + * - Daniel Stenberg * - * http://curl.haxx.nu + * http://curl.haxx.se * * $Source$ * $Revision$ -- cgit v1.2.1 From 24dee483e9e925c2ab79dd582f70c9a55ab9ba4d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 3 Jan 2001 09:29:33 +0000 Subject: dual-license fix --- lib/if2ip.h | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 6a7947c8e..502f6732d 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -7,38 +7,21 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * The contents of this file are subject to the Mozilla Public License - * Version 1.0 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ + * Copyright (C) 2000, Daniel Stenberg, , et al. * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * under the License. + * In order to be useful for every potential user, curl and libcurl are + * dual-licensed under the MPL and the MIT/X-derivate licenses. * - * The Original Code is Curl. + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the MPL or the MIT/X-derivate + * licenses. You may pick one of these licenses. * - * The Initial Developer of the Original Code is Daniel Stenberg. + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. * - * Portions created by the Initial Developer are Copyright (C) 1998. - * All Rights Reserved. - * - * ------------------------------------------------------------ - * Main author: - * - Daniel Stenberg - * - * http://curl.haxx.se - * - * $Source$ - * $Revision$ - * $Date$ - * $Author$ - * $State$ - * $Locker$ - * - * ------------------------------------------------------------ - ****************************************************************************/ + * $Id$ + *****************************************************************************/ #include "setup.h" #if ! defined(WIN32) && ! defined(__BEOS__) -- cgit v1.2.1 From 4031104404c6ceed5e57134125dcdb6cac51c564 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 5 Jan 2001 10:11:41 +0000 Subject: Internal symbols that aren't static are now prefixed with 'Curl_' --- lib/if2ip.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 502f6732d..6a4801c2e 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -25,9 +25,9 @@ #include "setup.h" #if ! defined(WIN32) && ! defined(__BEOS__) -extern char *if2ip(char *interface, char *buf, int buf_size); +extern char *Curl_if2ip(char *interface, char *buf, int buf_size); #else -#define if2ip(a,b,c) NULL +#define Curl_if2ip(a,b,c) NULL #endif #endif -- cgit v1.2.1 From 9ab5d30e3bd82e8e02adf5c67c505fb1aa316373 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 4 Feb 2001 19:00:27 +0000 Subject: Ingo Ralf Blum made it compile with the newest cygwin --- lib/if2ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 6a4801c2e..2fbb471d7 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -24,7 +24,7 @@ *****************************************************************************/ #include "setup.h" -#if ! defined(WIN32) && ! defined(__BEOS__) +#if ! defined(WIN32) && ! defined(__BEOS__) && !defined(__CYGWIN32__) extern char *Curl_if2ip(char *interface, char *buf, int buf_size); #else #define Curl_if2ip(a,b,c) NULL -- cgit v1.2.1 From 974f314f5785156af6983675aeb28313cc8ba2ea Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 19 Mar 2002 07:54:55 +0000 Subject: copyright string (year) update --- lib/if2ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 2fbb471d7..150abfdf6 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2000, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * * In order to be useful for every potential user, curl and libcurl are * dual-licensed under the MPL and the MIT/X-derivate licenses. -- cgit v1.2.1 From ba4e69bebc8f7f32f3bc7faa1e13e7580754075b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 3 Sep 2002 11:52:59 +0000 Subject: updated source code boilerplate/header --- lib/if2ip.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 150abfdf6..2be0ea54a 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -1,6 +1,6 @@ #ifndef __IF2IP_H #define __IF2IP_H -/***************************************************************************** +/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | @@ -9,19 +9,19 @@ * * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. * - * In order to be useful for every potential user, curl and libcurl are - * dual-licensed under the MPL and the MIT/X-derivate licenses. - * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at http://curl.haxx.se/docs/copyright.html. + * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is - * furnished to do so, under the terms of the MPL or the MIT/X-derivate - * licenses. You may pick one of these licenses. + * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * * $Id$ - *****************************************************************************/ + ***************************************************************************/ #include "setup.h" #if ! defined(WIN32) && ! defined(__BEOS__) && !defined(__CYGWIN32__) -- cgit v1.2.1 From 11576b1142250b7dc25cc496fb3c1f8f064c69b0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 24 Nov 2002 19:30:21 +0000 Subject: Nedelcho Stanev's work-around for SFU 3.0 --- lib/if2ip.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 2be0ea54a..3cb0a465b 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -29,5 +29,40 @@ extern char *Curl_if2ip(char *interface, char *buf, int buf_size); #else #define Curl_if2ip(a,b,c) NULL #endif +#ifdef __INTERIX +/* Nedelcho Stanev's work-around for SFU 3.0 */ +struct ifreq { +#define IFNAMSIZ 16 +#define IFHWADDRLEN 6 + union { + char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */ + } ifr_ifrn; + + union { + struct sockaddr ifru_addr; + struct sockaddr ifru_broadaddr; + struct sockaddr ifru_netmask; + struct sockaddr ifru_hwaddr; + short ifru_flags; + int ifru_metric; + int ifru_mtu; + } ifr_ifru; +}; + +/* 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 */ +#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ +#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */ +#define ifr_flags ifr_ifru.ifru_flags /* flags */ +#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */ +#define ifr_metric ifr_ifru.ifru_metric /* metric */ +#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ + +#define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */ +#endif /* interix */ #endif -- cgit v1.2.1 From f26a338a54e04d0a6907f5d2479d8b0fa9daf297 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 16 Jan 2003 21:08:12 +0000 Subject: copyright year update in the source header --- lib/if2ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 3cb0a465b..fdcb60b48 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2002, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2003, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms -- cgit v1.2.1 From 8f809e2a9329c419ac184d658b58902ace51e97b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 28 Feb 2003 13:11:10 +0000 Subject: James Bursa made it compile on RISC OS as well. --- lib/if2ip.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index fdcb60b48..34f9a5111 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -24,7 +24,8 @@ ***************************************************************************/ #include "setup.h" -#if ! defined(WIN32) && ! defined(__BEOS__) && !defined(__CYGWIN32__) +#if ! defined(WIN32) && ! defined(__BEOS__) && !defined(__CYGWIN32__) && \ + ! defined(__riscos__) extern char *Curl_if2ip(char *interface, char *buf, int buf_size); #else #define Curl_if2ip(a,b,c) NULL -- cgit v1.2.1 From 053f6c85efd0bf698f73343989474d672d0563a8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Jan 2004 09:19:33 +0000 Subject: updated year in the copyright string --- lib/if2ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 34f9a5111..566d68ba8 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2003, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms -- cgit v1.2.1 From a275365c72fb628c8ea1e246aac02f6ebcb2b20b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 16 Jan 2004 07:09:28 +0000 Subject: Avoid Curl_if2ip() on Interix as well. Fix by Rodney. --- lib/if2ip.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 566d68ba8..239087d74 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -24,8 +24,8 @@ ***************************************************************************/ #include "setup.h" -#if ! defined(WIN32) && ! defined(__BEOS__) && !defined(__CYGWIN32__) && \ - ! defined(__riscos__) +#if !defined(WIN32) && !defined(__BEOS__) && !defined(__CYGWIN32__) && \ + !defined(__riscos__) !defined(__INTERIX) extern char *Curl_if2ip(char *interface, char *buf, int buf_size); #else #define Curl_if2ip(a,b,c) NULL -- cgit v1.2.1 From 27b7220f1b536f3854d9fa35d0bd12321ac858e3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 16 Jan 2004 07:15:05 +0000 Subject: silly me --- lib/if2ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 239087d74..f2c3a541f 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -25,7 +25,7 @@ #include "setup.h" #if !defined(WIN32) && !defined(__BEOS__) && !defined(__CYGWIN32__) && \ - !defined(__riscos__) !defined(__INTERIX) + !defined(__riscos__) && !defined(__INTERIX) extern char *Curl_if2ip(char *interface, char *buf, int buf_size); #else #define Curl_if2ip(a,b,c) NULL -- cgit v1.2.1 From b2c290e40e73a8c2b7a0a15a967c1abe4d603382 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 5 May 2004 13:42:23 +0000 Subject: Gisle-fix: constified the 'interface' argument. --- lib/if2ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index f2c3a541f..30a6540a4 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -26,7 +26,7 @@ #if !defined(WIN32) && !defined(__BEOS__) && !defined(__CYGWIN32__) && \ !defined(__riscos__) && !defined(__INTERIX) -extern char *Curl_if2ip(char *interface, char *buf, int buf_size); +extern char *Curl_if2ip(const char *interface, char *buf, int buf_size); #else #define Curl_if2ip(a,b,c) NULL #endif -- cgit v1.2.1 From c39858aac0584716282dcb097ce9d972b43dbcb2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 24 Jun 2004 07:43:48 +0000 Subject: Source cleanups. The major one being that we now _always_ use a Curl_addrinfo linked list for name resolved data, even on hosts/systems with only IPv4 stacks as this simplifies a lot of code. --- lib/if2ip.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 30a6540a4..45a180531 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -1,10 +1,10 @@ #ifndef __IF2IP_H #define __IF2IP_H /*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. @@ -12,7 +12,7 @@ * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at http://curl.haxx.se/docs/copyright.html. - * + * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. @@ -63,7 +63,7 @@ struct ifreq { #define ifr_metric ifr_ifru.ifru_metric /* metric */ #define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ -#define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */ +#define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */ #endif /* interix */ #endif -- cgit v1.2.1 From 3916d1e6cbe8eb5cb4dbbc43690b44b0b8fe6cc1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 14 Mar 2005 15:43:23 +0000 Subject: silence compiler warnings for mingw win32 builds --enable-debug --- lib/if2ip.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 45a180531..ddb73ee8b 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -24,12 +24,8 @@ ***************************************************************************/ #include "setup.h" -#if !defined(WIN32) && !defined(__BEOS__) && !defined(__CYGWIN32__) && \ - !defined(__riscos__) && !defined(__INTERIX) -extern char *Curl_if2ip(const char *interface, char *buf, int buf_size); -#else -#define Curl_if2ip(a,b,c) NULL -#endif +extern char *Curl_if2ip(const char *interf, char *buf, int buf_size); + #ifdef __INTERIX /* Nedelcho Stanev's work-around for SFU 3.0 */ struct ifreq { -- cgit v1.2.1 From ab4086bc244bf3267976e9f0193e5ed4430190d8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 31 Mar 2005 07:02:02 +0000 Subject: Updated the copyright year since changes have been this year. --- lib/if2ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index ddb73ee8b..4364b09d1 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms -- cgit v1.2.1 From b5c5f576135235fd7f5aae0337a79c546e247651 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 4 Mar 2006 22:39:31 +0000 Subject: build fix for Interix --- lib/if2ip.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 4364b09d1..4e86e2b27 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -27,6 +27,8 @@ extern char *Curl_if2ip(const char *interf, char *buf, int buf_size); #ifdef __INTERIX +#include + /* Nedelcho Stanev's work-around for SFU 3.0 */ struct ifreq { #define IFNAMSIZ 16 -- cgit v1.2.1 From fad3288d20fba6af71fa9bdfb851fe92c3aa2f04 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 9 Oct 2008 19:23:50 +0000 Subject: Fixed the --interface option to work with IPv6 connections on glibc systems supporting getifaddrs(). Also fixed a problem where an IPv6 address could be chosen instead of an IPv4 one for --interface when it involved a name lookup. --- lib/if2ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 4e86e2b27..6888a4cb8 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -24,7 +24,7 @@ ***************************************************************************/ #include "setup.h" -extern char *Curl_if2ip(const char *interf, char *buf, int buf_size); +extern char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size); #ifdef __INTERIX #include -- cgit v1.2.1 From a15b6a6f86229de50f7622e23a6b19c040d3d4e1 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 17 Nov 2008 19:08:35 +0000 Subject: the IP address we want/request/use from the interface is the 'local' address, the one on the box libcurl is running, not the 'remote' one. --- lib/if2ip.h | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 6888a4cb8..a7e341907 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -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 */ -- cgit v1.2.1 From 2309b4e330b96bc2e1f8e36b6184015e59544037 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Mar 2010 11:02:54 +0100 Subject: remove the CVSish $Id$ lines --- lib/if2ip.h | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index a7e341907..cdf2638ae 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ #include "setup.h" -- cgit v1.2.1 From 6e4835c795996ee92ac1aa78733f23a089f310a5 Mon Sep 17 00:00:00 2001 From: Jason Glasgow Date: Fri, 4 Nov 2011 16:48:05 -0400 Subject: CURLOPT_INTERFACE: avoid resolving interfaces names Do not try to resolve interfaces names via DNS by recognizing interface names in a few ways. If the interface option argument has a prefix of "if!" then treat the argument as only an interface. Similarly, if the interface argument is the name of an interface (even if it does not have an IP address assigned), treat it as an interface name. Finally, if the interface argument is prefixed by "host!" treat it as a hostname that must be resolved by /etc/hosts or DNS. These changes allow a client using the multi interfaces to avoid blocking on name resolution if the interface loses its IP address or disappears. --- lib/if2ip.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index cdf2638ae..678e3a556 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -23,6 +23,7 @@ ***************************************************************************/ #include "setup.h" +extern bool Curl_if_is_interface_name(const char *interface); extern char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size); #ifdef __INTERIX -- cgit v1.2.1 From 07efe110cc7dce18e6ef4ff73b1acbd30842471c Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 13 Dec 2011 15:47:26 +0100 Subject: if2ip.c: fix compiler warning 'enumerated type is mixed with another type' --- lib/if2ip.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 678e3a556..8b1979ba7 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -1,5 +1,5 @@ -#ifndef __IF2IP_H -#define __IF2IP_H +#ifndef HEADER_CURL_IF2IP_H +#define HEADER_CURL_IF2IP_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -63,4 +63,4 @@ struct ifreq { #define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */ #endif /* interix */ -#endif +#endif /* HEADER_CURL_IF2IP_H */ -- cgit v1.2.1 From 4c4e8ba1f060fdba2822da5ad498c7876cedd18b Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 13 Dec 2011 18:37:33 +0100 Subject: if2ip.[ch]: fix compilation with MinGW Avoid 'interface' literal that some MinGW versions define as a macro --- lib/if2ip.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/if2ip.h') diff --git a/lib/if2ip.h b/lib/if2ip.h index 8b1979ba7..99821b7c6 100644 --- a/lib/if2ip.h +++ b/lib/if2ip.h @@ -23,8 +23,8 @@ ***************************************************************************/ #include "setup.h" -extern bool Curl_if_is_interface_name(const char *interface); -extern char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size); +bool Curl_if_is_interface_name(const char *interf); +char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size); #ifdef __INTERIX #include -- cgit v1.2.1