wireless/wapi: Remove functionality that depends on the Linux procfs: This includes only 1) listing of available interfaces and 2) listing of all routes.

This commit is contained in:
Gregory Nutt 2017-04-10 16:02:17 -06:00
parent 2d73f735fe
commit 322ffe193b
6 changed files with 43 additions and 302 deletions

View file

@ -1,8 +1,13 @@
/****************************************************************************
* apps/include/wireless/wapi.h
*
* Copyright (c) 2010, Volkan YAZICI <volkan.yazici@gmail.com>
* All rights reserved.
* Copyright (C) 2011, 2017Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Adapted for Nuttx from WAPI:
*
* Copyright (c) 2010, Volkan YAZICI <volkan.yazici@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@ -48,14 +53,6 @@
#define WAPI_ESSID_MAX_SIZE IW_ESSID_MAX_SIZE
/* Path to /proc/net/wireless. (Requires procfs mounted.) */
#define WAPI_PROC_NET_WIRELESS "/proc/net/wireless"
/* Path to /proc/net/route. (Requires procfs mounted.) */
#define WAPI_PROC_NET_ROUTE "/proc/net/route"
/* Buffer size while reading lines from PROC_NET_ files. */
#define WAPI_PROC_LINE_SIZE 1024
@ -293,19 +290,6 @@ int wapi_get_netmask(int sock, const char *ifname, struct in_addr *addr);
int wapi_set_netmask(int sock, const char *ifname, const struct in_addr *addr);
/****************************************************************************
* Name: wapi_get_routes
*
* Description:
* Parses routing table rows from WAPI_PROC_NET_ROUTE.
*
* Input Parameters:
* list - Pushes collected wapi_route_info_t into this list.
*
****************************************************************************/
int wapi_get_routes(wapi_list_t * list);
/****************************************************************************
* Name: wapi_add_route_gw
*
@ -572,19 +556,6 @@ int wapi_set_txpower(int sock, FAR const char *ifname, int power,
int wapi_make_socket(void);
/****************************************************************************
* Name: wapi_get_ifnames
*
* Description:
* Parses WAPI_PROC_NET_WIRELESS.
*
* Returned Value:
* list Pushes collected wapi_string_t into this list.
*
****************************************************************************/
int wapi_get_ifnames(FAR wapi_list_t *list);
/****************************************************************************
* Name: wapi_scan_init
*