1 |
27 |
unneback |
//==========================================================================
|
2 |
|
|
//
|
3 |
|
|
// include/ifaddrs.h
|
4 |
|
|
//
|
5 |
|
|
//==========================================================================
|
6 |
|
|
//####BSDCOPYRIGHTBEGIN####
|
7 |
|
|
//
|
8 |
|
|
// -------------------------------------------
|
9 |
|
|
//
|
10 |
|
|
// Portions of this software may have been derived from OpenBSD,
|
11 |
|
|
// FreeBSD or other sources, and are covered by the appropriate
|
12 |
|
|
// copyright disclaimers included herein.
|
13 |
|
|
//
|
14 |
|
|
// Portions created by Red Hat are
|
15 |
|
|
// Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
|
16 |
|
|
//
|
17 |
|
|
// -------------------------------------------
|
18 |
|
|
//
|
19 |
|
|
//####BSDCOPYRIGHTEND####
|
20 |
|
|
//==========================================================================
|
21 |
|
|
/* $KAME: ifaddrs.h,v 1.3 2001/01/26 08:14:55 itojun Exp $ */
|
22 |
|
|
|
23 |
|
|
/*
|
24 |
|
|
* Copyright (c) 1995, 1999
|
25 |
|
|
* Berkeley Software Design, Inc. All rights reserved.
|
26 |
|
|
*
|
27 |
|
|
* Redistribution and use in source and binary forms, with or without
|
28 |
|
|
* modification, are permitted provided that the following conditions
|
29 |
|
|
* are met:
|
30 |
|
|
* 1. Redistributions of source code must retain the above copyright
|
31 |
|
|
* notice, this list of conditions and the following disclaimer.
|
32 |
|
|
*
|
33 |
|
|
* THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
|
34 |
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
35 |
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
36 |
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
|
37 |
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
38 |
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
39 |
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
40 |
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
41 |
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
42 |
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
43 |
|
|
* SUCH DAMAGE.
|
44 |
|
|
*
|
45 |
|
|
* BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
|
46 |
|
|
*/
|
47 |
|
|
|
48 |
|
|
#ifndef _IFADDRS_H_
|
49 |
|
|
#define _IFADDRS_H_
|
50 |
|
|
|
51 |
|
|
struct ifaddrs {
|
52 |
|
|
struct ifaddrs *ifa_next;
|
53 |
|
|
char *ifa_name;
|
54 |
|
|
u_int ifa_flags;
|
55 |
|
|
struct sockaddr *ifa_addr;
|
56 |
|
|
struct sockaddr *ifa_netmask;
|
57 |
|
|
struct sockaddr *ifa_dstaddr;
|
58 |
|
|
void *ifa_data;
|
59 |
|
|
};
|
60 |
|
|
|
61 |
|
|
/*
|
62 |
|
|
* This may have been defined in <net/if.h>. Note that if <net/if.h> is
|
63 |
|
|
* to be included it must be included before this header file.
|
64 |
|
|
*/
|
65 |
|
|
#ifndef ifa_broadaddr
|
66 |
|
|
#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
|
67 |
|
|
#endif
|
68 |
|
|
|
69 |
|
|
__BEGIN_DECLS
|
70 |
|
|
extern int getifaddrs __P((struct ifaddrs **));
|
71 |
|
|
extern void freeifaddrs __P((struct ifaddrs *));
|
72 |
|
|
__END_DECLS
|
73 |
|
|
|
74 |
|
|
#endif
|