diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2014-09-10 08:07:58 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-10-08 15:53:25 -0400 |
commit | 3fe5d9bff98b4716e219516c30d71462495324f4 (patch) | |
tree | cd369c3f671882cefde2f68a1ac8146f97c6bc84 /lib/if2ip.h | |
parent | f086cb372e41035260fcd9b4ed3d2cfb272f138f (diff) | |
download | cmake-3fe5d9bff98b4716e219516c30d71462495324f4.tar.gz |
curl 7.38.0 (reduced)
Extract upstream curl using the following shell code.
url=git://github.com/bagder/curl.git &&
v=7.38.0 &&
r=202aa9f7 &&
paths="
CMake/*
CMakeLists.txt
COPYING
include/curl/*.h
include/curl/curlbuild.h.cmake
lib/*.c
lib/*.h
lib/CMakeLists.txt
lib/Makefile.inc
lib/curl_config.h.cmake
lib/libcurl.rc
lib/vtls/*.c
lib/vtls/*.h
" &&
mkdir curl-$v-g$r-reduced &&
git clone $url curl-git &&
date=$(cd curl-git && git log -n 1 --format='%cd' $r) &&
(cd curl-git && git checkout $r &&
git archive --format=tar $r -- $paths) |
(cd curl-$v-g$r-reduced && tar xv &&
rm lib/config-*.h) &&
echo "g$r date: $date"
Diffstat (limited to 'lib/if2ip.h')
-rw-r--r-- | lib/if2ip.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/lib/if2ip.h b/lib/if2ip.h index 4e86e2b27d..ac58752378 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, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,14 +20,21 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ -#include "setup.h" +#include "curl_setup.h" -extern char *Curl_if2ip(const char *interf, char *buf, int buf_size); +bool Curl_if_is_interface_name(const char *interf); + +typedef enum { + IF2IP_NOT_FOUND = 0, /* Interface not found */ + IF2IP_AF_NOT_SUPPORTED = 1, /* Int. exists but has no address for this af */ + IF2IP_FOUND = 2 /* The address has been stored in "buf" */ +} if2ip_result_t; + +if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, + const char *interf, char *buf, int buf_size); #ifdef __INTERIX -#include <sys/socket.h> /* Nedelcho Stanev's work-around for SFU 3.0 */ struct ifreq { @@ -50,7 +57,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 */ @@ -62,6 +68,7 @@ struct ifreq { #define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ #define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */ -#endif /* interix */ -#endif +#endif /* __INTERIX */ + +#endif /* HEADER_CURL_IF2IP_H */ |