Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers if_api.h Source File

if_api.h

Go to the documentation of this file.
00001 /**
00002  * @file
00003  * Interface Identification APIs from:
00004  *              RFC 3493: Basic Socket Interface Extensions for IPv6
00005  *                  Section 4: Interface Identification
00006  */
00007 
00008 /*
00009  * Copyright (c) 2017 Joel Cunningham, Garmin International, Inc. <joel.cunningham@garmin.com>
00010  * All rights reserved.
00011  *
00012  * Redistribution and use in source and binary forms, with or without modification,
00013  * are permitted provided that the following conditions are met:
00014  *
00015  * 1. Redistributions of source code must retain the above copyright notice,
00016  *    this list of conditions and the following disclaimer.
00017  * 2. Redistributions in binary form must reproduce the above copyright notice,
00018  *    this list of conditions and the following disclaimer in the documentation
00019  *    and/or other materials provided with the distribution.
00020  * 3. The name of the author may not be used to endorse or promote products
00021  *    derived from this software without specific prior written permission.
00022  *
00023  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
00024  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00025  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
00026  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00027  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
00028  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00029  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00030  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
00031  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
00032  * OF SUCH DAMAGE.
00033  *
00034  * This file is part of the lwIP TCP/IP stack.
00035  *
00036  * Author: Joel Cunningham <joel.cunningham@me.com>
00037  *
00038  */
00039 #ifndef LWIP_HDR_IF_H
00040 #define LWIP_HDR_IF_H
00041 
00042 #include "lwip/opt.h"
00043 
00044 #if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */
00045 
00046 #include "lwip/netif.h"
00047 
00048 #ifdef __cplusplus
00049 extern "C" {
00050 #endif
00051 
00052 #define IF_NAMESIZE NETIF_NAMESIZE
00053 
00054 char * lwip_if_indextoname(unsigned int ifindex, char *ifname);
00055 unsigned int lwip_if_nametoindex(const char *ifname);
00056 
00057 #if LWIP_COMPAT_SOCKETS
00058 #define if_indextoname(ifindex, ifname)  lwip_if_indextoname(ifindex,ifname)
00059 #define if_nametoindex(ifname)           lwip_if_nametoindex(ifname)
00060 #endif /* LWIP_COMPAT_SOCKETS */
00061 
00062 #ifdef __cplusplus
00063 }
00064 #endif
00065 
00066 #endif /* LWIP_SOCKET */
00067 
00068 #endif /* LWIP_HDR_IF_H */