Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / lwip / repo / lwip / src / include / lwip / if.h
1 /**
2  * @file
3  * Interface Identification APIs from:
4  *              RFC 3493: Basic Socket Interface Extensions for IPv6
5  *                  Section 4: Interface Identification
6  */
7
8 /*
9  * Copyright (c) 2017 Joel Cunningham <joel.cunningham@me.com>
10  * All rights reserved.
11  *
12  * Redistribution and use in source and binary forms, with or without modificat
13 ion,
14  * are permitted provided that the following conditions are met:
15  *
16  * 1. Redistributions of source code must retain the above copyright notice,
17  *    this list of conditions and the following disclaimer.
18  * 2. Redistributions in binary form must reproduce the above copyright notice,
19  *    this list of conditions and the following disclaimer in the documentation
20  *    and/or other materials provided with the distribution.
21  * 3. The name of the author may not be used to endorse or promote products
22  *    derived from this software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
25  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO E
27 VENT
28  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREM
30 ENT
31  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARIS
34 ING
35  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILI
36 TY
37  * OF SUCH DAMAGE.
38  *
39  * This file is part of the lwIP TCP/IP stack.
40  *
41  * Author: Joel Cunningham <joel.cunningham@me.com>
42  *
43  */
44 #ifndef LWIP_HDR_IF_H
45 #define LWIP_HDR_IF_H
46
47 #include "lwip/opt.h"
48
49 #define IF_NAMESIZE 6 /* 2 chars, 3 nums, 1 \0 */
50
51 char * lwip_if_indextoname(unsigned ifindex, char *ifname);
52 unsigned int lwip_if_nametoindex(const char *ifname);
53
54 #if LWIP_COMPAT_SOCKETS
55 #define if_indextoname(ifindex, ifname)  lwip_if_indextoname(ifindex,ifname)
56 #define if_nametoindex(ifname)           lwip_if_nametoindex(ifname)
57 #endif /* LWIP_COMPAT_SOCKETS */
58
59 #endif /* LWIP_HDR_IF_H */