2017-04-10 21:28:32 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* apps/include/wireless/wapi.h
|
|
|
|
*
|
2019-12-31 17:57:34 +01:00
|
|
|
* Copyright (C) 2017, 2019 Gregory Nutt. All rights reserved.
|
2017-04-11 00:02:17 +02:00
|
|
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
|
|
*
|
2020-10-19 05:14:35 +02:00
|
|
|
* Adapted for NuttX from WAPI:
|
2017-04-11 00:02:17 +02:00
|
|
|
*
|
|
|
|
* Copyright (c) 2010, Volkan YAZICI <volkan.yazici@gmail.com>
|
|
|
|
* All rights reserved.
|
2017-04-10 21:28:32 +02:00
|
|
|
*
|
2017-05-06 17:40:09 +02:00
|
|
|
* And includes WPA supplicant logic contributed by:
|
|
|
|
*
|
|
|
|
* Author: Simon Piriou <spiriou31@gmail.com>
|
2017-04-10 21:28:32 +02:00
|
|
|
*
|
2017-05-06 17:40:09 +02:00
|
|
|
* Which was adapted to NuttX from driver_ext.h
|
2017-04-10 21:28:32 +02:00
|
|
|
*
|
2017-05-06 17:40:09 +02:00
|
|
|
* Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>
|
2017-04-10 21:28:32 +02:00
|
|
|
*
|
2017-05-06 17:40:09 +02:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
|
|
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
|
|
* used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
2017-04-10 21:28:32 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __APPS_INCLUDE_WIRELESS_WAPI_H
|
|
|
|
#define __APPS_INCLUDE_WIRELESS_WAPI_H
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <net/ethernet.h>
|
2017-04-10 22:57:33 +02:00
|
|
|
#include <nuttx/wireless/wireless.h>
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Pre-processor Definitions
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* Maximum allowed ESSID size. */
|
|
|
|
|
|
|
|
#define WAPI_ESSID_MAX_SIZE IW_ESSID_MAX_SIZE
|
|
|
|
|
|
|
|
/* Buffer size while reading lines from PROC_NET_ files. */
|
|
|
|
|
|
|
|
#define WAPI_PROC_LINE_SIZE 1024
|
|
|
|
|
2020-02-24 04:31:38 +01:00
|
|
|
#ifndef CONFIG_WIRELESS_WAPI_INITCONF
|
|
|
|
# define wapi_load_config(ifname, confname, conf) NULL
|
|
|
|
# define wapi_unload_config(load)
|
|
|
|
# define wapi_save_config(ifname, confname, conf) 0
|
2017-05-06 17:40:09 +02:00
|
|
|
#endif
|
|
|
|
|
2017-04-10 21:28:32 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Types
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* Frequency flags. */
|
|
|
|
|
2017-05-06 17:40:09 +02:00
|
|
|
enum wapi_freq_flag_e
|
2017-04-10 21:28:32 +02:00
|
|
|
{
|
2017-04-10 22:57:33 +02:00
|
|
|
WAPI_FREQ_AUTO = IW_FREQ_AUTO,
|
2017-04-10 21:28:32 +02:00
|
|
|
WAPI_FREQ_FIXED = IW_FREQ_FIXED
|
2017-05-06 17:40:09 +02:00
|
|
|
};
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/* Route target types. */
|
|
|
|
|
2017-05-06 17:40:09 +02:00
|
|
|
enum wapi_route_target_e
|
2017-04-10 21:28:32 +02:00
|
|
|
{
|
|
|
|
WAPI_ROUTE_TARGET_NET, /* The target is a network. */
|
|
|
|
WAPI_ROUTE_TARGET_HOST /* The target is a host. */
|
2017-05-06 17:40:09 +02:00
|
|
|
};
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/* ESSID flags. */
|
|
|
|
|
2017-05-06 17:40:09 +02:00
|
|
|
enum wapi_essid_flag_e
|
2017-04-10 21:28:32 +02:00
|
|
|
{
|
2021-04-09 13:02:18 +02:00
|
|
|
WAPI_ESSID_OFF = IW_ESSID_OFF,
|
|
|
|
WAPI_ESSID_ON = IW_ESSID_ON,
|
2021-01-19 09:56:20 +01:00
|
|
|
|
|
|
|
/* Extended flag "WAPI_ESSID_DELAY_ON" instructs the driver
|
|
|
|
* to delay the connection behavior of essid, so that which can accept
|
|
|
|
* more accurate information before generating a connection.
|
|
|
|
*
|
|
|
|
* About flow of wapi command, drivers that support WAPI_ESSID_DELAY_ON
|
|
|
|
* semantics will have the following behavior changes:
|
|
|
|
*
|
|
|
|
* 1. Station mode without bssid set:
|
|
|
|
*
|
|
|
|
* $ ifup wlan0
|
|
|
|
* $ wapi mode wlan0 2
|
|
|
|
* $ wapi psk wlan0 12345678 3
|
|
|
|
* $ wapi essid wlan0 archer 1
|
|
|
|
* $ renew wlan0
|
|
|
|
*
|
|
|
|
* 2. Station mode with bssid set:
|
|
|
|
*
|
|
|
|
* $ ifup wlan0
|
|
|
|
* $ wapi mode wlan0 2
|
|
|
|
* $ wapi psk wlan0 12345678 3
|
|
|
|
* $ wapi essid wlan0 archer 2 <-- WAPI_ESSID_DELAY_ON will indicate the
|
|
|
|
* $ driver delay the connection event late
|
|
|
|
* $ to bssid set (SIOCSIWAP).
|
|
|
|
* $ wapi ap wlan0 ec:41:18:e0:76:7e
|
|
|
|
* $ renew wlan0
|
|
|
|
*/
|
|
|
|
|
2021-04-09 13:02:18 +02:00
|
|
|
WAPI_ESSID_DELAY_ON = IW_ESSID_DELAY_ON
|
2017-05-06 17:40:09 +02:00
|
|
|
};
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/* Supported operation modes. */
|
|
|
|
|
2017-05-06 17:40:09 +02:00
|
|
|
enum wapi_mode_e
|
2017-04-10 21:28:32 +02:00
|
|
|
{
|
2017-04-11 18:22:47 +02:00
|
|
|
WAPI_MODE_AUTO = IW_MODE_AUTO, /* Driver decides. */
|
|
|
|
WAPI_MODE_ADHOC = IW_MODE_ADHOC, /* Single cell network. */
|
|
|
|
WAPI_MODE_MANAGED = IW_MODE_INFRA, /* Multi cell network, roaming, ... */
|
|
|
|
WAPI_MODE_MASTER = IW_MODE_MASTER, /* Synchronisation master or access point. */
|
|
|
|
WAPI_MODE_REPEAT = IW_MODE_REPEAT, /* Wireless repeater, forwarder. */
|
|
|
|
WAPI_MODE_SECOND = IW_MODE_SECOND, /* Secondary master/repeater, backup. */
|
|
|
|
WAPI_MODE_MONITOR = IW_MODE_MONITOR, /* Passive monitor, listen only. */
|
|
|
|
WAPI_MODE_MESH = IW_MODE_MESH /* Mesh (IEEE 802.11s) network */
|
2017-05-06 17:40:09 +02:00
|
|
|
};
|
|
|
|
|
2022-01-12 10:51:40 +01:00
|
|
|
/* Flags for encoding */
|
|
|
|
|
|
|
|
enum wapi_encode_e
|
|
|
|
{
|
|
|
|
WAPI_ENCODE_INDEX = IW_ENCODE_INDEX, /* Token index (if needed) */
|
|
|
|
WAPI_ENCODE_FLAGS = IW_ENCODE_FLAGS, /* Flags defined below */
|
|
|
|
WAPI_ENCODE_MODE = IW_ENCODE_MODE, /* Modes defined below */
|
|
|
|
WAPI_ENCODE_DISABLED = IW_ENCODE_DISABLED, /* Encoding disabled */
|
|
|
|
WAPI_ENCODE_ENABLED = IW_ENCODE_ENABLED, /* Encoding enabled */
|
|
|
|
WAPI_ENCODE_RESTRICTED = IW_ENCODE_RESTRICTED, /* Refuse non-encoded packets */
|
|
|
|
WAPI_ENCODE_OPEN = IW_ENCODE_OPEN, /* Accept non-encoded packets */
|
|
|
|
WAPI_ENCODE_NOKEY = IW_ENCODE_NOKEY, /* Key is write only, so not present */
|
|
|
|
WAPI_ENCODE_TEMP = IW_ENCODE_TEMP /* Temporary key */
|
|
|
|
};
|
|
|
|
|
2017-04-10 21:28:32 +02:00
|
|
|
/* Bitrate flags.
|
|
|
|
*
|
|
|
|
* At the moment, unicast (IW_BITRATE_UNICAST) and broadcast
|
|
|
|
* (IW_BITRATE_BROADCAST) bitrate flags are not supported.
|
|
|
|
*/
|
|
|
|
|
2017-05-06 17:40:09 +02:00
|
|
|
enum wapi_bitrate_flag_e
|
2017-04-10 21:28:32 +02:00
|
|
|
{
|
|
|
|
WAPI_BITRATE_AUTO,
|
|
|
|
WAPI_BITRATE_FIXED
|
2017-05-06 17:40:09 +02:00
|
|
|
};
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/* Transmit power (txpower) flags. */
|
|
|
|
|
2017-05-06 17:40:09 +02:00
|
|
|
enum wapi_txpower_flag_e
|
2017-04-10 21:28:32 +02:00
|
|
|
{
|
|
|
|
WAPI_TXPOWER_DBM, /* Value is in dBm. */
|
|
|
|
WAPI_TXPOWER_MWATT, /* Value is in mW. */
|
|
|
|
WAPI_TXPOWER_RELATIVE /* Value is in arbitrary units. */
|
2017-05-06 17:40:09 +02:00
|
|
|
};
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/* Linked list container for strings. */
|
|
|
|
|
2017-05-06 17:40:09 +02:00
|
|
|
struct wapi_string_s
|
2017-04-10 21:28:32 +02:00
|
|
|
{
|
2017-05-06 17:40:09 +02:00
|
|
|
FAR struct wapi_string_s *next;
|
2017-04-10 21:28:32 +02:00
|
|
|
FAR char *data;
|
2017-05-06 17:40:09 +02:00
|
|
|
};
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/* Linked list container for scan results. */
|
|
|
|
|
2017-05-06 17:40:09 +02:00
|
|
|
struct wapi_scan_info_s
|
2017-04-10 21:28:32 +02:00
|
|
|
{
|
2017-05-06 17:40:09 +02:00
|
|
|
FAR struct wapi_scan_info_s *next;
|
2017-04-10 21:28:32 +02:00
|
|
|
struct ether_addr ap;
|
|
|
|
int has_essid;
|
|
|
|
char essid[WAPI_ESSID_MAX_SIZE + 1];
|
2017-05-06 17:40:09 +02:00
|
|
|
enum wapi_essid_flag_e essid_flag;
|
2017-04-10 21:28:32 +02:00
|
|
|
int has_freq;
|
|
|
|
double freq;
|
|
|
|
int has_mode;
|
2017-05-06 17:40:09 +02:00
|
|
|
enum wapi_mode_e mode;
|
2017-04-10 21:28:32 +02:00
|
|
|
int has_bitrate;
|
|
|
|
int bitrate;
|
2019-12-26 10:37:12 +01:00
|
|
|
int has_rssi;
|
|
|
|
int rssi;
|
2022-01-12 10:51:40 +01:00
|
|
|
int has_encode;
|
|
|
|
int encode;
|
2017-05-06 17:40:09 +02:00
|
|
|
};
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/* Linked list container for routing table rows. */
|
|
|
|
|
2017-05-06 17:40:09 +02:00
|
|
|
struct wapi_route_info_s
|
2017-04-10 21:28:32 +02:00
|
|
|
{
|
2017-05-06 17:40:09 +02:00
|
|
|
FAR struct wapi_route_info_s *next;
|
2017-04-10 21:28:32 +02:00
|
|
|
FAR char *ifname;
|
|
|
|
struct in_addr dest;
|
|
|
|
struct in_addr gw;
|
|
|
|
|
2019-12-31 17:57:34 +01:00
|
|
|
unsigned int flags; /* See RTF_* in net/route.h for available values. */
|
2017-04-10 21:28:32 +02:00
|
|
|
unsigned int refcnt;
|
|
|
|
unsigned int use;
|
|
|
|
unsigned int metric;
|
|
|
|
struct in_addr netmask;
|
|
|
|
unsigned int mtu;
|
|
|
|
unsigned int window;
|
|
|
|
unsigned int irtt;
|
2017-05-06 17:40:09 +02:00
|
|
|
};
|
2017-04-10 21:28:32 +02:00
|
|
|
|
2017-05-06 17:40:09 +02:00
|
|
|
/* A generic linked list container. For functions taking struct wapi_list_s
|
2020-02-23 05:51:44 +01:00
|
|
|
* type of argument, caller is responsible for releasing allocated memory.
|
2017-04-10 21:28:32 +02:00
|
|
|
*/
|
|
|
|
|
2017-05-06 17:40:09 +02:00
|
|
|
struct wapi_list_s
|
2017-04-10 21:28:32 +02:00
|
|
|
{
|
|
|
|
union wapi_list_head_t
|
|
|
|
{
|
2017-05-06 17:40:09 +02:00
|
|
|
FAR struct wapi_string_s *string;
|
|
|
|
FAR struct wapi_scan_info_s *scan;
|
|
|
|
FAR struct wapi_route_info_s *route;
|
2017-04-10 21:28:32 +02:00
|
|
|
} head;
|
|
|
|
};
|
|
|
|
|
2017-05-06 19:28:11 +02:00
|
|
|
/* WPA **********************************************************************/
|
|
|
|
|
|
|
|
enum wpa_alg_e
|
|
|
|
{
|
|
|
|
WPA_ALG_NONE = 0,
|
|
|
|
WPA_ALG_WEP,
|
|
|
|
WPA_ALG_TKIP,
|
|
|
|
WPA_ALG_CCMP,
|
|
|
|
WPA_ALG_IGTK,
|
|
|
|
WPA_ALG_PMK,
|
|
|
|
WPA_ALG_GCMP,
|
|
|
|
WPA_ALG_SMS4,
|
|
|
|
WPA_ALG_KRK,
|
|
|
|
WPA_ALG_GCMP_256,
|
|
|
|
WPA_ALG_CCMP_256,
|
|
|
|
WPA_ALG_BIP_GMAC_128,
|
|
|
|
WPA_ALG_BIP_GMAC_256,
|
|
|
|
WPA_ALG_BIP_CMAC_256
|
|
|
|
};
|
|
|
|
|
|
|
|
/* This structure provides the wireless configuration to
|
|
|
|
* wpa_driver_wext_associate().
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct wpa_wconfig_s
|
|
|
|
{
|
2022-06-13 13:08:54 +02:00
|
|
|
enum wapi_mode_e sta_mode; /* Mode of operation, e.g. IW_MODE_INFRA */
|
2017-05-06 19:28:11 +02:00
|
|
|
uint8_t auth_wpa; /* IW_AUTH_WPA_VERSION values, e.g.
|
|
|
|
* IW_AUTH_WPA_VERSION_WPA2 */
|
|
|
|
uint8_t cipher_mode; /* IW_AUTH_PAIRWISE_CIPHER and
|
|
|
|
* IW_AUTH_GROUP_CIPHER values, e.g.,
|
|
|
|
* IW_AUTH_CIPHER_CCMP */
|
2022-04-13 08:26:26 +02:00
|
|
|
enum wpa_alg_e alg; /* See enum wpa_alg_e above, e.g.
|
2017-05-06 19:28:11 +02:00
|
|
|
* WPA_ALG_CCMP */
|
2020-09-18 05:43:00 +02:00
|
|
|
double freq; /* Channel frequency */
|
|
|
|
enum wapi_freq_flag_e flag; /* Channel frequency flag */
|
2017-05-06 19:28:11 +02:00
|
|
|
uint8_t ssidlen; /* Length of the SSID */
|
|
|
|
uint8_t phraselen; /* Length of the passphrase */
|
|
|
|
FAR const char *ifname; /* E.g., "wlan0" */
|
2020-02-19 13:50:02 +01:00
|
|
|
FAR const char *ssid; /* E.g., "myApSSID" */
|
2020-09-02 04:49:52 +02:00
|
|
|
FAR const char *bssid; /* Options to associate with bssid */
|
2020-02-19 13:50:02 +01:00
|
|
|
FAR const char *passphrase; /* E.g., "mySSIDpassphrase" */
|
2017-05-06 19:28:11 +02:00
|
|
|
};
|
|
|
|
|
2022-05-14 12:40:53 +02:00
|
|
|
/* COEX *********************************************************************/
|
|
|
|
|
|
|
|
enum wapi_pta_prio_e
|
|
|
|
{
|
|
|
|
WAPI_PTA_PRIORITY_COEX_MAXIMIZED = IW_PTA_PRIORITY_COEX_MAXIMIZED,
|
|
|
|
WAPI_PTA_PRIORITY_COEX_HIGH = IW_PTA_PRIORITY_COEX_HIGH,
|
|
|
|
WAPI_PTA_PRIORITY_BALANCED = IW_PTA_PRIORITY_BALANCED,
|
|
|
|
WAPI_PTA_PRIORITY_WLAN_HIGHD = IW_PTA_PRIORITY_WLAN_HIGH,
|
|
|
|
WAPI_PTA_PRIORITY_WLAN_MAXIMIZED = IW_PTA_PRIORITY_WLAN_MAXIMIZED
|
|
|
|
};
|
|
|
|
|
2017-04-10 21:28:32 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Data
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#define EXTERN extern "C"
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#else
|
|
|
|
#define EXTERN extern
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Frequency flag names. */
|
|
|
|
|
|
|
|
EXTERN FAR const char *g_wapi_freq_flags[];
|
|
|
|
|
|
|
|
/* ESSID flag names. */
|
|
|
|
|
|
|
|
EXTERN FAR const char *g_wapi_essid_flags[];
|
|
|
|
|
2020-01-16 19:21:45 +01:00
|
|
|
/* Passphrase algorithm flag names. */
|
|
|
|
|
|
|
|
EXTERN FAR const char *g_wapi_alg_flags[];
|
|
|
|
|
2017-04-10 21:28:32 +02:00
|
|
|
/* Supported operation mode names. */
|
|
|
|
|
|
|
|
EXTERN FAR const char *g_wapi_modes[];
|
|
|
|
|
|
|
|
/* Bitrate flag names. */
|
|
|
|
|
|
|
|
EXTERN FAR const char *g_wapi_bitrate_flags[];
|
|
|
|
|
|
|
|
/* Transmit power flag names. */
|
|
|
|
|
|
|
|
EXTERN FAR const char *g_wapi_txpower_flags[];
|
|
|
|
|
2022-05-14 12:40:53 +02:00
|
|
|
/* PTA priority flag names. */
|
|
|
|
|
|
|
|
EXTERN FAR const char *g_wapi_pta_prio_flags[];
|
|
|
|
|
2017-04-10 21:28:32 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Function Prototyppes
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_get_ifup
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Gets the interface up status.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* is_up Set to 0, if up; 1, otherwise.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-05-06 19:28:11 +02:00
|
|
|
int wapi_get_ifup(int sock, FAR const char *ifname, FAR int *is_up);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_set_ifup
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Activates the interface.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-05-06 19:28:11 +02:00
|
|
|
int wapi_set_ifup(int sock, FAR const char *ifname);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_set_ifdown
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Shuts down the interface.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-05-06 19:28:11 +02:00
|
|
|
int wapi_set_ifdown(int sock, FAR const char *ifname);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_get_ip
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Gets IP address of the given network interface.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-05-06 19:28:11 +02:00
|
|
|
int wapi_get_ip(int sock, FAR const char *ifname, struct in_addr *addr);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_set_ip
|
|
|
|
*
|
|
|
|
* Description:
|
2020-02-22 19:52:12 +01:00
|
|
|
* Sets IP address of the given network interface.
|
2017-04-10 21:28:32 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-05-06 19:28:11 +02:00
|
|
|
int wapi_set_ip(int sock, FAR const char *ifname,
|
|
|
|
FAR const struct in_addr *addr);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_get_netmask
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Gets netmask of the given network interface.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-05-06 19:28:11 +02:00
|
|
|
int wapi_get_netmask(int sock, FAR const char *ifname,
|
|
|
|
FAR struct in_addr *addr);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_set_netmask
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Sets netmask of the given network interface.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-05-06 19:28:11 +02:00
|
|
|
int wapi_set_netmask(int sock, FAR const char *ifname,
|
|
|
|
FAR const struct in_addr *addr);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_add_route_gw
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Adds gateway for the given target network.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-04-10 22:57:33 +02:00
|
|
|
#ifdef CONFIG_NET_ROUTE
|
2017-05-06 17:40:09 +02:00
|
|
|
int wapi_add_route_gw(int sock, enum wapi_route_target_e targettype,
|
2017-04-10 21:28:32 +02:00
|
|
|
FAR const struct in_addr *target,
|
|
|
|
FAR const struct in_addr *netmask,
|
|
|
|
FAR const struct in_addr *gw);
|
2017-04-10 22:57:33 +02:00
|
|
|
#endif
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_del_route_gw
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Deletes gateway for the given target network.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-04-10 22:57:33 +02:00
|
|
|
#ifdef CONFIG_NET_ROUTE
|
2017-05-06 17:40:09 +02:00
|
|
|
int wapi_del_route_gw(int sock, enum wapi_route_target_e targettype,
|
2017-04-10 21:28:32 +02:00
|
|
|
FAR const struct in_addr *target,
|
|
|
|
FAR const struct in_addr *netmask,
|
|
|
|
FAR const struct in_addr *gw);
|
2017-04-10 22:57:33 +02:00
|
|
|
#endif
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_get_freq
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Gets the operating frequency of the device.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_get_freq(int sock, FAR const char *ifname, FAR double *freq,
|
2017-05-06 17:40:09 +02:00
|
|
|
FAR enum wapi_freq_flag_e *flag);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_set_freq
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Sets the operating frequency of the device.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-04-10 22:57:33 +02:00
|
|
|
int wapi_set_freq(int sock, FAR const char *ifname, double freq,
|
2017-05-06 17:40:09 +02:00
|
|
|
enum wapi_freq_flag_e flag);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_freq2chan
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Finds corresponding channel for the supplied freq.
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* 0, on success; -2, if not found; otherwise, ioctl() return value.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_freq2chan(int sock, FAR const char *ifname, double freq,
|
|
|
|
FAR int *chan);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_chan2freq
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Finds corresponding frequency for the supplied chan.
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* 0, on success; -2, if not found; otherwise, ioctl() return value.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_chan2freq(int sock, FAR const char *ifname, int chan,
|
|
|
|
FAR double *freq);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_get_essid
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Gets ESSID of the device.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* essid - Used to store the ESSID of the device. Buffer must have
|
|
|
|
* enough space to store WAPI_ESSID_MAX_SIZE+1 characters.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_get_essid(int sock, FAR const char *ifname, FAR char *essid,
|
2017-05-06 17:40:09 +02:00
|
|
|
FAR enum wapi_essid_flag_e *flag);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_set_essid
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Sets ESSID of the device.
|
|
|
|
*
|
|
|
|
* essid At most WAPI_ESSID_MAX_SIZE characters are read.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_set_essid(int sock, FAR const char *ifname, FAR const char *essid,
|
2017-05-06 17:40:09 +02:00
|
|
|
enum wapi_essid_flag_e flag);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_get_mode
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Gets the operating mode of the device.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2019-12-31 17:57:34 +01:00
|
|
|
int wapi_get_mode(int sock, FAR const char *ifname,
|
|
|
|
FAR enum wapi_mode_e *mode);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_set_mode
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Sets the operating mode of the device.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-05-06 17:40:09 +02:00
|
|
|
int wapi_set_mode(int sock, FAR const char *ifname, enum wapi_mode_e mode);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_make_broad_ether
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Creates an ethernet broadcast address.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_make_broad_ether(FAR struct ether_addr *sa);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_make_null_ether
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Creates an ethernet NULL address.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_make_null_ether(FAR struct ether_addr *sa);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_get_ap
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Gets access point address of the device.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* ap - Set the to MAC address of the device. (For "any", a broadcast
|
|
|
|
* ethernet address; for "off", a null ethernet address is used.)
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_get_ap(int sock, FAR const char *ifname, FAR struct ether_addr *ap);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_set_ap
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Sets access point address of the device.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_set_ap(int sock, FAR const char *ifname,
|
|
|
|
FAR const struct ether_addr *ap);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_get_bitrate
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Gets bitrate of the device.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_get_bitrate(int sock, FAR const char *ifname,
|
2017-05-06 17:40:09 +02:00
|
|
|
FAR int *bitrate, FAR enum wapi_bitrate_flag_e *flag);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_set_bitrate
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Sets bitrate of the device.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_set_bitrate(int sock, FAR const char *ifname, int bitrate,
|
2017-05-06 17:40:09 +02:00
|
|
|
enum wapi_bitrate_flag_e flag);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_dbm2mwatt
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Converts a value in dBm to a value in milliWatt.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_dbm2mwatt(int dbm);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_mwatt2dbm
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Converts a value in milliWatt to a value in dBm.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_mwatt2dbm(int mwatt);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_get_txpower
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Gets txpower of the device.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_get_txpower(int sock, FAR const char *ifname, FAR int *power,
|
2017-05-06 17:40:09 +02:00
|
|
|
FAR enum wapi_txpower_flag_e *flag);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_set_txpower
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Sets txpower of the device.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_set_txpower(int sock, FAR const char *ifname, int power,
|
2017-05-06 17:40:09 +02:00
|
|
|
enum wapi_txpower_flag_e flag);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_make_socket
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Creates an AF_INET socket to be used in ioctl() calls.
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* Non-negative on success.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_make_socket(void);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_scan_init
|
|
|
|
*
|
|
|
|
* Description:
|
2019-12-31 17:57:34 +01:00
|
|
|
* Starts a scan on the given interface. Root privileges are required to
|
|
|
|
* start a scan.
|
2017-04-10 21:28:32 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2020-04-03 07:07:58 +02:00
|
|
|
int wapi_scan_init(int sock, FAR const char *ifname, FAR const char *essid);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
2020-09-02 13:37:21 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_scan_channel_init
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Starts a scan on the given interface. Root privileges are required to
|
|
|
|
* start a scan with specified channels.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_scan_channel_init(int sock, FAR const char *ifname,
|
|
|
|
FAR const char *essid,
|
|
|
|
uint8_t *channels, int num_channels);
|
|
|
|
|
2017-04-10 21:28:32 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_scan_stat
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Checks the status of the scan process.
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* Zero, if data is ready; 1, if data is not ready; negative on failure.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_scan_stat(int sock, FAR const char *ifname);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_scan_coll
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Collects the results of a scan process.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
2017-05-06 17:40:09 +02:00
|
|
|
* aps - Pushes collected struct wapi_scan_info_s into this list.
|
2017-04-10 21:28:32 +02:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2019-12-31 17:57:34 +01:00
|
|
|
int wapi_scan_coll(int sock, FAR const char *ifname,
|
|
|
|
FAR struct wapi_list_s *aps);
|
2017-05-06 17:40:09 +02:00
|
|
|
|
2020-04-03 07:07:58 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_scan_coll_free
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Free the scan results.
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* aps - Release the collected struct wapi_scan_info_s.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
void wapi_scan_coll_free(FAR struct wapi_list_s *aps);
|
|
|
|
|
2021-01-04 10:53:19 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_set_country
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Set the country code
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_set_country(int sock, FAR const char *ifname,
|
|
|
|
FAR const char *country);
|
|
|
|
|
2022-06-23 08:44:38 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_get_country
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Get the country code
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_get_country(int sock, FAR const char *ifname,
|
|
|
|
FAR char *country);
|
|
|
|
|
2020-11-09 10:00:12 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_get_sensitivity
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Get the wlan Sensitivity
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_get_sensitivity(int sock, FAR const char *ifname,
|
|
|
|
FAR int *sense);
|
|
|
|
|
2020-02-24 04:31:38 +01:00
|
|
|
#ifdef CONFIG_WIRELESS_WAPI_INITCONF
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_load_config
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* Return a pointer to the hold the config resource, NULL On error.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
FAR void *wapi_load_config(FAR const char *ifname,
|
|
|
|
FAR const char *confname,
|
|
|
|
FAR struct wpa_wconfig_s *conf);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_unload_config
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* load - Config resource handler, allocate by wapi_load_config()
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
void wapi_unload_config(FAR void *load);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_save_config
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_save_config(FAR const char *ifname,
|
|
|
|
FAR const char *confname,
|
|
|
|
FAR const struct wpa_wconfig_s *conf);
|
|
|
|
#endif
|
|
|
|
|
2019-12-31 17:57:34 +01:00
|
|
|
/****************************************************************************
|
2017-05-06 17:40:09 +02:00
|
|
|
* Name: wpa_driver_wext_set_key_ext
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* sockfd - Opened network socket
|
|
|
|
* ifname - Interface name
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
*
|
2019-12-31 17:57:34 +01:00
|
|
|
****************************************************************************/
|
2017-05-06 17:40:09 +02:00
|
|
|
|
2019-12-31 17:57:34 +01:00
|
|
|
int wpa_driver_wext_set_key_ext(int sockfd, FAR const char *ifname,
|
2020-02-19 13:50:02 +01:00
|
|
|
enum wpa_alg_e alg, FAR const char *key,
|
2019-12-31 17:57:34 +01:00
|
|
|
size_t key_len);
|
2017-05-06 17:40:09 +02:00
|
|
|
|
2020-04-03 07:22:28 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: wpa_driver_wext_get_key_ext
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
* sockfd - Opened network socket
|
|
|
|
* ifname - Interface name
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wpa_driver_wext_get_key_ext(int sockfd, FAR const char *ifname,
|
|
|
|
enum wpa_alg_e *alg, FAR char *key,
|
|
|
|
size_t *req_len);
|
|
|
|
|
2019-12-31 17:57:34 +01:00
|
|
|
/****************************************************************************
|
2017-05-06 17:40:09 +02:00
|
|
|
* Name: wpa_driver_wext_associate
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
2017-05-06 19:28:11 +02:00
|
|
|
* wconfig - Describes the wireless configuration.
|
2017-05-06 17:40:09 +02:00
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
*
|
2019-12-31 17:57:34 +01:00
|
|
|
****************************************************************************/
|
2017-05-06 17:40:09 +02:00
|
|
|
|
2017-05-06 19:28:11 +02:00
|
|
|
int wpa_driver_wext_associate(FAR struct wpa_wconfig_s *wconfig);
|
2017-05-06 17:40:09 +02:00
|
|
|
|
2019-12-31 17:57:34 +01:00
|
|
|
/****************************************************************************
|
2017-05-06 17:40:09 +02:00
|
|
|
* Name: wpa_driver_wext_set_auth_param
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
*
|
2019-12-31 17:57:34 +01:00
|
|
|
****************************************************************************/
|
2017-05-06 17:40:09 +02:00
|
|
|
|
2017-05-06 19:28:11 +02:00
|
|
|
int wpa_driver_wext_set_auth_param(int sockfd, FAR const char *ifname,
|
2017-05-06 17:40:09 +02:00
|
|
|
int idx, uint32_t value);
|
2017-04-10 21:28:32 +02:00
|
|
|
|
2020-04-03 07:22:28 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: wpa_driver_wext_get_auth_param
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wpa_driver_wext_get_auth_param(int sockfd, FAR const char *ifname,
|
|
|
|
int idx, uint32_t *value);
|
|
|
|
|
2020-01-16 19:21:45 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: wpa_driver_wext_disconnect
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
*
|
|
|
|
* Input Parameters:
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
void wpa_driver_wext_disconnect(int sockfd, FAR const char *ifname);
|
|
|
|
|
2022-05-14 12:40:53 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_set_pta_prio
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Sets the pta priority of the device.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_set_pta_prio(int sock, FAR const char *ifname,
|
|
|
|
enum wapi_pta_prio_e pta_prio);
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: wapi_get_pta_prio
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Gets the pta priority of the device.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
int wapi_get_pta_prio(int sock, FAR const char *ifname,
|
|
|
|
enum wapi_pta_prio_e *pta_prio);
|
|
|
|
|
2017-04-10 21:28:32 +02:00
|
|
|
#undef EXTERN
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __APPS_INCLUDE_WIRELESS_WAPI_H */
|