Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 1 | /* |
Duy Truong | d48aa31 | 2013-02-10 02:16:54 -0800 | [diff] [blame] | 2 | * Copyright (c) 2010, The Linux Foundation. All rights reserved. |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 3 | |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions are |
| 6 | * met: |
| 7 | * * Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * * Redistributions in binary form must reproduce the above |
| 10 | * copyright notice, this list of conditions and the following |
| 11 | * disclaimer in the documentation and/or other materials provided |
| 12 | * with the distribution. |
Duy Truong | d48aa31 | 2013-02-10 02:16:54 -0800 | [diff] [blame] | 13 | * * Neither the name of The Linux Foundation nor the names of its |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 14 | * contributors may be used to endorse or promote products derived |
| 15 | * from this software without specific prior written permission. |
| 16 | |
| 17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | */ |
| 29 | |
| 30 | |
| 31 | #ifndef _QSAP_API_H_ |
| 32 | #define _QSAP_API_H_ |
| 33 | |
| 34 | #if __cplusplus |
| 35 | extern "C" { |
| 36 | #endif |
Purushottam Kushwaha | a49496a | 2017-05-30 14:34:37 +0530 | [diff] [blame] | 37 | #include <android/log.h> |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 38 | typedef unsigned char u8; |
| 39 | typedef char s8; |
| 40 | typedef unsigned short int u16; |
| 41 | typedef signed short int s16; |
Ravi Joshi | 9b8ed11 | 2014-04-02 14:52:40 -0700 | [diff] [blame] | 42 | typedef unsigned int u32; |
| 43 | typedef signed int s32; |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 44 | |
| 45 | /** Success and error messages */ |
| 46 | #define SUCCESS "success" |
| 47 | #define ERR_INVALID_ARG "failure invalid arguments" |
| 48 | #define ERR_INVALID_PARAM "failure invalid parameter" |
| 49 | #define ERR_UNKNOWN "failure unknown error" |
| 50 | #define ERR_INVALIDCMD "failure invalid command" |
| 51 | #define ERR_INVALIDREQ "failure invalid request" |
| 52 | #define ERR_FEATURE_NOT_ENABLED "failure feature not enabled" |
| 53 | #define ERR_NOT_SUPPORTED "failure not supported" |
| 54 | #define ERR_NOT_READY "failure not ready" |
| 55 | #define ERR_RES_UNAVAILABLE "failure resource unavailable" |
| 56 | #define ERR_SOFTAP_NOT_STARTED "failure softap not started" |
| 57 | |
| 58 | /** Error numbers used with the SDK */ |
| 59 | enum error_val { |
| 60 | eERR_UNKNOWN = -1, |
| 61 | eSUCCESS = 0, |
| 62 | eERR_STOP_BSS, |
| 63 | eERR_BSS_NOT_STARTED, |
| 64 | eERR_COMMIT, |
| 65 | eERR_START_SAP, |
| 66 | eERR_STOP_SAP, |
| 67 | eERR_RELOAD_SAP, |
| 68 | eERR_FILE_OPEN, |
| 69 | eERR_CONF_FILE, |
| 70 | eERR_INVALID_MAC_ADDR, |
| 71 | eERR_SEND_TO_HOSTAPD, |
| 72 | eERR_CONFIG_PARAM_MISSING, |
| 73 | eERR_CHAN_READ, |
| 74 | eERR_FEATURE_NOT_ENABLED, |
| 75 | eERR_UNLOAD_FAILED_SDIO, |
| 76 | eERR_UNLOAD_FAILED_SOFTAP, |
| 77 | eERR_LOAD_FAILED_SDIOIF, |
Deepthi Gowri | 684d2f9 | 2012-05-23 23:28:16 +0530 | [diff] [blame] | 78 | eERR_LOAD_FAILED_SOFTAP, |
Deepthi Gowri | 6ce5756 | 2012-06-27 01:18:15 +0530 | [diff] [blame] | 79 | eERR_SET_CHAN_RANGE, |
| 80 | eERR_GET_AUTO_CHAN |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 81 | }; |
| 82 | |
Deepthi Gowri | ae5a4f7 | 2012-01-31 19:39:06 +0530 | [diff] [blame] | 83 | #ifndef WIFI_DRIVER_CONF_FILE |
| 84 | #define WIFI_DRIVER_CONF_FILE NULL |
| 85 | #endif |
| 86 | |
| 87 | #ifndef WIFI_DRIVER_DEF_CONF_FILE |
| 88 | #define WIFI_DRIVER_DEF_CONF_FILE NULL |
| 89 | #endif |
| 90 | |
Ajit Vaishya | a21d265 | 2017-07-04 21:32:27 +0530 | [diff] [blame] | 91 | /** Configuration file name for SAP+SAP*/ |
Purushottam Kushwaha | 9283d3e | 2018-05-12 20:21:53 +0530 | [diff] [blame] | 92 | #define CONFIG_FILE_2G "/data/vendor/wifi/hostapd/hostapd_dual2g.conf" |
| 93 | #define CONFIG_FILE_5G "/data/vendor/wifi/hostapd/hostapd_dual5g.conf" |
Dedy Lansky | a2dd08f | 2019-11-10 13:58:58 +0200 | [diff] [blame] | 94 | #define CONFIG_FILE_60G "/data/vendor/wifi/hostapd/hostapd_60g.conf" |
Ajit Vaishya | a21d265 | 2017-07-04 21:32:27 +0530 | [diff] [blame] | 95 | |
Hu Wang | d855500 | 2018-12-06 18:13:00 +0800 | [diff] [blame] | 96 | /** Configuration file name for OWE-transition */ |
| 97 | #define CONFIG_FILE_OWE "/data/vendor/wifi/hostapd/hostapd_owe.conf" |
| 98 | |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 99 | /** Configuration file name */ |
Purushottam Kushwaha | 9283d3e | 2018-05-12 20:21:53 +0530 | [diff] [blame] | 100 | #define CONFIG_FILE "/data/vendor/wifi/hostapd/hostapd.conf" |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 101 | |
| 102 | /** Default configuration file path */ |
Abhishek Srivastava | 2443024 | 2019-03-04 14:26:55 +0530 | [diff] [blame] | 103 | #define DEFAULT_CONFIG_FILE_PATH "/vendor/etc/hostapd/hostapd_default.conf" |
Deepthi Gowri | 80a36e2 | 2012-10-16 18:33:51 +0530 | [diff] [blame] | 104 | |
| 105 | /** Default Accept list file name */ |
Abhishek Srivastava | 2443024 | 2019-03-04 14:26:55 +0530 | [diff] [blame] | 106 | #define DEFAULT_ACCEPT_LIST_FILE_PATH "/vendor/etc/hostapd/hostapd.accept" |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 107 | |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 108 | /** Accept list file name */ |
Purushottam Kushwaha | 9283d3e | 2018-05-12 20:21:53 +0530 | [diff] [blame] | 109 | #define ACCEPT_LIST_FILE "/data/vendor/wifi/hostapd/hostapd.accept" |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 110 | |
Deepthi Gowri | 80a36e2 | 2012-10-16 18:33:51 +0530 | [diff] [blame] | 111 | /** Default Deny list file name */ |
Abhishek Srivastava | 2443024 | 2019-03-04 14:26:55 +0530 | [diff] [blame] | 112 | #define DEFAULT_DENY_LIST_FILE_PATH "/vendor/etc/hostapd/hostapd.deny" |
Deepthi Gowri | 80a36e2 | 2012-10-16 18:33:51 +0530 | [diff] [blame] | 113 | |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 114 | /** Deny list file name */ |
Purushottam Kushwaha | 9283d3e | 2018-05-12 20:21:53 +0530 | [diff] [blame] | 115 | #define DENY_LIST_FILE "/data/vendor/wifi/hostapd/hostapd.deny" |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 116 | |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 117 | /** Default Ini file */ |
| 118 | #define DEFAULT_INI_FILE "/persist/qcom/softap/qcom_cfg_default.ini" |
| 119 | |
| 120 | /** SDK control interface path */ |
Purushottam Kushwaha | 9283d3e | 2018-05-12 20:21:53 +0530 | [diff] [blame] | 121 | #define SDK_CTRL_IF "/data/vendor/wifi/hostapd/ctrl/softap_sdk_ctrl" |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 122 | |
| 123 | /** Maximum length of the line in the configuration file */ |
| 124 | #define MAX_CONF_LINE_LEN (156) |
| 125 | |
| 126 | /** MAC address length in acsii string format*/ |
| 127 | #define MAC_ADDR_LEN (17) |
| 128 | |
| 129 | /** MAC address length, as integer */ |
| 130 | #define MAC_ADDR_LEN_INT (6) |
| 131 | /** Maximum number of MAC address in the allow / deny MAC list */ |
| 132 | #define MAX_ALLOWED_MAC (15) |
| 133 | |
| 134 | /** Maximum length of the file path */ |
| 135 | #define MAX_FILE_PATH_LEN (128) |
| 136 | |
| 137 | /** WPS key length - 8 digit key, usually*/ |
| 138 | #define WPS_KEY_LEN (8) |
| 139 | |
| 140 | /** Maximum length of the SSID */ |
| 141 | #define SSD_MAX_LEN (32) |
Santosh Sajjan | c463f73 | 2011-12-22 18:24:56 +0530 | [diff] [blame] | 142 | #define CTRY_MAX_LEN (3) |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 143 | |
| 144 | /** Beacon interval 50 to 65535 */ |
| 145 | #define BCN_INTERVAL_MIN (1) |
| 146 | #define BCN_INTERVAL_MAX (65535) |
| 147 | |
| 148 | /** Passphrase max length 63 bytes, Minumum lenght is 8. |
| 149 | * NOTE: If Passphrase length is 64, then phassphrase is treated as PSK. |
| 150 | */ |
| 151 | #define PASSPHRASE_MIN (8) |
| 152 | #define PASSPHRASE_MAX (63) |
| 153 | |
| 154 | /** DTIM period 1 to 255 -- Qualcomm 10 */ |
| 155 | #define DTIM_PERIOD_MIN (1) |
| 156 | #define DTIM_PERIOD_MAX (255) |
| 157 | |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 158 | /** WEP key lengths in ASCII and hex */ |
| 159 | #define WEP_64_KEY_ASCII (5) |
| 160 | #define WEP_64_KEY_HEX (10) |
| 161 | |
| 162 | #define WEP_128_KEY_ASCII (13) |
| 163 | #define WEP_128_KEY_HEX (26) |
| 164 | |
| 165 | #define WEP_152_KEY_ASCII (16) |
| 166 | #define WEP_152_KEY_HEX (32) |
| 167 | |
| 168 | #define WPS_PIN_LEN (8) |
| 169 | |
| 170 | #define CHANNEL_MIN (0) |
| 171 | #define CHANNEL_MAX (14) |
| 172 | #define AUTO_CHANNEL (0) |
| 173 | #define BG_MAX_CHANNEL (11) |
| 174 | |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 175 | /** Fragmentation threshold 256 to 2346 */ |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 176 | #define FRAG_THRESHOLD_MIN (256) |
| 177 | #define FRAG_THRESHOLD_MAX (2346) |
| 178 | |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 179 | /** RTS threshold 1 to 2347 */ |
| 180 | #define RTS_THRESHOLD_MIN (1) |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 181 | #define RTS_THRESHOLD_MAX (2347) |
| 182 | |
| 183 | #define MIN_UUID_LEN (1) |
| 184 | #define MAX_UUID_LEN (36) |
| 185 | |
| 186 | #define MIN_DEVICENAME_LEN (1) |
| 187 | #define MAX_DEVICENAME_LEN (32) |
| 188 | |
| 189 | #define MIN_MANUFACTURER_LEN (1) |
| 190 | #define MAX_MANUFACTURER_LEN (64) |
| 191 | |
| 192 | #define MIN_MODELNAME_LEN (1) |
| 193 | #define MAX_MODELNAME_LEN (32) |
| 194 | |
| 195 | #define MIN_MODELNUM_LEN (1) |
| 196 | #define MAX_MODELNUM_LEN (32) |
| 197 | |
| 198 | #define MIN_SERIALNUM_LEN (1) |
| 199 | #define MAX_SERIALNUM_LEN (32) |
| 200 | |
| 201 | #define MIN_DEV_TYPE_LEN (1) |
| 202 | #define MAX_DEV_TYPE_LEN (20) |
| 203 | |
| 204 | #define MIN_OS_VERSION_LEN (1) |
| 205 | #define MAX_OS_VERSION_LEN (12) |
| 206 | |
| 207 | #define MIN_FRIENDLY_NAME_LEN (1) |
| 208 | #define MAX_FRIENDLY_NAME_LEN (64) |
| 209 | |
| 210 | #define MAX_URL_LEN (128) |
| 211 | |
| 212 | #define MIN_MODEL_DESC_LEN (1) |
| 213 | #define MAX_MODEL_DESC_LEN (128) |
| 214 | |
| 215 | #define MIN_UPC_LEN (1) |
| 216 | #define MAX_UPC_LEN (128) |
| 217 | |
c_rrajiv | c160697 | 2016-06-08 13:05:12 +0530 | [diff] [blame] | 218 | #define GTK_MIN (30) |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 219 | |
| 220 | #define MAX_INT_STR (8) |
| 221 | |
| 222 | /** Tx Power range 2dBm to 18 dBm */ |
| 223 | #define MIN_TX_POWER (2) |
| 224 | #define MAX_TX_POWER (30) |
| 225 | |
| 226 | /** Data rate index */ |
| 227 | #define MIN_DATA_RATE_IDX (0) |
| 228 | #define MAX_DATA_RATE_IDX (28) |
| 229 | #define AUTO_DATA_RATE (0) |
| 230 | #define B_MODE_MAX_DATA_RATE_IDX (4) |
| 231 | #define G_ONLY_MODE_MAX_DATA_RATE_IDX (12) |
| 232 | |
| 233 | /** parameters for read config */ |
| 234 | #define GET_COMMENTED_VALUE 1 |
| 235 | #define GET_ENABLED_ONLY 0 |
| 236 | |
| 237 | #define MAX_RESP_LEN 255 |
| 238 | |
| 239 | /** AP shutoff time */ |
| 240 | #define AP_SHUTOFF_MIN (0) |
| 241 | #define AP_SHUTOFF_MAX (120) |
| 242 | |
| 243 | /** AP shutoff time */ |
| 244 | #define AP_ENERGY_DETECT_TH_MIN (0) |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 245 | #define AP_ENERGY_DETECT_TH_MAX (9) |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 246 | |
| 247 | /** command request index - in the array Cmd_req[] */ |
| 248 | enum eCmd_req { |
| 249 | eCMD_GET = 0, |
| 250 | eCMD_SET = 1, |
| 251 | |
| 252 | eCMD_REQ_LAST |
| 253 | }; |
| 254 | |
Ajit Vaishya | a21d265 | 2017-07-04 21:32:27 +0530 | [diff] [blame] | 255 | /** config request index - in the array Conf_req[] */ |
| 256 | enum eConf_req { |
| 257 | CONF_2g = 0, |
| 258 | CONF_5g = 1, |
Hu Wang | d855500 | 2018-12-06 18:13:00 +0800 | [diff] [blame] | 259 | CONF_owe = 2, |
Dedy Lansky | a2dd08f | 2019-11-10 13:58:58 +0200 | [diff] [blame] | 260 | CONF_60g = 3, |
Ajit Vaishya | a21d265 | 2017-07-04 21:32:27 +0530 | [diff] [blame] | 261 | |
| 262 | CONF_REQ_LAST |
| 263 | }; |
| 264 | |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 265 | /** |
| 266 | * Command numbers, these numbers form the index into the array of |
| 267 | * command names stored in the 'cmd_list'. |
| 268 | * |
| 269 | * Warning: An addtion of an entry in 'esap_cmd', should be followed |
| 270 | * by an addition of a command name string in the 'cmd_list' array |
| 271 | */ |
| 272 | typedef enum esap_cmd { |
| 273 | eCMD_INVALID = -1, |
| 274 | eCMD_SSID = 0, |
| 275 | eCMD_BSSID = 1, |
| 276 | eCMD_CHAN = 2, |
| 277 | eCMD_BCN_INTERVAL = 3, |
| 278 | eCMD_DTIM_PERIOD = 4, |
| 279 | eCMD_HW_MODE = 5, |
| 280 | eCMD_AUTH_ALGS = 6, |
| 281 | eCMD_SEC_MODE = 7, |
| 282 | eCMD_WEP_KEY0 = 8, |
| 283 | eCMD_WEP_KEY1 = 9, |
| 284 | eCMD_WEP_KEY2 = 10, |
| 285 | eCMD_WEP_KEY3 = 11, |
| 286 | eCMD_DEFAULT_KEY = 12, |
| 287 | eCMD_PASSPHRASE = 13, |
| 288 | eCMD_WPA_PAIRWISE = 14, |
| 289 | eCMD_RSN_PAIRWISE = 15, |
| 290 | eCMD_MAC_ADDR = 16, |
| 291 | eCMD_RESET_AP = 17, |
| 292 | eCMD_MAC_ACL = 18, |
| 293 | eCMD_ADD_TO_ALLOW = 19, |
| 294 | eCMD_ADD_TO_DENY = 20, |
| 295 | eCMD_REMOVE_FROM_ALLOW = 21, |
| 296 | eCMD_REMOVE_FROM_DENY = 22, |
| 297 | eCMD_ALLOW_LIST = 23, |
| 298 | eCMD_DENY_LIST = 24, |
| 299 | eCMD_COMMIT = 25, |
| 300 | eCMD_ENABLE_SOFTAP = 26, |
| 301 | eCMD_DISASSOC_STA = 27, |
| 302 | eCMD_RESET_TO_DEFAULT = 28, |
| 303 | eCMD_PROTECTION_FLAG = 29, |
| 304 | eCMD_DATA_RATES = 30, |
| 305 | eCMD_ASSOC_STA_MACS = 31, |
| 306 | eCMD_TX_POWER = 32, |
| 307 | eCMD_SDK_VERSION = 33, |
| 308 | eCMD_WMM_STATE = 34, |
| 309 | |
| 310 | /** WARNING: The order of WPS commands should not be altered. |
| 311 | New commands SHOULD be added above or below this */ |
| 312 | eCMD_WPS_STATE = 35, |
| 313 | eCMD_WPS_CONFIG_METHOD = 36, |
| 314 | eCMD_UUID = 37, |
| 315 | eCMD_DEVICE_NAME = 38, |
| 316 | eCMD_MANUFACTURER = 39, |
| 317 | eCMD_MODEL_NAME = 40, |
| 318 | eCMD_MODEL_NUMBER = 41, |
| 319 | eCMD_SERIAL_NUMBER = 42, |
| 320 | eCMD_DEVICE_TYPE = 43, |
| 321 | eCMD_OS_VERSION = 44, |
| 322 | eCMD_FRIENDLY_NAME = 45, |
| 323 | eCMD_MANUFACTURER_URL = 46, |
| 324 | eCMD_MODEL_DESC = 47, |
| 325 | eCMD_MODEL_URL = 48, |
| 326 | eCMD_UPC = 49, |
| 327 | /******************************************************/ |
| 328 | |
| 329 | eCMD_FRAG_THRESHOLD = 50, |
| 330 | eCMD_RTS_THRESHOLD = 51, |
| 331 | eCMD_GTK_TIMEOUT = 52, |
| 332 | eCMD_COUNTRY_CODE = 53, |
| 333 | eCMD_INTRA_BSS_FORWARD = 54, |
| 334 | eCMD_REGULATORY_DOMAIN = 55, |
| 335 | eCMD_AP_STATISTICS = 56, |
| 336 | eCMD_AP_AUTOSHUTOFF = 57, |
| 337 | eCMD_AP_ENERGY_DETECT_TH = 58, |
Santosh Sajjan | c463f73 | 2011-12-22 18:24:56 +0530 | [diff] [blame] | 338 | eCMD_BASIC_RATES = 59, |
| 339 | eCMD_REQUIRE_HT = 60, |
| 340 | eCMD_IEEE80211N = 61, |
Deepthi Gowri | 684d2f9 | 2012-05-23 23:28:16 +0530 | [diff] [blame] | 341 | eCMD_SET_CHANNEL_RANGE = 62, |
Deepthi Gowri | 6ce5756 | 2012-06-27 01:18:15 +0530 | [diff] [blame] | 342 | eCMD_GET_AUTO_CHANNEL = 63, |
Chet Lanctot | 4c15b56 | 2013-07-25 11:02:06 -0700 | [diff] [blame] | 343 | eCMD_IEEE80211W = 64, |
Chet Lanctot | 7a2827f | 2013-09-09 17:48:58 -0700 | [diff] [blame] | 344 | eCMD_WPA_KEY_MGMT = 65, |
Changzhi Deng | fddc6be | 2015-05-21 15:47:07 +0800 | [diff] [blame] | 345 | eCMD_SET_MAX_CLIENTS = 66, |
Manikandan Mohan | e1bfb73 | 2015-08-18 16:30:11 -0700 | [diff] [blame] | 346 | eCMD_IEEE80211AC = 67, |
| 347 | eCMD_VHT_OPER_CH_WIDTH = 68, |
| 348 | eCMD_ACS_CHAN_LIST = 69, |
| 349 | eCMD_HT_CAPAB = 70, |
Pradeep Reddy POTTETI | 5c1a3ab | 2016-01-07 20:01:40 +0530 | [diff] [blame] | 350 | eCMD_IEEE80211H = 71, |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 351 | |
Dedy Lansky | 350c353 | 2016-05-16 11:54:10 +0300 | [diff] [blame] | 352 | eCMD_ENABLE_WIGIG_SOFTAP = 72, |
Nalla Kartheek | f4eef25 | 2016-04-29 18:09:35 +0530 | [diff] [blame] | 353 | eCMD_INTERFACE = 73, |
Purushottam Kushwaha | a7c3aa8 | 2017-07-21 22:03:58 +0530 | [diff] [blame] | 354 | eCMD_SSID2 = 74, |
| 355 | eCMD_BRIDGE = 75, |
Ajit Vaishya | 8c3357c | 2017-08-11 16:52:38 +0530 | [diff] [blame] | 356 | eCMD_CTRL_INTERFACE = 76, |
Ajit Vaishya | 3f87532 | 2017-08-14 22:31:29 +0530 | [diff] [blame] | 357 | eCMD_VENDOR_ELEMENT = 77, |
| 358 | eCMD_ASSOCRESP_ELEMENT = 78, |
Purushottam Kushwaha | 68e7248 | 2018-08-20 12:18:04 +0530 | [diff] [blame] | 359 | eCMD_ACS_EXCLUDE_DFS = 79, |
Abhishek Srivastava | b44cdad | 2018-10-23 19:18:50 +0530 | [diff] [blame] | 360 | eCMD_WOWLAN_TRIGGERS = 80, |
| 361 | eCMD_ACCEPT_MAC_FILE = 81, |
| 362 | eCMD_DENY_MAC_FILE = 82, |
Hu Wang | aa4c6ca | 2018-11-26 18:26:00 +0800 | [diff] [blame] | 363 | eCMD_OWE_TRANS_IFNAME = 83, |
Hu Wang | 62ae34e | 2019-01-31 10:26:14 +0800 | [diff] [blame] | 364 | eCMD_SAE_REQUIRE_MPF = 84, |
Dedy Lansky | 350c353 | 2016-05-16 11:54:10 +0300 | [diff] [blame] | 365 | |
Dedy Lansky | a2dd08f | 2019-11-10 13:58:58 +0200 | [diff] [blame] | 366 | eCMD_IEEE80211AX = 85, |
| 367 | |
Alexei Avshalom Lazar | 1b6053c | 2019-11-14 11:33:49 +0200 | [diff] [blame] | 368 | eCMD_ENABLE_EDMG = 86, |
| 369 | eCMD_EDMG_CHANNEL = 87, |
| 370 | |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 371 | eCMD_LAST /** New command numbers should be added above this */ |
| 372 | } esap_cmd_t; |
| 373 | |
| 374 | /** non-commands */ |
| 375 | typedef enum esap_str { |
| 376 | STR_WPA = 0, |
| 377 | STR_ACCEPT_MAC_FILE = 1, |
| 378 | STR_DENY_MAC_FILE = 2, |
| 379 | STR_MAC_IN_INI = 3, |
| 380 | STR_PROT_FLAG_IN_INI = 4, |
| 381 | STR_DATA_RATE_IN_INI = 5, |
| 382 | STR_TX_POWER_IN_INI = 6, |
| 383 | STR_FRAG_THRESHOLD_IN_INI = 7, |
| 384 | STR_RTS_THRESHOLD_IN_INI = 8, |
| 385 | STR_COUNTRY_CODE_IN_INI = 9, |
| 386 | STR_INTRA_BSS_FORWARD_IN_INI = 10, |
| 387 | STR_WMM_IN_INI = 11, |
| 388 | STR_802DOT11D_IN_INI = 12, |
| 389 | STR_HT_80211N = 13, |
| 390 | STR_CTRL_INTERFACE = 14, |
| 391 | STR_INTERFACE = 15, |
| 392 | STR_EAP_SERVER = 16, |
| 393 | STR_AP_AUTOSHUTOFF = 17, |
| 394 | STR_AP_ENERGY_DETECT_TH = 18, |
| 395 | eSTR_LAST |
| 396 | } esap_str_t; |
| 397 | |
| 398 | /** Supported security mode */ |
| 399 | typedef enum sec_mode { |
| 400 | SEC_MODE_NONE = 0, |
| 401 | SEC_MODE_WEP = 1, |
| 402 | SEC_MODE_WPA_PSK = 2, |
| 403 | SEC_MODE_WPA2_PSK = 3, |
| 404 | SEC_MODE_WPA_WPA2_PSK = 4, |
| 405 | |
| 406 | SEC_MODE_INVALID |
| 407 | } sec_mode_t; |
| 408 | |
| 409 | /** security mode in the configuration file */ |
| 410 | enum wpa_in_conf_file { |
| 411 | WPA_IN_CONF_FILE = 1, |
| 412 | WPA2_IN_CONF_FILE = 2, |
| 413 | WPA_WPA2_IN_CONF_FILE = 3 |
| 414 | }; |
| 415 | |
| 416 | enum { |
| 417 | DISABLE = 0, |
| 418 | ENABLE = 1 |
| 419 | }; |
| 420 | |
| 421 | enum { |
| 422 | FALSE = 0, |
| 423 | TRUE = 1 |
| 424 | }; |
| 425 | |
| 426 | /** IEEE 802.11 operating mode */ |
| 427 | enum oper_mode { |
| 428 | HW_MODE_B = 0, |
| 429 | HW_MODE_G = 1, |
| 430 | HW_MODE_N = 2, |
| 431 | HW_MODE_G_ONLY = 3, |
| 432 | HW_MODE_N_ONLY = 4, |
Santosh Sajjan | c463f73 | 2011-12-22 18:24:56 +0530 | [diff] [blame] | 433 | HW_MODE_A = 5, |
Purushottam Kushwaha | 2ef0af2 | 2018-05-31 13:32:10 +0530 | [diff] [blame] | 434 | HW_MODE_ANY = 6, |
Dedy Lansky | 59c014f | 2019-08-08 09:58:36 +0300 | [diff] [blame] | 435 | HW_MODE_AD = 7, |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 436 | |
| 437 | HW_MODE_UNKNOWN |
| 438 | }; |
| 439 | |
| 440 | /** Authentication algorithm */ |
| 441 | enum auth_alg { |
| 442 | AHTH_ALG_OPEN = 1, |
| 443 | AUTH_ALG_SHARED = 2, |
| 444 | AUTH_ALG_OPEN_SHARED = 3, |
| 445 | |
| 446 | AUTH_ALG_INVALID |
| 447 | }; |
| 448 | |
| 449 | /** Allow or Deny MAC address list selection */ |
| 450 | enum macaddr_acl { |
| 451 | ACL_DENY_LIST = 0, |
Sameer Thalappil | caf8792 | 2012-01-30 16:56:29 -0800 | [diff] [blame] | 452 | ACL_ALLOW_LIST = 1, |
| 453 | ACL_ALLOW_AND_DENY_LIST = 2 |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 454 | }; |
| 455 | |
| 456 | enum ap_reset { |
| 457 | SAP_RESET_BSS = 0, |
| 458 | SAP_RESET_DRIVER_BSS = 1, |
| 459 | SAP_STOP_BSS = 2, |
| 460 | SAP_STOP_DRIVER_BSS = 3, |
Sameer Thalappil | caf8792 | 2012-01-30 16:56:29 -0800 | [diff] [blame] | 461 | #ifdef QCOM_WLAN_CONCURRENCY |
| 462 | SAP_INITAP = 4, |
| 463 | SAP_EXITAP = 5, |
| 464 | #endif |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 465 | SAP_RESET_INVALID |
| 466 | }; |
| 467 | |
| 468 | enum wmm_state { |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 469 | WMM_AUTO_IN_INI = 0, |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 470 | WMM_ENABLED_IN_INI = 1, |
| 471 | WMM_DISABLED_IN_INI = 2 |
| 472 | }; |
| 473 | |
| 474 | enum wps_state { |
| 475 | WPS_STATE_DISABLE = 0, |
| 476 | WPS_STATE_ENABLE = 2 |
| 477 | }; |
| 478 | |
| 479 | |
| 480 | enum wps_config { |
| 481 | WPS_CONFIG_PBC = 0, |
| 482 | WPS_CONFIG_PIN = 1, |
| 483 | }; |
| 484 | |
| 485 | /** Choose the configuration file */ |
| 486 | enum eChoose_conf_file { |
Santosh Sajjan | 47e3a84 | 2011-12-10 21:11:12 +0530 | [diff] [blame] | 487 | HOSTAPD_CONF_QCOM_FILE = 0, |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 488 | INI_CONF_FILE = 1 |
| 489 | }; |
| 490 | |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 491 | struct Command |
| 492 | { |
| 493 | s8 * name; |
| 494 | s8 * default_value; |
| 495 | }; |
| 496 | |
Deepthi Gowri | 684d2f9 | 2012-05-23 23:28:16 +0530 | [diff] [blame] | 497 | /** STA Channel information*/ |
| 498 | typedef struct sta_channel_info { |
| 499 | int subioctl; |
| 500 | int stastartchan; |
| 501 | int staendchan; |
| 502 | int staband; |
| 503 | } sta_channel_info; |
| 504 | |
| 505 | /**SAP Channel information*/ |
| 506 | typedef struct sap_channel_info { |
| 507 | int startchan; |
| 508 | int endchan; |
| 509 | int band; |
| 510 | } sap_channel_info; |
| 511 | |
Deepthi Gowri | 6ce5756 | 2012-06-27 01:18:15 +0530 | [diff] [blame] | 512 | /**SAP auto Channel information*/ |
| 513 | typedef struct sap_auto_channel_info { |
| 514 | int subioctl; |
| 515 | } sap_auto_channel_info; |
| 516 | |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 517 | /** Validate enable / disable softap */ |
| 518 | #define IS_VALID_SOFTAP_ENABLE(x) (((value == ENABLE) || (value == DISABLE)) ? TRUE: FALSE) |
| 519 | |
| 520 | /** Validate the channel */ |
| 521 | #define IS_VALID_CHANNEL(x) ((value >= CHANNEL_MIN) && (value <= CHANNEL_MAX) ? TRUE : FALSE) |
| 522 | |
| 523 | /** Validate the security mode */ |
| 524 | #define IS_VALID_SEC_MODE(x) (((x >= SEC_MODE_NONE) && (x < SEC_MODE_INVALID)) ? TRUE : FALSE) |
| 525 | |
| 526 | /** Validate the selection of access or deny MAC address list */ |
Sameer Thalappil | caf8792 | 2012-01-30 16:56:29 -0800 | [diff] [blame] | 527 | #define IS_VALID_MAC_ACL(x) (((x==ACL_DENY_LIST) || (x==ACL_ALLOW_LIST) || (x==ACL_ALLOW_AND_DENY_LIST)) ? TRUE : FALSE) |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 528 | |
| 529 | /** Validate the broadcast SSID status */ |
| 530 | #define IS_VALID_BSSID(x) (((value == ENABLE) || (value == DISABLE)) ? TRUE: FALSE) |
| 531 | |
| 532 | /** Validate the length of the passphrase */ |
Abhishek Srivastava | 8006498 | 2017-08-03 19:05:17 +0530 | [diff] [blame] | 533 | #define IS_VALID_PASSPHRASE_LEN(x) ((((x >= PASSPHRASE_MIN) && (x <= PASSPHRASE_MAX)) || (x == 0)) ? TRUE: FALSE) |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 534 | |
| 535 | /** Validate the beacon interval */ |
| 536 | #define IS_VALID_BEACON(x) (((x >= BCN_INTERVAL_MIN) && (x <= BCN_INTERVAL_MAX)) ? TRUE: FALSE) |
| 537 | |
| 538 | /** Validate the DTIM period */ |
| 539 | #define IS_VALID_DTIM_PERIOD(x) (((x >= DTIM_PERIOD_MIN) && (x <= DTIM_PERIOD_MAX)) ? TRUE: FALSE) |
| 540 | |
| 541 | /** Validate the WEP index */ |
| 542 | #define IS_VALID_WEP_KEY_IDX(x) ((x >= 0) && (x < 4) ? TRUE : FALSE) |
| 543 | |
| 544 | /** Validate the pairwise encryption */ |
| 545 | #define IS_VALID_PAIRWISE(x) (((!strcmp(x, "TKIP")) || (!strcmp(x, "CCMP")) || \ |
Dedy Lansky | 59c014f | 2019-08-08 09:58:36 +0300 | [diff] [blame] | 546 | (!strcmp(x, "TKIP CCMP")) || (!strcmp(x, "CCMP TKIP")) || (!strcmp(x, "GCMP"))) ? TRUE : FALSE) |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 547 | |
| 548 | /** Validate the WMM status */ |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 549 | #define IS_VALID_WMM_STATE(x) (((x >= WMM_AUTO_IN_INI) && (x <= WMM_DISABLED_IN_INI)) ? TRUE: FALSE) |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 550 | |
| 551 | /** Validate the WPS status */ |
| 552 | #define IS_VALID_WPS_STATE(x) (((x == ENABLE) || (x == DISABLE)) ? TRUE: FALSE) |
| 553 | |
| 554 | /** Validate the fragmentation threshold */ |
| 555 | #define IS_VALID_FRAG_THRESHOLD(x) (((x >= FRAG_THRESHOLD_MIN) && (x <= FRAG_THRESHOLD_MAX)) ? TRUE: FALSE) |
| 556 | |
| 557 | /** Validate the RTS threshold value */ |
| 558 | #define IS_VALID_RTS_THRESHOLD(x) (((x >= RTS_THRESHOLD_MIN) && (x <= RTS_THRESHOLD_MAX)) ? TRUE: FALSE) |
| 559 | |
| 560 | /** Validate the GTK */ |
| 561 | #define IS_VALID_GTK(x) ((x >= GTK_MIN) ? TRUE: FALSE) |
| 562 | |
| 563 | /** Validate the intra-bss forwarding status */ |
| 564 | #define IS_VALID_INTRA_BSS_STATUS(x) (((x == ENABLE) || (x == DISABLE)) ? TRUE: FALSE) |
| 565 | |
| 566 | /** Validate the protection flag */ |
| 567 | #define IS_VALID_PROTECTION(x) (((x == ENABLE) || (x == DISABLE)) ? TRUE: FALSE) |
| 568 | |
| 569 | /** Validate the UUID length */ |
| 570 | #define IS_VALID_UUID_LEN(x) (((x >= MIN_UUID_LEN) && (x <= MAX_UUID_LEN)) ? TRUE : FALSE) |
| 571 | |
| 572 | /** Validate the device name length */ |
| 573 | #define IS_VALID_DEVICENAME_LEN(x) (((x >= MIN_DEVICENAME_LEN) && (x <= MAX_DEVICENAME_LEN)) ? TRUE : FALSE) |
| 574 | |
| 575 | /** Validate the Manufacturer length */ |
| 576 | #define IS_VALID_MANUFACTURER_LEN(x) (((x >= MIN_MANUFACTURER_LEN) && (x <= MAX_MANUFACTURER_LEN)) ? TRUE : FALSE) |
| 577 | |
| 578 | /** Validate the Model name length */ |
| 579 | #define IS_VALID_MODELNAME_LEN(x) (((x >= MIN_MODELNAME_LEN) && (x <= MAX_MODELNAME_LEN)) ? TRUE : FALSE) |
| 580 | |
| 581 | /** Validate the Model number length */ |
| 582 | #define IS_VALID_MODELNUM_LEN(x) (((x >= MIN_MODELNUM_LEN) && (x <= MAX_MODELNUM_LEN)) ? TRUE : FALSE) |
| 583 | |
| 584 | /** Validate the Model serial number length */ |
| 585 | #define IS_VALID_SERIALNUM_LEN(x) (((x >= MIN_SERIALNUM_LEN) && (x <= MAX_SERIALNUM_LEN)) ? TRUE : FALSE) |
| 586 | |
| 587 | /** Validate the Primary device type length */ |
| 588 | #define IS_VALID_DEV_TYPE_LEN(x) (((x >= MIN_DEV_TYPE_LEN) && (x <= MAX_DEV_TYPE_LEN)) ? TRUE : FALSE) |
| 589 | |
| 590 | /** Validate the OS version length */ |
| 591 | #define IS_VALID_OS_VERSION_LEN(x) (((x >= MIN_OS_VERSION_LEN) && (x <= MAX_OS_VERSION_LEN)) ? TRUE : FALSE) |
| 592 | |
| 593 | /** Validate the friendly name length */ |
| 594 | #define IS_VALID_FRIENDLY_NAME_LEN(x) (((x >= MIN_FRIENDLY_NAME_LEN) && (x <= MAX_FRIENDLY_NAME_LEN)) ? TRUE : FALSE) |
| 595 | |
| 596 | /** Validate the URL length */ |
| 597 | #define IS_VALID_URL_LEN(x) (((x > 0) && (x <= MAX_URL_LEN)) ? TRUE : FALSE) |
| 598 | |
| 599 | /** Validate the model description length */ |
| 600 | #define IS_VALID_MODEL_DESC_LEN(x) (((x > MIN_MODEL_DESC_LEN) && (x <= MAX_MODEL_DESC_LEN)) ? TRUE : FALSE) |
| 601 | |
| 602 | /** Validate the Universal Product Code (UPC) length */ |
| 603 | #define IS_VALID_UPC_LEN(x) (((x > MIN_UPC_LEN) && (x <= MAX_UPC_LEN)) ? TRUE : FALSE) |
| 604 | |
| 605 | /** Validate the Tx power index */ |
| 606 | #define IS_VALID_TX_POWER(x) (((x >= MIN_TX_POWER ) && (x <= MAX_TX_POWER)) ? TRUE : FALSE) |
| 607 | |
| 608 | /** Validate the Data rate */ |
| 609 | #define IS_VALID_DATA_RATE_IDX(x) (((x >= MIN_DATA_RATE_IDX) && (x <= MAX_DATA_RATE_IDX)) ? TRUE : FALSE ) |
| 610 | |
| 611 | /** Validate WPS config */ |
| 612 | #define IS_VALID_WPS_CONFIG(x) (((x == WPS_CONFIG_PBC) || (x == WPS_CONFIG_PIN)) ? TRUE : FALSE) |
| 613 | |
| 614 | /** Validate the 802dot11d state */ |
| 615 | #define IS_VALID_802DOT11D_STATE(x) (((x == ENABLE) || (x == DISABLE)) ? TRUE: FALSE) |
| 616 | |
| 617 | /** Validate the AP shutoff time */ |
| 618 | #define IS_VALID_APSHUTOFFTIME(x) (((x >= AP_SHUTOFF_MIN) && (x <= AP_SHUTOFF_MAX)) ? TRUE : FALSE) |
| 619 | |
| 620 | /** Validate the AP shutoff time */ |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 621 | #define IS_VALID_ENERGY_DETECT_TH(x) ((((x >= AP_ENERGY_DETECT_TH_MIN) && (x <= AP_ENERGY_DETECT_TH_MAX)) ||( x == 128)) ? TRUE : FALSE) |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 622 | |
Pradeep Reddy POTTETI | 5c1a3ab | 2016-01-07 20:01:40 +0530 | [diff] [blame] | 623 | /** Validate the 802dot11h state */ |
| 624 | #define IS_VALID_DFS_STATE(x) (((x == ENABLE) || (x == DISABLE)) ? TRUE: FALSE) |
| 625 | |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 626 | /** Function declartion */ |
c_rrajiv | e629e82 | 2015-07-20 15:21:20 +0530 | [diff] [blame] | 627 | int qsap_hostd_exec(int argc, char ** argv); |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 628 | void qsap_hostd_exec_cmd(s8 *pcmd, s8 *presp, u32 *plen); |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 629 | s8 *qsap_get_config_value(s8 *pfile, struct Command *pcmd, s8 *pbuf, u32 *plen); |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 630 | int qsapsetSoftap(int argc, char *argv[]); |
Nalla Kartheek | f4eef25 | 2016-04-29 18:09:35 +0530 | [diff] [blame] | 631 | int qsap_add_or_remove_interface(const char *iface_name, int create_iface); |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 632 | void qsap_del_ctrl_iface(void); |
Raj Kushwaha | ae27f82 | 2010-11-14 17:47:11 -0800 | [diff] [blame] | 633 | s16 wifi_qsap_reset_to_default(s8 *pcfgfile, s8 *pdefault); |
| 634 | void check_for_configuration_files(void); |
Yunsen Wang | 458db7c | 2011-11-15 21:23:32 -0800 | [diff] [blame] | 635 | void qsap_set_ini_filename(void); |
Deepthi Gowri | 684d2f9 | 2012-05-23 23:28:16 +0530 | [diff] [blame] | 636 | int qsap_set_channel_range(s8 * cmd); |
Deepthi Gowri | 6ce5756 | 2012-06-27 01:18:15 +0530 | [diff] [blame] | 637 | int qsap_get_sap_auto_channel_slection(s32 *pautochan); |
Mingcheng Zhu | 69b91cc | 2013-11-23 00:37:03 -0800 | [diff] [blame] | 638 | int qsap_get_mode(s32 *pmode); |
Hamad Kadmany | 421ce6f | 2016-06-12 12:24:38 +0300 | [diff] [blame] | 639 | int qsap_prepare_softap(void); |
| 640 | int qsap_unprepare_softap(void); |
| 641 | int qsap_is_fst_enabled(void); |
Ajit Vaishya | 5d72c3a | 2017-07-15 20:22:10 +0530 | [diff] [blame] | 642 | int qsap_control_bridge(int argc, char ** argv); |
Purushottam Kushwaha | 0e5ec06 | 2017-07-21 22:11:45 +0530 | [diff] [blame] | 643 | int linux_get_ifhwaddr(const char *ifname, char *addr); |
Raj Kushwaha | 4102721 | 2010-10-13 00:11:12 -0700 | [diff] [blame] | 644 | |
| 645 | #if __cplusplus |
| 646 | }; // extern "C" |
| 647 | #endif |
| 648 | |
| 649 | #endif |
| 650 | |