2
* This code is mostly taken from NetBSD net/if.h
3
* Changes: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
5
******************************************************************************
7
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
10
* This code is derived from software contributed to The NetBSD Foundation
11
* by William Studenmund and Jason R. Thorpe.
13
* Redistribution and use in source and binary forms, with or without
14
* modification, are permitted provided that the following conditions
16
* 1. Redistributions of source code must retain the above copyright
17
* notice, this list of conditions and the following disclaimer.
18
* 2. Redistributions in binary form must reproduce the above copyright
19
* notice, this list of conditions and the following disclaimer in the
20
* documentation and/or other materials provided with the distribution.
22
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
23
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
24
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
26
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
* POSSIBILITY OF SUCH DAMAGE.
36
* Copyright (c) 1982, 1986, 1989, 1993
37
* The Regents of the University of California. All rights reserved.
39
* Redistribution and use in source and binary forms, with or without
40
* modification, are permitted provided that the following conditions
42
* 1. Redistributions of source code must retain the above copyright
43
* notice, this list of conditions and the following disclaimer.
44
* 2. Redistributions in binary form must reproduce the above copyright
45
* notice, this list of conditions and the following disclaimer in the
46
* documentation and/or other materials provided with the distribution.
47
* 3. Neither the name of the University nor the names of its contributors
48
* may be used to endorse or promote products derived from this software
49
* without specific prior written permission.
51
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
52
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
53
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
54
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
55
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
56
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
57
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
58
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
59
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
60
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
69
* Length of interface external name, including terminating '\0'.
70
* Note: this is the same size as a generic device's external name.
72
#define IF_NAMESIZE 16
75
unsigned int if_index; /* 1, 2, ... */
76
char *if_name; /* null terminated name: "le0", ... */
79
unsigned int if_nametoindex(const char *);
80
char * if_indextoname(unsigned int, char *);
81
struct if_nameindex * if_nameindex(void);
82
void if_freenameindex(struct if_nameindex *);
84
#endif /* !_NET_IF_H_ */