/aosp12/system/bt/gd/btaa/linux_generic/ |
H A D | cmd_evt_classification.cc | 25 case hci::OpCode::INQUIRY: in lookup_cmd() 26 case hci::OpCode::INQUIRY_CANCEL: in lookup_cmd() 54 case hci::OpCode::SWITCH_ROLE: in lookup_cmd() 80 case hci::OpCode::DISCONNECT: in lookup_cmd() 92 case hci::OpCode::HOLD_MODE: in lookup_cmd() 93 case hci::OpCode::SNIFF_MODE: in lookup_cmd() 95 case hci::OpCode::QOS_SETUP: in lookup_cmd() 101 case hci::OpCode::FLUSH: in lookup_cmd() 110 case hci::OpCode::READ_RSSI: in lookup_cmd() 134 case hci::OpCode::RESET: in lookup_cmd() [all …]
|
/aosp12/system/bt/main/shim/ |
H A D | helpers.h | 43 hci::Address ret; in ToGdAddress() 57 hci::AddressType type; in ToAddressWithType() 68 return hci::AddressWithType{address, in ToAddressWithType() 117 std::unique_ptr<bluetooth::hci::PacketView<bluetooth::hci::kLittleEndian>> in MakeLegacyBtHdrPacket() 137 return hci::Role::CENTRAL; in ToHciRole() 139 return hci::Role::PERIPHERAL; in ToHciRole() 147 case hci::ErrorCode::SUCCESS: in ToLegacyHciErrorCode() 155 case hci::ErrorCode::PAGE_TIMEOUT: in ToLegacyHciErrorCode() 200 case hci::ErrorCode::UNKNOWN_LMP_PDU: in ToLegacyHciErrorCode() 226 case hci::ErrorCode::CONTROLLER_BUSY: in ToLegacyHciErrorCode() [all …]
|
H A D | hci_layer.cc | 61 case bluetooth::hci::EventCode::INQUIRY_RESULT: in is_valid_event_code() 77 case bluetooth::hci::EventCode::ROLE_CHANGE: in is_valid_event_code() 79 case bluetooth::hci::EventCode::MODE_CHANGE: in is_valid_event_code() 142 case bluetooth::hci::SubeventCode:: in is_valid_subevent_code() 163 bluetooth::hci::EventCode event_code) { in event_already_registered_in_hci_layer() 183 bluetooth::hci::EventCode event_code) { in event_already_registered_in_controller_layer() 194 bluetooth::hci::EventCode event_code) { in event_already_registered_in_acl_layer() 237 case bluetooth::hci::SubeventCode:: in subevent_already_registered_in_le_hci_layer() 256 bluetooth::hci::EventCode event_code) { in event_already_registered_in_le_advertising_manager() 266 bluetooth::hci::EventCode event_code) { in event_already_registered_in_le_scanning_manager() [all …]
|
/aosp12/system/bt/gd/security/channel/ |
H A D | security_manager_channel_unittest.cc | 35 using hci::Address; 40 using hci::OobDataPresent; 41 using hci::OpCode; 271 hci::IoCapability io_capability = (hci::IoCapability)0x00; in TEST_F() 281 hci::CommandView packet_view = hci::CommandView::Create(command_packet); in TEST_F() 297 hci::CommandView packet_view = hci::CommandView::Create(command_packet); in TEST_F() 305 hci::IoCapability io_capability = (hci::IoCapability)0x00; in TEST_F() 330 hci::CommandView packet_view = hci::CommandView::Create(command_packet); in TEST_F() 345 hci::CommandView packet_view = hci::CommandView::Create(command_packet); in TEST_F() 481 …hci::CentralLinkKeyCompleteBuilder::Create(hci::ErrorCode::SUCCESS, connection_handle, hci::KeyFla… in TEST_F() [all …]
|
/aosp12/system/bt/gd/security/pairing/ |
H A D | classic_pairing_handler_unittest.cc | 39 using hci::Address; 45 using hci::OpCode; 318 hci::KeyType key_type = hci::KeyType::DEBUG_COMBINATION; in TEST_F() 356 hci::KeyType key_type = hci::KeyType::DEBUG_COMBINATION; in TEST_F() 394 hci::KeyType key_type = hci::KeyType::DEBUG_COMBINATION; in TEST_F() 432 hci::KeyType key_type = hci::KeyType::DEBUG_COMBINATION; in TEST_F() 470 hci::KeyType key_type = hci::KeyType::DEBUG_COMBINATION; in TEST_F() 508 hci::KeyType key_type = hci::KeyType::DEBUG_COMBINATION; in TEST_F() 546 hci::KeyType key_type = hci::KeyType::DEBUG_COMBINATION; in TEST_F() 584 hci::KeyType key_type = hci::KeyType::DEBUG_COMBINATION; in TEST_F() [all …]
|
H A D | classic_pairing_handler.cc | 107 hci::IoCapability io_capability, in Initiate() 197 last_status_ = hci::ErrorCode::SUCCESS; in OnReceive() 216 last_status_ = hci::ErrorCode::SUCCESS; in OnReceive() 336 case hci::OobDataPresent::NOT_PRESENT: in OnReceive() 341 case hci::OobDataPresent::P_192_PRESENT: in OnReceive() 359 case hci::OobDataPresent::P_256_PRESENT: in OnReceive() 430 case hci::IoCapability::DISPLAY_ONLY: in OnReceive() 432 case hci::IoCapability::DISPLAY_ONLY: in OnReceive() 490 case hci::IoCapability::DISPLAY_YES_NO: in OnReceive() 492 case hci::IoCapability::DISPLAY_ONLY: in OnReceive() [all …]
|
H A D | classic_pairing_handler.h | 50 remote_oob_present_(hci::OobDataPresent::NOT_PRESENT), in ClassicPairingHandler() 53 local_oob_present_(hci::OobDataPresent::NOT_PRESENT), in ClassicPairingHandler() 64 hci::IoCapability io_capability, 65 hci::AuthenticationRequirements auth_requirements, 72 void OnReceive(hci::PinCodeRequestView packet) override; 73 void OnReceive(hci::LinkKeyRequestView packet) override; 78 void OnReceive(hci::ReturnLinkKeysView packet) override; 79 void OnReceive(hci::EncryptionChangeView packet) override; 107 hci::IoCapability remote_io_capability_; 110 hci::IoCapability local_io_capability_; [all …]
|
H A D | pairing_handler.h | 55 hci::IoCapability io_capability, 56 hci::AuthenticationRequirements auth_requirements, 62 virtual void OnReceive(hci::PinCodeRequestView packet) = 0; 63 virtual void OnReceive(hci::LinkKeyRequestView packet) = 0; 64 virtual void OnReceive(hci::LinkKeyNotificationView packet) = 0; 65 virtual void OnReceive(hci::IoCapabilityRequestView packet) = 0; 66 virtual void OnReceive(hci::IoCapabilityResponseView packet) = 0; 68 virtual void OnReceive(hci::ReturnLinkKeysView packet) = 0; 69 virtual void OnReceive(hci::EncryptionChangeView packet) = 0; 71 virtual void OnReceive(hci::RemoteOobDataRequestView packet) = 0; [all …]
|
/aosp12/system/bt/gd/neighbor/ |
H A D | inquiry_test.cc | 58 hci::InquiryMode inquiry_mode; 77 hci::PacketView<hci::kLittleEndian> GetPacketView(std::unique_ptr<packet::BasePacketBuilder> packet… in GetPacketView() 79 hci::BitInserter i(*bytes); in GetPacketView() 104 hci::CommandView command = hci::CommandView::Create(GetPacketView(std::move(command_builder))); in HandleCommand() 191 hci::EventView event = hci::EventView::Create(GetPacketView(std::move(event_builder))); in HandleCommand() 193 hci::CommandCompleteView command_complete = hci::CommandCompleteView::Create(event); in HandleCommand() 211 auto inquiry = hci::InquiryView::Create(hci::DiscoveryCommandView::Create(command)); in HandleStatus() 222 hci::EventView event = hci::EventView::Create(GetPacketView(std::move(event_builder))); in HandleStatus() 224 hci::CommandStatusView command_status = hci::CommandStatusView::Create(event); in HandleStatus() 292 hci::EventView view = hci::EventView::Create(GetPacketView(std::move(result))); in InjectInquiryResult() [all …]
|
H A D | inquiry.cc | 54 void SetInquiryMode(hci::InquiryMode mode); 74 hci::InquiryMode inquiry_mode_; 75 hci::InquiryScanType inquiry_scan_type_; 88 void OnEvent(hci::EventView view); 92 hci::HciLayer* hci_layer_; 108 case hci::OpCode::INQUIRY_CANCEL: { in OnCommandComplete() 132 case hci::OpCode::READ_INQUIRY_MODE: { in OnCommandComplete() 183 case hci::OpCode::INQUIRY: { in OnCommandStatus() 288 hci::Lap lap; in StartOneShotInquiry() 314 hci::Lap lap; in StartPeriodicInquiry() [all …]
|
H A D | page.cc | 37 void SetScanType(hci::PageScanType type); 50 hci::PageScanType scan_type_; 55 hci::HciLayer* hci_layer_; 65 case hci::OpCode::WRITE_PAGE_SCAN_ACTIVITY: { in OnCommandComplete() 71 case hci::OpCode::READ_PAGE_SCAN_ACTIVITY: { in OnCommandComplete() 79 case hci::OpCode::WRITE_PAGE_SCAN_TYPE: { in OnCommandComplete() 85 case hci::OpCode::READ_PAGE_SCAN_TYPE: { in OnCommandComplete() 92 case hci::OpCode::WRITE_PAGE_TIMEOUT: { in OnCommandComplete() 98 case hci::OpCode::READ_PAGE_TIMEOUT: { in OnCommandComplete() 189 pimpl_->SetScanType(hci::PageScanType::STANDARD); in SetStandardScan() [all …]
|
H A D | name.cc | 48 hci::Address address, 51 hci::ClockOffsetValid clock_offset_valid, 69 void OnEvent(hci::EventView view); 74 hci::HciLayer* hci_layer_; 96 hci::Address address = packet.GetBdAddr(); in OnCommandComplete() 110 case hci::OpCode::REMOTE_NAME_REQUEST: { in OnCommandStatus() 152 hci::Address address, in ReadRemoteNameRequest() 155 hci::ClockOffsetValid clock_offset_valid, in ReadRemoteNameRequest() 200 hci::Address address, in ReadRemoteNameRequest() 203 hci::ClockOffsetValid clock_offset_valid, in ReadRemoteNameRequest() [all …]
|
H A D | scan.cc | 50 void ReadScanEnable(hci::ScanEnable); 54 hci::HciLayer* hci_layer_; 65 case hci::OpCode::READ_SCAN_ENABLE: { in OnCommandComplete() 72 case hci::OpCode::WRITE_SCAN_ENABLE: { in OnCommandComplete() 85 hci::ScanEnable scan_enable; in WriteScanEnable() 94 scan_enable = hci::ScanEnable::NO_SCANS; in WriteScanEnable() 98 …std::unique_ptr<hci::WriteScanEnableBuilder> packet = hci::WriteScanEnableBuilder::Create(scan_ena… in WriteScanEnable() 103 std::unique_ptr<hci::ReadScanEnableBuilder> packet = hci::ReadScanEnableBuilder::Create(); in WriteScanEnable() 115 case hci::ScanEnable::PAGE_SCAN_ONLY: in ReadScanEnable() 154 std::unique_ptr<hci::ReadScanEnableBuilder> packet = hci::ReadScanEnableBuilder::Create(); in Start() [all …]
|
H A D | discoverability.cc | 49 std::vector<hci::Lap> laps_; 53 hci::HciLayer* hci_layer_; 68 case hci::OpCode::READ_CURRENT_IAC_LAP: { in OnCommandComplete() 75 case hci::OpCode::WRITE_CURRENT_IAC_LAP: { in OnCommandComplete() 81 case hci::OpCode::READ_NUMBER_OF_SUPPORTED_IAC: { in OnCommandComplete() 142 std::vector<hci::Lap> laps; in StartGeneralDiscoverability() 144 hci::Lap lap; in StartGeneralDiscoverability() 152 std::vector<hci::Lap> laps; in StartLimitedDiscoverability() 154 hci::Lap lap; in StartLimitedDiscoverability() 160 hci::Lap lap; in StartLimitedDiscoverability() [all …]
|
/aosp12/system/bt/gd/l2cap/classic/internal/ |
H A D | link_manager.h | 68 void OnConnectFail(hci::Address device, hci::ErrorCode reason) override; 70 void HACK_OnEscoConnectRequest(hci::Address, hci::ClassOfDevice) override; 71 void HACK_OnScoConnectRequest(hci::Address, hci::ClassOfDevice) override; 73 virtual void OnDisconnect(hci::Address device, hci::ErrorCode status); 74 void OnAuthenticationComplete(hci::ErrorCode hci_status, hci::Address device); 75 void OnEncryptionChange(hci::Address device, hci::EncryptionEnabled enabled); 77 hci::ErrorCode hci_status, 78 hci::Address device, 85 void OnRoleChange(hci::ErrorCode hci_status, hci::Address remote, hci::Role role); 87 …void OnModeChange(hci::ErrorCode hci_status, hci::Address remote, hci::Mode mode, uint16_t interva… [all …]
|
H A D | fixed_channel_impl_test.cc | 72 hci::AddressWithType device{hci::Address{{0x01, 0x02, 0x03, 0x04, 0x05, 0x06}}, in TEST_F() 89 hci::AddressWithType device{hci::Address{{0x01, 0x02, 0x03, 0x04, 0x05, 0x06}}, in TEST_F() 96 hci::ErrorCode my_status = hci::ErrorCode::SUCCESS; in TEST_F() 118 hci::AddressWithType device{hci::Address{{0x01, 0x02, 0x03, 0x04, 0x05, 0x06}}, in TEST_F() 128 hci::ErrorCode my_status = hci::ErrorCode::SUCCESS; in TEST_F() 148 hci::AddressWithType device{hci::Address{{0x01, 0x02, 0x03, 0x04, 0x05, 0x06}}, in TEST_F() 155 hci::ErrorCode my_status = hci::ErrorCode::SUCCESS; in TEST_F() 181 hci::AddressWithType device{hci::Address{{0x01, 0x02, 0x03, 0x04, 0x05, 0x06}}, in TEST_F() 188 hci::ErrorCode my_status = hci::ErrorCode::SUCCESS; in TEST_F() 254 hci::ErrorCode my_status = hci::ErrorCode::SUCCESS; in TEST_F() [all …]
|
/aosp12/system/bt/gd/hci/fuzz/ |
H A D | fuzz_hci_layer.h | 29 namespace hci { 53 std::unique_ptr<hci::CommandBuilder> command, in EnqueueCommand() 70 common::BidiQueueEnd<hci::AclBuilder, hci::AclView>* GetAclQueueEnd() override { in GetAclQueueEnd() 74 common::BidiQueueEnd<hci::IsoBuilder, hci::IsoView>* GetIsoQueueEnd() override { in GetIsoQueueEnd() 78 …void RegisterEventHandler(hci::EventCode event, common::ContextualCallback<void(hci::EventView)> h… in RegisterEventHandler() 101 …hci::SecurityInterface* GetSecurityInterface(common::ContextualCallback<void(hci::EventView)> even… 103 hci::LeSecurityInterface* GetLeSecurityInterface( 163 common::BidiQueue<hci::AclView, hci::AclBuilder> acl_queue_{3}; 164 common::BidiQueue<hci::IsoView, hci::IsoBuilder> iso_queue_{3}; 179 std::map<hci::EventCode, common::ContextualCallback<void(hci::EventView)>> event_handlers_; [all …]
|
/aosp12/system/bt/gd/security/internal/ |
H A D | security_manager_impl.h | 43 static constexpr hci::IoCapability kDefaultIoCapability = hci::IoCapability::DISPLAY_YES_NO; 60 hci::HciLayer* hci_layer, 61 hci::AclManager* acl_manager, 62 hci::Controller* controller, 139 hci::AddressWithType fixed_address, 223 hci::IoCapability io_capability, 231 void OnConnectionClosedLe(hci::AddressWithType address, hci::ErrorCode error_code); 239 hci::AddressWithType remote, 252 hci::AclManager* acl_manager_; 253 hci::Controller* controller_; [all …]
|
H A D | security_manager_impl.cc | 40 hci::IoCapability io_capability, in DispatchPairingHandler() 77 …security_manager_channel_->SendCommand(hci::WriteSimplePairingModeBuilder::Create(hci::Enable::ENA… in Init() 98 …hci::AddressWithType(adapter_config.GetAddress().value(), hci::AddressType::PUBLIC_DEVICE_ADDRESS); in Init() 102 hci::AddressWithType address_with_type(hci::Address{}, hci::AddressType::RANDOM_DEVICE_ADDRESS); in Init() 289 HandleEvent<hci::PinCodeRequestView>(hci::PinCodeRequestView::Create(event)); in OnHciEventReceived() 435 auto remote = hci::AddressWithType(address, hci::AddressType::PUBLIC_DEVICE_ADDRESS); in OnPairingHandlerComplete() 667 hci::HciLayer* hci_layer, in SecurityManagerImpl() 668 hci::AclManager* acl_manager, in SecurityManagerImpl() 669 hci::Controller* controller, in SecurityManagerImpl() 790 hci::AddressWithType remote, in InternalEnforceSecurityPolicy() [all …]
|
/aosp12/system/bt/gd/iso/internal/ |
H A D | iso_manager_impl.cc | 31 using bluetooth::hci::IsoBuilder; 33 IsoManagerImpl::IsoManagerImpl(os::Handler* iso_handler, hci::HciLayer* hci_layer, hci::Controller*… in IsoManagerImpl() 52 hci::LeCisEstablishedView le_cis_established_view = hci::LeCisEstablishedView::Create(event); in OnHciLeEvent() 61 hci::LeCisRequestView le_cis_request_view = hci::LeCisRequestView::Create(event); in OnHciLeEvent() 85 hci::Packing packing, in SetCigParameters() 86 hci::Enable framing, in SetCigParameters() 157 hci::Packing packing, in SetCigParametersTest() 158 hci::Enable framing, in SetCigParametersTest() 226 hci::CreateCisConfig config; in LeCreateCis() 249 …hci::LeRemoveCigCompleteView removeCigComplete = hci::LeRemoveCigCompleteView::Create(command_comp… in RemoveCigComplete() [all …]
|
/aosp12/system/bt/gd/hci/ |
H A D | security_interface.h | 23 namespace hci { 25 constexpr hci::EventCode SecurityEvents[] = { 26 hci::EventCode::ENCRYPTION_CHANGE, 29 hci::EventCode::RETURN_LINK_KEYS, 30 hci::EventCode::PIN_CODE_REQUEST, 31 hci::EventCode::LINK_KEY_REQUEST, 32 hci::EventCode::LINK_KEY_NOTIFICATION, 34 hci::EventCode::IO_CAPABILITY_REQUEST, 35 hci::EventCode::IO_CAPABILITY_RESPONSE, 39 hci::EventCode::KEYPRESS_NOTIFICATION, [all …]
|
H A D | enum_helper.h | 25 namespace hci { 37 std::optional<hci::DeviceType> FromLegacyConfigString(const std::string& str) { in FromLegacyConfigString() 42 if (*raw_value < hci::DeviceType::UNKNOWN || *raw_value > hci::DeviceType::DUAL) { in FromLegacyConfigString() 45 return static_cast<hci::DeviceType>(*raw_value); in FromLegacyConfigString() 50 std::optional<hci::AddressType> FromLegacyConfigString(const std::string& str) { in FromLegacyConfigString() 59 return static_cast<hci::AddressType>(*raw_value); in FromLegacyConfigString() 64 std::optional<hci::KeyType> FromLegacyConfigString(const std::string& str) { in FromLegacyConfigString() 69 if (*raw_value < static_cast<int64_t>(hci::KeyType::COMBINATION) || in FromLegacyConfigString() 70 *raw_value > static_cast<int64_t>(hci::KeyType::AUTHENTICATED_P256)) { in FromLegacyConfigString() 73 return static_cast<hci::KeyType>(*raw_value); in FromLegacyConfigString() [all …]
|
/aosp12/system/bt/vendor_libs/test_vendor_lib/model/controller/ |
H A D | acl_connection_handler.h | 38 bool CreatePendingConnection(bluetooth::hci::Address addr, 41 bool CancelPendingConnection(bluetooth::hci::Address addr); 48 uint16_t CreateConnection(bluetooth::hci::Address addr, 70 bluetooth::hci::ClockAccuracy accuracy, 71 bluetooth::hci::Packing packing, 72 bluetooth::hci::Enable framing, 89 bluetooth::hci::ErrorCode RemoveCig(uint8_t cig_id); 108 bluetooth::hci::Address pending_connection_address_{ 109 bluetooth::hci::Address::kEmpty}; 113 bluetooth::hci::Address::kEmpty, [all …]
|
/aosp12/system/bt/gd/security/ |
H A D | ui.h | 34 const bluetooth::hci::AddressWithType& GetAddressWithType() { in GetAddressWithType() 46 hci::IoCapability GetRemoteIoCaps() const { in GetRemoteIoCaps() 49 void SetRemoteIoCaps(hci::IoCapability remote_io_caps) { in SetRemoteIoCaps() 53 hci::AuthenticationRequirements GetRemoteAuthReqs() const { in GetRemoteAuthReqs() 57 void SetRemoteAuthReqs(hci::AuthenticationRequirements remote_auth_reqs) { in SetRemoteAuthReqs() 61 hci::OobDataPresent GetRemoteOobDataPresent() const { in GetRemoteOobDataPresent() 78 bluetooth::hci::AddressWithType address_with_type_; 85 hci::IoCapability remote_io_caps_ = hci::IoCapability::DISPLAY_YES_NO; 86 …hci::AuthenticationRequirements remote_auth_reqs_ = hci::AuthenticationRequirements::DEDICATED_BON… 87 hci::OobDataPresent remote_oob_data_present_ = hci::OobDataPresent::NOT_PRESENT; [all …]
|
/aosp12/system/bt/gd/rust/shim/src/ |
H A D | hci.rs | 6 use bt_packets::hci::{AclPacket, CommandPacket, Packet}; 36 hci: &mut Hci, in hci_send_command() 44 hci.rt.spawn(async move { in hci_send_command() 57 hci.rt.spawn(async move { in hci_send_acl() 66 let mut hci_facade = hci.internal.clone(); in hci_register_event() 67 hci.rt.spawn(async move { in hci_register_event() 73 let mut hci_facade = hci.internal.clone(); in hci_register_le_event() 74 hci.rt.spawn(async move { in hci_register_le_event() 80 hci.internal.acl_rx.stream_runnable(&hci.rt, CallbackWrapper { cb }); in hci_set_acl_callback() 84 hci.internal.evt_rx.stream_runnable(&hci.rt, CallbackWrapper { cb }); in hci_set_evt_callback() [all …]
|