Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / lib / if2ip.h
blob4d95b00834c53d5313a5efbb07851b655a5dc1a6
1 #ifndef __IF2IP_H
2 #define __IF2IP_H
3 /***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
10 * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at http://curl.haxx.se/docs/copyright.html.
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 * $Id: if2ip.h,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
24 ***************************************************************************/
25 #include "setup.h"
27 extern char *Curl_if2ip(const char *interf, char *buf, int buf_size);
29 #ifdef __INTERIX
30 #include <sys/socket.h>
32 /* Nedelcho Stanev's work-around for SFU 3.0 */
33 struct ifreq {
34 #define IFNAMSIZ 16
35 #define IFHWADDRLEN 6
36 union {
37 char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
38 } ifr_ifrn;
40 union {
41 struct sockaddr ifru_addr;
42 struct sockaddr ifru_broadaddr;
43 struct sockaddr ifru_netmask;
44 struct sockaddr ifru_hwaddr;
45 short ifru_flags;
46 int ifru_metric;
47 int ifru_mtu;
48 } ifr_ifru;
51 /* This define was added by Daniel to avoid an extra #ifdef INTERIX in the
52 C code. */
53 #define ifr_dstaddr ifr_addr
55 #define ifr_name ifr_ifrn.ifrn_name /* interface name */
56 #define ifr_addr ifr_ifru.ifru_addr /* address */
57 #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
58 #define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */
59 #define ifr_flags ifr_ifru.ifru_flags /* flags */
60 #define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
61 #define ifr_metric ifr_ifru.ifru_metric /* metric */
62 #define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
64 #define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */
65 #endif /* interix */
67 #endif