1 /* 2 * Copyright 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.hardware.wifi.supplicant@1.0; 18 /** 19 * Enum values indicating the status of any supplicant operation. 20 */ 21 enum SupplicantStatusCode : uint32_t { 22 /** No errors. */ 23 SUCCESS, 24 /** Unknown failure occured. */ 25 FAILURE_UNKNOWN, 26 /** One of the incoming args is invalid. */ 27 FAILURE_ARGS_INVALID, 28 /** |ISupplicantIface| HIDL interface object is no longer valid. */ 29 FAILURE_IFACE_INVALID, 30 /** Iface with the provided name does not exist. */ 31 FAILURE_IFACE_UNKNOWN, 32 /** Iface with the provided name already exists. */ 33 FAILURE_IFACE_EXISTS, 34 /** Iface is disabled and cannot be used. */ 35 FAILURE_IFACE_DISABLED, 36 /** Iface is not currently disconnected, so cannot reconnect. */ 37 FAILURE_IFACE_NOT_DISCONNECTED, 38 /** |ISupplicantNetwork| HIDL interface object is no longer valid. */ 39 FAILURE_NETWORK_INVALID, 40 /** Network with the provided id does not exist. */ 41 FAILURE_NETWORK_UNKNOWN 42 }; 43 44 /** 45 * Generic structure to return the status of any supplicant operation. 46 */ 47 struct SupplicantStatus { 48 SupplicantStatusCode code; 49 /** 50 * A vendor specific error message to provide more information beyond the 51 * status code. 52 * This will be used for debbuging purposes only. 53 */ 54 string debugMessage; 55 }; 56 57 /** SSID type. Max of 32 octets representing service identifier of a network. */ 58 typedef vec<uint8_t> Ssid; 59 60 /** MAC Address type. 6 octets representing physical address of a device. */ 61 typedef uint8_t[6] MacAddress; 62 63 /** BSSID type. 6 octets representing the physical address of an AP. */ 64 typedef MacAddress Bssid; 65 66 /** Supplicant network ID type. */ 67 typedef uint32_t SupplicantNetworkId; 68 69 /** 70 * List of Iface types supported. 71 */ 72 enum IfaceType : uint32_t { 73 STA, 74 P2P 75 }; 76 77 /** 78 * P2P group capability. 79 */ 80 enum P2pGroupCapabilityMask : uint32_t { 81 GROUP_OWNER = 1 << 0, 82 PERSISTENT_GROUP = 1 << 1, 83 GROUP_LIMIT = 1 << 2, 84 INTRA_BSS_DIST = 1 << 3, 85 CROSS_CONN = 1 << 4, 86 PERSISTENT_RECONN = 1 << 5, 87 GROUP_FORMATION = 1 << 6 88 }; 89 90 /** 91 * WPS config methods. 92 * Refer to section 3 of IBSS with Wi-Fi Protected Setup 93 * Technical Specification Version 1.0.0. 94 */ 95 enum WpsConfigMethods : uint16_t { 96 USBA = 0x0001, 97 ETHERNET = 0x0002, 98 LABEL = 0x0004, 99 DISPLAY = 0x0008, 100 EXT_NFC_TOKEN = 0x0010, 101 INT_NFC_TOKEN = 0x0020, 102 NFC_INTERFACE = 0x0040, 103 PUSHBUTTON = 0x0080, 104 KEYPAD = 0x0100, 105 VIRT_PUSHBUTTON = 0x0280, 106 PHY_PUSHBUTTON = 0x0480, 107 P2PS = 0x1000, 108 VIRT_DISPLAY = 0x2008, 109 PHY_DISPLAY = 0x4008 110 }; 111