net: Add if_nameindex and if_freenameindex API

Specified here:
https://man7.org/linux/man-pages/man3/if_nameindex.3.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia5daed775bd11fa5978d54860632554da8f7b416
This commit is contained in:
Xiang Xiao
2021-06-22 11:19:06 +08:00
committed by Abdelatif Guettouche
parent b88b5b14c8
commit 20f5a28e49
5 changed files with 195 additions and 10 deletions
-10
View File
@@ -36,16 +36,6 @@
# include <nuttx/wqueue.h>
#endif
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* If CONFIG_NETDEV_IFINDEX is enabled then there is limit to the number of
* devices that can be registered due to the nature of some static data.
*/
#define MAX_IFINDEX 32
/****************************************************************************
* Public Data
****************************************************************************/