Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
AnjaneeDevi Kapparapu | 24b52ff | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
Gopichand Nakkala | 9c070ad | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 20 | */ |
AnjaneeDevi Kapparapu | 24b52ff | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 21 | |
Gopichand Nakkala | 9c070ad | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 22 | /* |
AnjaneeDevi Kapparapu | 24b52ff | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | /* |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 29 | * File: $File: //depot/software/projects/feature_branches/gen5_phase1/os/linux/classic/ap/apps/include/aniErrors.h $ |
| 30 | * |
| 31 | * Contains definitions of error codes that are globally visible |
| 32 | * across WNI applications. There are two kinds of error codes: |
| 33 | * generic error codes and module specific error codes. Module specific |
| 34 | * error codes can further be of two kinds: those that are used |
| 35 | * internally within sub-modules, and those that are made visible |
| 36 | * to other modules. Each module will be pre-allocated a range of |
| 37 | * negative integers from which to choose both internal and external |
| 38 | * error codes uniquely. Note that internally used error codes need |
| 39 | * not be defined in this file so long as they adhere to the allocated |
| 40 | * range. |
| 41 | * |
| 42 | * Author: Mayank D. Upadhyay |
| 43 | * Date: 17-June-2002 |
| 44 | * History:- |
| 45 | * Date Modified by Modification Information |
| 46 | * ------------------------------------------------------ |
| 47 | * |
| 48 | */ |
| 49 | |
| 50 | #ifndef _ANI_ERRORS_H_ |
| 51 | #define _ANI_ERRORS_H_ |
| 52 | |
| 53 | /** |
| 54 | * Indicates that the function returned successfully and no error was |
| 55 | * reported. |
| 56 | */ |
| 57 | #define ANI_OK 0 |
| 58 | #define ANI_ERROR ANI_E_FAILED |
| 59 | |
| 60 | /** |
| 61 | * The range -1 to -1024 is reserved for generic error codes that are |
| 62 | * applicable to all modules. |
| 63 | */ |
| 64 | |
| 65 | #define ANI_E_FAILED -1 /// Generic error code for failure |
| 66 | #define ANI_E_MALLOC_FAILED -2 /// Mem allocation failed |
| 67 | #define ANI_E_ILLEGAL_ARG -3 /// Function argument is illegal |
| 68 | #define ANI_E_NULL_VALUE -4 /// Encountered unexpected NULL value |
| 69 | #define ANI_E_RAND_FAILED -5 /// RNG failed |
| 70 | #define ANI_E_SHORT_PACKET -6 /// Packet is too small to contain data |
| 71 | #define ANI_E_ELEM_NOT_FND -7 /// Element not found |
| 72 | #define ANI_E_INVALID_LEN -8 /// Element has invalid Length |
| 73 | #define ANI_E_INVALID_DT -9 /// Invalid Data Type |
| 74 | #define ANI_E_TIMEOUT -10 /// Timeout occurred |
| 75 | #define ANI_E_DBM_INVALID_ID -11 /// Invalid DB id sent to server |
| 76 | #define ANI_E_DBM_KEY_NOT_FOUND -12 /// Key's mapping was not found |
| 77 | #define ANI_E_FILE_EMPTY -13 /// file empty |
| 78 | #define ANI_E_INVALID_MT -14 /// Invalid ANI message type |
| 79 | #define ANI_E_NOT_IMPLEMENTED -15 /// Feature not implemented |
| 80 | #define ANI_E_INVALID_PT -16 /// Invalid Parameter Type |
| 81 | #define ANI_E_INVALID_PV -17 /// Invalid Paramter Value |
| 82 | #define ANI_E_IPCOPEN -18 /// IPC open failed |
| 83 | #define ANI_E_IPCCONNECT -19 /// IPC connect failed |
| 84 | #define ANI_E_IPCSEND -20 /// IPC send failed |
| 85 | #define ANI_E_FILE_NOT_FOUND -21 /// file not found |
| 86 | #define ANI_E_FILE_INVALID_CONTENT -22 /// invalid file content |
| 87 | #define ANI_E_FILE_READ_FAILED -23 /// file read failed |
| 88 | |
| 89 | // ***** SSM libraries and applications use the range -1025 to -2999 ***** |
| 90 | |
| 91 | /* |
| 92 | * The range -1025 to -2048 is reserved for use by the |
| 93 | * authentication agent and its sub-modules. The sub-range -1029 to |
| 94 | * -1150 is reserved for CLI usage. |
| 95 | */ |
| 96 | #define ANI_E_RANGE_START_AAG -1025 |
| 97 | |
| 98 | // CLI Range starts here... |
| 99 | #define ANI_E_RANGE_START_AAG_CLI -1029 |
| 100 | #define ANI_E_CLI_ARG_MISSING -1029 // CLI command param missing |
| 101 | #define ANI_E_CLI_ARG_INVALID -1030 // CLI command param invalid |
| 102 | #define ANI_E_CLI_PAM_RADIUS_DB_UPDATE_FAILURE -1031 // Failure to update PAM RADIUS DB |
| 103 | #define ANI_E_CLI_AUTH_SERVER_NOT_FOUND -1032 // Auth server not found |
| 104 | #define ANI_E_CLI_SYS_INTERNAL_ERROR_PACKET_NULL -1033 // Internal error |
| 105 | #define ANI_E_CLI_INVALID_DEVICE -1034 // Invalid device |
| 106 | #define ANI_E_CLI_AUTH_SERVER_INVALID_IPADDR -1035 // Invalid IP addr |
| 107 | #define ANI_E_CLI_AUTH_ZONE_NOT_EMPTY -1036 // zone not empty |
| 108 | #define ANI_E_CLI_AUTH_ZONE_AUTH_SERVERS_NOT_COPIED -1037 // zone not copied |
| 109 | #define ANI_E_CLI_AUTH_ZONE_NAME_MISSING -1038 // zone name missing |
| 110 | #define ANI_E_CLI_AUTH_ZONE_EMPTY -1039 // zone empty |
| 111 | #define ANI_E_CLI_AUTH_ZONE_NOT_FOUND -1040 // zone not found |
| 112 | #define ANI_E_CLI_AUTH_SERVER_ARG_NOT_FOUND -1041 // Cli Auth server arg missing |
| 113 | #define ANI_E_CLI_IFNAME_ARG_NOT_FOUND -1042 // Ifname arg missing |
| 114 | #define ANI_E_CLI_KEYINDEX_ARG_NOT_FOUND -1043 // Keyindex arg missing |
| 115 | #define ANI_E_CLI_KEYLENGTH_ARG_NOT_FOUND -1044 // KeyLength arg missing |
| 116 | #define ANI_E_CLI_KEYLENGTH_ARG_INVALID -1045 // KeyLength arg invalid |
| 117 | #define ANI_E_CLI_SET_WEP_KEY_FAILED -1046 // Set Wep key failed |
| 118 | #define ANI_E_CLI_SYS_INTERNAL_ERROR -1047 // Internal error |
| 119 | #define ANI_E_CLI_OLD_PASSWORD_MISSING -1048 // Old password missing |
| 120 | #define ANI_E_CLI_NEW_PASSWORD_MISSING -1049 // New password |
| 121 | // missing |
| 122 | #define ANI_E_CLI_WEP_KEY_LEN_ERROR -1051 // key length error |
| 123 | #define ANI_E_CLI_WEP_KEY_HEX_ERROR -1052 // no hex character |
| 124 | #define ANI_E_CLI_WPA_MODES_CFG_ERROR -1053 // WPA config error |
| 125 | #define ANI_E_CLI_WEP_AND_OPEN_CFG_ERROR -1054 // WEP and open error |
| 126 | #define ANI_E_CLI_OPEN_AND_WEP_CFG_ERROR -1055 // open and WEP error |
| 127 | #define ANI_E_CLI_LEGACY_WEP_AND_OPEN_CFG_ERROR -1056 // WEP and open error |
| 128 | #define ANI_E_CLI_OPEN_AND_LEGACY_WEP_CFG_ERROR -1057 // open and WEP error |
| 129 | #define ANI_E_CLI_WPA_MODES_NOT_AVAILABLE -1058 // WPA modes not active |
| 130 | #define ANI_E_CLI_INVALID_LISENCE_KEY -1059 // invalid license |
| 131 | #define ANI_E_CLI_EXISTING_LISENCE_KEY -1060 // duplicated license |
| 132 | #define ANI_E_CLI_WEP_INVALID_LENGTH_CHANGE -1061 // invalid length change |
| 133 | #define ANI_E_CLI_CNF_PASSWORD_MISMATCH -1062 // confirm password mismatch |
| 134 | #define ANI_E_CLI_INVALID_DISABLE -1063 // cannot disable all sec modes |
| 135 | #define ANI_E_CLI_PACKNUM_RANGE_ERROR -1064 // cannot disable all sec modes |
| 136 | #define ANI_E_CLI_IP_ADDR_INVALID -1065 // IP address invalid |
| 137 | #define ANI_E_CLI_AUTH_ZONE_NAME_INVALID -1066 // zone name invalid |
| 138 | #define ANI_E_CLI_OLD_PASSWORD_INVALID -1067 // Old password invalid |
| 139 | #define ANI_E_CLI_NO_EXT_RAD_ON_NONSECP -1068 // Cannot add ext auth-server on |
| 140 | // non-SEC/P with RAD proxying on |
| 141 | #define ANI_E_CLI_NO_EXT_AUTH_ZONE_ALLOWED -1069 // Cannot add ext auth-zone on |
| 142 | // with RAD proxying on |
| 143 | #define ANI_E_CLI_PORTAL_ZONE_AUTO_CONFIGURED -1070 // Cannot manage portal auth-zone |
| 144 | #define ANI_E_CLI_DEL_REQ_ON_REF_AUTH_SERVER -1071 // Cannot delete auth-server |
| 145 | // that is in a zone |
| 146 | #define ANI_E_CLI_DEL_REQ_ON_REF_AUTH_ZONE -1072 // Cannot delete auth-zone |
| 147 | // that is used by SSID |
| 148 | #define ANI_E_CLI_INVALID_INTERIM_UPDT_VALUE -1073 // Invalid Accounting interim update interval |
| 149 | #define ANI_E_RANGE_END_AAG_CLI -1199 |
| 150 | // ...CLI Range ends here |
| 151 | |
| 152 | // Non-CLI related error codes.. |
| 153 | #define ANI_E_MIC_FAILED -1200 // A MIC check failed |
| 154 | #define ANI_E_REPLAY_CHECK_FAILED -1201 // Replay Ctr mismatch |
| 155 | #define ANI_E_RADIUS_PROFILE_MISSING -1202 // User profile |
| 156 | // not found |
| 157 | #define ANI_E_AUTH_FAILED -1203 // Authentication failed |
| 158 | #define ANI_E_RADIUS_PRIV_LEVEL_MISSING -1204 // ANI_ADMIN_LEVEL is missing |
| 159 | #define ANI_E_RADIUS_PRIV_LEVEL_INCORRECT -1205 // ANI_ADMIN_LEVEL is incorrect |
| 160 | |
| 161 | // For some reason this is not contiguous with the other error codes(???) |
| 162 | #define ANI_E_INVALID_COOKIE -1300 // Invalid cookie |
| 163 | |
| 164 | #define ANI_E_RANGE_END_AAG -2048 |
| 165 | |
| 166 | /* |
| 167 | * The range -2049 to -2148 is reserved for use by the |
| 168 | * RADIUS client side library. |
| 169 | */ |
| 170 | #define ANI_E_RANGE_START_RAD -2049 |
| 171 | #define ANI_E_RAD_FAILED -2049 /// RADIUS operation failed |
| 172 | #define ANI_E_RAD_ATTR_TOO_LONG -2050 /// Attribute too long |
| 173 | #define ANI_E_RAD_UNSOLICITED_RESP -2051 /// Unsolicited response |
| 174 | #define ANI_E_RAD_BAD_RESP_AUTH -2052 /// Response auth check failed |
| 175 | #define ANI_E_RAD_BAD_MESSG_AUTH -2053 /// Response signature invalid |
| 176 | #define ANI_E_RAD_ATTR_NOT_FOUND -2054 /// Requested attr not found |
| 177 | #define ANI_E_RAD_TIMEOUT -2055 /// Request timed out waiting for server |
| 178 | #define ANI_E_RAD_REJECT -2056 /// Radius server did not accept user |
| 179 | #define ANI_E_RANGE_END_RAD -2148 |
| 180 | |
| 181 | /* |
| 182 | * The range -2149 to -2999 is reserved for use by the SSM library. |
| 183 | */ |
| 184 | #define ANI_E_RANGE_START_SSM -2149 |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 185 | #define ANI_E_SSM_CERT_UNPARSEABLE (ANI_E_RANGE_START_SSM - 1) |
| 186 | #define ANI_E_SSM_CERT_EXPIRED (ANI_E_RANGE_START_SSM - 2) |
| 187 | #define ANI_E_SSM_CERT_THUMBPRINT_MISMATCH (ANI_E_RANGE_START_SSM - 3) |
| 188 | #define ANI_E_SSM_CERT_NEW_ID (ANI_E_RANGE_START_SSM - 4) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 189 | #define ANI_E_RANGE_END_SSM -2999 |
| 190 | |
| 191 | /* |
| 192 | * The range -3000 to -3500 is reserved for use by the |
| 193 | * NetSim Server, Client, Client Modules and Pseudo driver |
| 194 | */ |
| 195 | #define ANI_E_RANGE_START_NETSIM -3000 |
| 196 | #define ANI_E_RANGE_END_NETSIM -3500 |
| 197 | |
| 198 | /* |
| 199 | * The range -3501 to -4000 is reserved for use by the |
| 200 | * Discovery Server and its libraries. |
| 201 | */ |
| 202 | #define ANI_E_RANGE_START_DISC -3501 |
| 203 | #define ANI_E_RANGE_END_DISC -4000 |
| 204 | |
| 205 | /* |
| 206 | * The range -4001 to -4500 is reserved for use by the |
| 207 | * Ezcfg Server |
| 208 | */ |
| 209 | #define ANI_E_RANGE_START_EZC -4001 |
| 210 | |
| 211 | // See file aniNmpEzcSvcMsgs.h for EZC specific error codes and messages |
| 212 | #define ANI_E_RANGE_END_EZC -4500 |
| 213 | |
| 214 | /* |
| 215 | * The range -4501 to -4600 is reserved for use by the |
| 216 | * Software Download (SWD) Server |
| 217 | */ |
| 218 | #define ANI_E_RANGE_START_SWD -4501 |
| 219 | |
| 220 | // See file aniSwdSvcMsgs.h for SWD specific error codes and messages |
| 221 | #define ANI_E_RANGE_END_SWD -4600 |
| 222 | |
| 223 | /* |
| 224 | * The range -4601 to -4700 is reserved for use by the |
| 225 | * Data Distribution Service (DDS) Server |
| 226 | */ |
| 227 | #define ANI_E_RANGE_START_DDS -4601 |
| 228 | |
| 229 | // See file aniDdsSvcMsgs.h for DDS specific error codes and messages |
| 230 | #define ANI_E_RANGE_END_DDS -4700 |
| 231 | |
| 232 | /* |
| 233 | * The range -4701 to -4800 is reserved for use by |
| 234 | * HTTPS components. |
| 235 | */ |
| 236 | #define ANI_E_RANGE_START_HTTPS -4701 |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 237 | #define ANI_E_HTTPS_UNREACHABLE (ANI_E_RANGE_START_HTTPS - 0) |
| 238 | #define ANI_E_HTTPS_UNTRUSTED_CERT (ANI_E_RANGE_START_HTTPS - 1) |
| 239 | #define ANI_E_HTTPS_RECVD_ALERT (ANI_E_RANGE_START_HTTPS - 2) |
| 240 | #define ANI_E_HTTPS_FAILED (ANI_E_RANGE_START_HTTPS - 3) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 241 | #define ANI_E_RANGE_END_HTTPS -4800 |
| 242 | |
| 243 | /* |
| 244 | * The range -4801 to -4900 is reserved for use by |
| 245 | * enrollment components. |
| 246 | */ |
| 247 | #define ANI_E_RANGE_START_ENROLLMENT -4801 |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 248 | #define ANI_E_ENROLL_TP_AVAILABLE (ANI_E_RANGE_START_ENROLLMENT - 0) |
| 249 | #define ANI_E_ENROLL_ALREADY_TRUSTED (ANI_E_RANGE_START_ENROLLMENT - 1) |
| 250 | #define ANI_E_ENROLL_NOT_FOUND (ANI_E_RANGE_START_ENROLLMENT - 2) |
| 251 | #define ANI_E_ENROLL_PWD_FAILED (ANI_E_RANGE_START_ENROLLMENT - 3) |
| 252 | #define ANI_E_ENROLL_FAILED (ANI_E_RANGE_START_ENROLLMENT - 4) |
| 253 | #define ANI_E_ENROLL_NOT_PRISTINE (ANI_E_RANGE_START_ENROLLMENT - 5) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 254 | #define ANI_E_RANGE_END_ENROLLMENT -4900 |
| 255 | |
| 256 | |
| 257 | /* |
| 258 | * The range -4901 to -5000 is reserved for use by NSM. |
| 259 | */ |
| 260 | #define ANI_E_RANGE_START_NSM -4901 |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 261 | #define ANI_E_NSM_IPADDR_ASSIGNED (ANI_E_RANGE_START_NSM - 0) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 262 | #define ANI_E_RANGE_END_NSM -5000 |
| 263 | |
| 264 | /* |
| 265 | * The range -5001 to -5100 is reserved for use by the image |
| 266 | * validation library. |
| 267 | */ |
| 268 | #define ANI_E_RANGE_START_IMAGE -5001 |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 269 | #define ANI_E_IMAGE_INVALID (ANI_E_RANGE_START_IMAGE - 0) |
| 270 | #define ANI_E_IMAGE_UNSUPPORTED (ANI_E_RANGE_START_IMAGE - 1) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 271 | #define ANI_E_RANGE_END_IMAGE -5100 |
| 272 | |
| 273 | /* |
| 274 | * The range -5101 to -5200 is reserved for use by CM |
| 275 | */ |
| 276 | #define ANI_E_RANGE_START_CM -5101 |
Madan Mohan Koyyalamudi | a53c4dc | 2012-11-13 10:35:42 -0800 | [diff] [blame] | 277 | #define ANI_E_MESG_UNAVAILABLE (ANI_E_RANGE_START_IMAGE - 0) |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 278 | #define ANI_E_RANGE_END_CM -5200 |
| 279 | |
| 280 | |
| 281 | #define ANI_IS_STATUS_SUCCESS( retVal ) ( ( retVal >= 0 ) ) |
| 282 | |
| 283 | #endif //_ANI_ERRORS_H_ |