1 #ifndef LWS_HAVE_GETIFADDRS
2 #define LWS_HAVE_GETIFADDRS 0
5 #if LWS_HAVE_GETIFADDRS
13 * Copyright (c) 2000 Kungliga Tekniska H�gskolan
14 * (Royal Institute of Technology, Stockholm, Sweden).
15 * All rights reserved.
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
24 * 2. Redistributions in binary form must reproduce the above copyright
25 * notice, this list of conditions and the following disclaimer in the
26 * documentation and/or other materials provided with the distribution.
28 * 3. Neither the name of the Institute nor the names of its contributors
29 * may be used to endorse or promote products derived from this software
30 * without specific prior written permission.
32 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
33 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
36 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
40 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
41 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
45 /* $KTH: ifaddrs.hin,v 1.3 2000/12/11 00:01:13 assar Exp $ */
47 #ifndef ifaddrs_h_7467027A95AD4B5C8DDD40FE7D973791
48 #define ifaddrs_h_7467027A95AD4B5C8DDD40FE7D973791
51 * the interface is defined in terms of the fields below, and this is
52 * sometimes #define'd, so there seems to be no simple way of solving
53 * this and this seemed the best. */
58 struct ifaddrs *ifa_next;
60 unsigned int ifa_flags;
61 struct sockaddr *ifa_addr;
62 struct sockaddr *ifa_netmask;
63 struct sockaddr *ifa_dstaddr;
68 #define ifa_broadaddr ifa_dstaddr
71 int getifaddrs(struct ifaddrs **);
73 void freeifaddrs(struct ifaddrs *);
75 #endif /* __ifaddrs_h__ */