1 /* 2 * Copyright 2020 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 /* 18 * Definitions for HCI Event Parameter Minimum Length 19 */ 20 static const uint8_t hci_event_parameters_minimum_length[] = { 21 0, // 0x00 - N/A 22 1, // 0x01 - HCI_Inquiry_Complete Event 23 15, // 0x02 - HCI_Inquiry_Result Event (Num_Responses = 1) 24 11, // 0x03 - HCI_Connection_Complete Event 25 10, // 0x04 - HCI_Connection_Request Event 26 4, // 0x05 - HCI_Disconnection_Complete Event 27 3, // 0x06 - HCI_Authentication_Complete Event 28 255, // 0x07 - HCI_Remote_Name_Request_Complete Event 29 4, // 0x08 - HCI_Encryption_Change Event 30 3, // 0x09 - HCI_Change_Connection_Link_Key_Complete Event 31 4, // 0x0A - HCI_Master_Link_Key_Complete Event 32 11, // 0x0B - HCI_Read_Remote_Supported_Features_Complete Event 33 8, // 0x0C - HCI_Read_Remote_Version_Information_Complete Event 34 21, // 0x0D - HCI_QoS_Setup_Complete Event 35 3, // 0x0E - HCI_Command_Complete Event (Depends on command) 36 4, // 0x0F - HCI_Command_Status Event 37 1, // 0x10 - HCI_Hardware_Error Event 38 2, // 0x11 - HCI_Flush_Occurred Event 39 8, // 0x12 - HCI_Role_Change Event 40 5, // 0x13 - HCI_Number_Of_Completed_Packets Event (Num_Handles = 1) 41 6, // 0x14 - HCI_Mode_Change Event 42 23, // 0x15 - HCI_Return_Link_Keys Event (Num_Keys = 1) 43 6, // 0x16 - HCI_PIN_Code_Request Event 44 6, // 0x17 - HCI_Link_Key_Request Event 45 23, // 0x18 - HCI_Link_Key_Notification Event 46 3, // 0x19 - HCI_Loopback_Command Event (Depends on command) 47 1, // 0x1A - HCI_Data_Buffer_Overflow Event 48 3, // 0x1B - HCI_Max_Slots_Change Event 49 5, // 0x1C - HCI_Read_Clock_Offset_Complete Event 50 5, // 0x1D - HCI_Connection_Packet_Type_Changed Event 51 2, // 0x1E - HCI_QoS_Violation Event 52 7, // 0x1F - HCI_Page_Scan_Mode_Change Event (Deprecated) 53 7, // 0x20 - HCI_Page_Scan_Repetition_Mode_Change Event 54 22, // 0x21 - HCI_Flow_Specification_Complet Event 55 15, // 0x22 - HCI_Inquiry_Result_with_RSSI Event (Num_Responses = 1) 56 13, // 0x23 - HCI_Read_Remote_Extended_Features_Complete Event 57 0, // 0x24 - N/A 58 0, // 0x25 - N/A 59 0, // 0x26 - N/A 60 0, // 0x27 - N/A 61 0, // 0x28 - N/A 62 0, // 0x29 - N/A 63 0, // 0x2A - N/A 64 0, // 0x2B - N/A 65 17, // 0x2C - HCI_Synchronous_Connection_Complete Event 66 9, // 0x2D - HCI_Synchronous_Connection_Changed Event 67 11, // 0x2E - HCI_Sniff_Subrating Event 68 255, // 0x2F - HCI_Extended_Inquiry_Result Event 69 3, // 0x30 - HCI_Encryption_Key_Refresh_Complete Event 70 6, // 0x31 - HCI_IO_Capability_Request Event 71 9, // 0x32 - HCI_IO_Capability_Response Event 72 10, // 0x33 - HCI_User_Confirmation_Request Event 73 6, // 0x34 - HCI_User_Passkey_Request Event 74 6, // 0x35 - HCI_Remote_OOB_Data_Request Event 75 7, // 0x36 - HCI_Simple_Pairing_Complete Event 76 0, // 0x37 - N/A 77 4, // 0x38 - HCI_Link_Supervision_Timeout_Changed Event 78 2, // 0x39 - HCI_Enhanced_Flush_Complete Event 79 0, // 0x3A - N/A 80 10, // 0x3B - HCI_User_Passkey_Notification Event 81 7, // 0x3C - HCI_Keypress_Notification Event 82 14, // 0x3D - HCI_Remote_Host_Supported_Features_Notification Event 83 0, // 0x3E - LE Meta event 84 0, // 0x3F - N/A 85 2, // 0x40 - HCI_Physical_Link_Complete Event 86 1, // 0x41 - HCI_Channel_Selected Event 87 3, // 0x42 - HCI_Disconnection_Physical_Link_Complete Event 88 2, // 0x43 - HCI_Physical_Link_Loss_Early_Warning Event 89 1, // 0x44 - HCI_Physical_Link_Recovery Event 90 5, // 0x45 - HCI_Logical_Link_Complete Event 91 4, // 0x46 - HCI_Disconnection_Logical_Link_Complete Event 92 3, // 0x47 - HCI_Flow_Spec_Modify_Complete Event 93 9, // 0x48 - HCI_Number_Of_Completed_Data_Blocks Event (Num_Handles = 1) 94 2, // 0x49 - HCI_AMP_Start_Test Event 95 2, // 0x4A - HCI_AMP_Test_End Event 96 18, // 0x4B - HCI_AMP_Receiver_Report Event 97 3, // 0x4C - HCI_Short_Range_Mode_Change_Complete Event 98 2, // 0x4D - HCI_AMP_Status_Change Event 99 9, // 0x4E - HCI_Triggered_Clock_Capture Event 100 1, // 0x4F - HCI_Synchronization_Train_Complete Event 101 29, // 0x50 - HCI_Synchronization_Train_Received Event 102 18, // 0x51 - HCI_Connectionless_Slave_Broadcast_Receive Event 103 // (Data_Length = 0) 104 7, // 0x52 - HCI_Connectionless_Slave_Broadcast_Timeout Event 105 7, // 0x53 - HCI_Truncated_Page_Complete Event 106 0, // 0x54 - HCI_Slave_Page_Response_Timeout Event 107 10, // 0x55 - HCI_Connectionless_Slave_Broadcast_Channel_Map_Change Event 108 4, // 0x56 - HCI_Inquiry_Response_Notification Event 109 2, // 0x57 - HCI_Authenticated_Payload_Timeout_Expired Event 110 8, // 0x58 - HCI_SAM_Status_Change Event 111 0, // 0x59 - N/A 112 0, // 0x5A - N/A 113 0, // 0x5B - N/A 114 0, // 0x5C - N/A 115 0, // 0x5D - N/A 116 0, // 0x5E - N/A 117 0, // 0x5F - N/A 118 0, // 0x60 - N/A 119 0, // 0x61 - N/A 120 0, // 0x62 - N/A 121 0, // 0x63 - N/A 122 0, // 0x64 - N/A 123 0, // 0x65 - N/A 124 0, // 0x66 - N/A 125 0, // 0x67 - N/A 126 0, // 0x68 - N/A 127 0, // 0x69 - N/A 128 0, // 0x6A - N/A 129 0, // 0x6B - N/A 130 0, // 0x6C - N/A 131 0, // 0x6D - N/A 132 0, // 0x6E - N/A 133 0, // 0x6F - N/A 134 0, // 0x70 - N/A 135 0, // 0x71 - N/A 136 0, // 0x72 - N/A 137 0, // 0x73 - N/A 138 0, // 0x74 - N/A 139 0, // 0x75 - N/A 140 0, // 0x76 - N/A 141 0, // 0x77 - N/A 142 0, // 0x78 - N/A 143 0, // 0x79 - N/A 144 0, // 0x7A - N/A 145 0, // 0x7B - N/A 146 0, // 0x7C - N/A 147 0, // 0x7D - N/A 148 0, // 0x7E - N/A 149 0, // 0x7F - N/A 150 0, // 0x80 - N/A 151 0, // 0x81 - N/A 152 0, // 0x82 - N/A 153 0, // 0x83 - N/A 154 0, // 0x84 - N/A 155 0, // 0x85 - N/A 156 0, // 0x86 - N/A 157 0, // 0x87 - N/A 158 0, // 0x88 - N/A 159 0, // 0x89 - N/A 160 0, // 0x8A - N/A 161 0, // 0x8B - N/A 162 0, // 0x8C - N/A 163 0, // 0x8D - N/A 164 0, // 0x8E - N/A 165 0, // 0x8F - N/A 166 0, // 0x90 - N/A 167 0, // 0x91 - N/A 168 0, // 0x92 - N/A 169 0, // 0x93 - N/A 170 0, // 0x94 - N/A 171 0, // 0x95 - N/A 172 0, // 0x96 - N/A 173 0, // 0x97 - N/A 174 0, // 0x98 - N/A 175 0, // 0x99 - N/A 176 0, // 0x9A - N/A 177 0, // 0x9B - N/A 178 0, // 0x9C - N/A 179 0, // 0x9D - N/A 180 0, // 0x9E - N/A 181 0, // 0x9F - N/A 182 0, // 0xA0 - N/A 183 0, // 0xA1 - N/A 184 0, // 0xA2 - N/A 185 0, // 0xA3 - N/A 186 0, // 0xA4 - N/A 187 0, // 0xA5 - N/A 188 0, // 0xA6 - N/A 189 0, // 0xA7 - N/A 190 0, // 0xA8 - N/A 191 0, // 0xA9 - N/A 192 0, // 0xAA - N/A 193 0, // 0xAB - N/A 194 0, // 0xAC - N/A 195 0, // 0xAD - N/A 196 0, // 0xAE - N/A 197 0, // 0xAF - N/A 198 0, // 0xB0 - N/A 199 0, // 0xB1 - N/A 200 0, // 0xB2 - N/A 201 0, // 0xB3 - N/A 202 0, // 0xB4 - N/A 203 0, // 0xB5 - N/A 204 0, // 0xB6 - N/A 205 0, // 0xB7 - N/A 206 0, // 0xB8 - N/A 207 0, // 0xB9 - N/A 208 0, // 0xBA - N/A 209 0, // 0xBB - N/A 210 0, // 0xBC - N/A 211 0, // 0xBD - N/A 212 0, // 0xBE - N/A 213 0, // 0xBF - N/A 214 0, // 0xC0 - N/A 215 0, // 0xC1 - N/A 216 0, // 0xC2 - N/A 217 0, // 0xC3 - N/A 218 0, // 0xC4 - N/A 219 0, // 0xC5 - N/A 220 0, // 0xC6 - N/A 221 0, // 0xC7 - N/A 222 0, // 0xC8 - N/A 223 0, // 0xC9 - N/A 224 0, // 0xCA - N/A 225 0, // 0xCB - N/A 226 0, // 0xCC - N/A 227 0, // 0xCD - N/A 228 0, // 0xCE - N/A 229 0, // 0xCF - N/A 230 0, // 0xD0 - N/A 231 0, // 0xD1 - N/A 232 0, // 0xD2 - N/A 233 0, // 0xD3 - N/A 234 0, // 0xD4 - N/A 235 0, // 0xD5 - N/A 236 0, // 0xD6 - N/A 237 0, // 0xD7 - N/A 238 0, // 0xD8 - N/A 239 0, // 0xD9 - N/A 240 0, // 0xDA - N/A 241 0, // 0xDB - N/A 242 0, // 0xDC - N/A 243 0, // 0xDD - N/A 244 0, // 0xDE - N/A 245 0, // 0xDF - N/A 246 0, // 0xE0 - N/A 247 0, // 0xE1 - N/A 248 0, // 0xE2 - N/A 249 0, // 0xE3 - N/A 250 0, // 0xE4 - N/A 251 0, // 0xE5 - N/A 252 0, // 0xE6 - N/A 253 0, // 0xE7 - N/A 254 0, // 0xE8 - N/A 255 0, // 0xE9 - N/A 256 0, // 0xEA - N/A 257 0, // 0xEB - N/A 258 0, // 0xEC - N/A 259 0, // 0xED - N/A 260 0, // 0xEE - N/A 261 0, // 0xEF - N/A 262 0, // 0xF0 - N/A 263 0, // 0xF1 - N/A 264 0, // 0xF2 - N/A 265 0, // 0xF3 - N/A 266 0, // 0xF4 - N/A 267 0, // 0xF5 - N/A 268 0, // 0xF6 - N/A 269 0, // 0xF7 - N/A 270 0, // 0xF8 - N/A 271 0, // 0xF9 - N/A 272 0, // 0xFA - N/A 273 0, // 0xFB - N/A 274 0, // 0xFC - N/A 275 0, // 0xFD - N/A 276 0, // 0xFE - N/A 277 0, // 0xFF - HCI_Vendor_Specific Event 278 }; 279