3 * Interface Identification APIs from:
4 * RFC 3493: Basic Socket Interface Extensions for IPv6
5 * Section 4: Interface Identification
9 * Copyright (c) 2017 Joel Cunningham <joel.cunningham@me.com>
10 * All rights reserved.
12 * Redistribution and use in source and binary forms, with or without modificat
14 * are permitted provided that the following conditions are met:
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.
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
28 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREM
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
35 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILI
39 * This file is part of the lwIP TCP/IP stack.
41 * Author: Joel Cunningham <joel.cunningham@me.com>
49 #define IF_NAMESIZE 6 /* 2 chars, 3 nums, 1 \0 */
51 char * lwip_if_indextoname(unsigned ifindex, char *ifname);
52 unsigned int lwip_if_nametoindex(const char *ifname);
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 */
59 #endif /* LWIP_HDR_IF_H */