/system/bt/gd/btaa/linux_generic/ |
D | cmd_evt_classification.cc | 22 CmdEvtActivityClassification lookup_cmd(hci::OpCode opcode) { in lookup_cmd() 25 case hci::OpCode::INQUIRY: in lookup_cmd() 26 case hci::OpCode::INQUIRY_CANCEL: in lookup_cmd() 27 case hci::OpCode::PERIODIC_INQUIRY_MODE: in lookup_cmd() 28 case hci::OpCode::EXIT_PERIODIC_INQUIRY_MODE: in lookup_cmd() 32 case hci::OpCode::CREATE_CONNECTION: in lookup_cmd() 33 case hci::OpCode::CREATE_CONNECTION_CANCEL: in lookup_cmd() 34 case hci::OpCode::ACCEPT_CONNECTION_REQUEST: in lookup_cmd() 35 case hci::OpCode::LINK_KEY_REQUEST_REPLY: in lookup_cmd() 36 case hci::OpCode::LINK_KEY_REQUEST_NEGATIVE_REPLY: in lookup_cmd() [all …]
|
/system/bt/main/shim/ |
D | helpers.h | 31 inline RawAddress ToRawAddress(const hci::Address& address) { in ToRawAddress() 42 inline hci::Address ToGdAddress(const RawAddress& address) { in ToGdAddress() 43 hci::Address ret; in ToGdAddress() 53 inline hci::AddressWithType ToAddressWithType( in ToAddressWithType() 55 hci::Address address = ToGdAddress(legacy_address); in ToAddressWithType() 57 hci::AddressType type; in ToAddressWithType() 59 type = hci::AddressType::PUBLIC_DEVICE_ADDRESS; in ToAddressWithType() 61 type = hci::AddressType::RANDOM_DEVICE_ADDRESS; in ToAddressWithType() 63 type = hci::AddressType::PUBLIC_IDENTITY_ADDRESS; in ToAddressWithType() 65 type = hci::AddressType::RANDOM_IDENTITY_ADDRESS; in ToAddressWithType() [all …]
|
D | hci_layer.cc | 58 bool is_valid_event_code(bluetooth::hci::EventCode event_code) { in is_valid_event_code() 60 case bluetooth::hci::EventCode::INQUIRY_COMPLETE: in is_valid_event_code() 61 case bluetooth::hci::EventCode::INQUIRY_RESULT: in is_valid_event_code() 62 case bluetooth::hci::EventCode::CONNECTION_COMPLETE: in is_valid_event_code() 63 case bluetooth::hci::EventCode::CONNECTION_REQUEST: in is_valid_event_code() 64 case bluetooth::hci::EventCode::DISCONNECTION_COMPLETE: in is_valid_event_code() 65 case bluetooth::hci::EventCode::AUTHENTICATION_COMPLETE: in is_valid_event_code() 66 case bluetooth::hci::EventCode::REMOTE_NAME_REQUEST_COMPLETE: in is_valid_event_code() 67 case bluetooth::hci::EventCode::ENCRYPTION_CHANGE: in is_valid_event_code() 68 case bluetooth::hci::EventCode::CHANGE_CONNECTION_LINK_KEY_COMPLETE: in is_valid_event_code() [all …]
|
/system/bt/gd/hci/ |
D | security_interface.h | 23 namespace hci { 25 constexpr hci::EventCode SecurityEvents[] = { 26 hci::EventCode::ENCRYPTION_CHANGE, 27 hci::EventCode::CHANGE_CONNECTION_LINK_KEY_COMPLETE, 28 hci::EventCode::CENTRAL_LINK_KEY_COMPLETE, 29 hci::EventCode::RETURN_LINK_KEYS, 30 hci::EventCode::PIN_CODE_REQUEST, 31 hci::EventCode::LINK_KEY_REQUEST, 32 hci::EventCode::LINK_KEY_NOTIFICATION, 33 hci::EventCode::ENCRYPTION_KEY_REFRESH_COMPLETE, [all …]
|
D | enum_helper.h | 25 namespace hci { 36 template <typename T, typename std::enable_if<std::is_same_v<T, hci::DeviceType>, int>::type = 0> 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() 49 template <typename T, typename std::enable_if<std::is_same_v<T, hci::AddressType>, int>::type = 0> 50 std::optional<hci::AddressType> FromLegacyConfigString(const std::string& str) { in FromLegacyConfigString() 55 if (*raw_value < static_cast<int64_t>(hci::AddressType::PUBLIC_DEVICE_ADDRESS) || in FromLegacyConfigString() 56 *raw_value > static_cast<int64_t>(hci::AddressType::RANDOM_IDENTITY_ADDRESS)) { in FromLegacyConfigString() 59 return static_cast<hci::AddressType>(*raw_value); in FromLegacyConfigString() [all …]
|
/system/bt/gd/security/channel/ |
D | security_manager_channel_unittest.cc | 35 using hci::Address; 36 using hci::AuthenticationRequirements; 37 using hci::CommandCompleteBuilder; 38 using hci::IoCapabilityRequestReplyBuilder; 39 using hci::IoCapabilityRequestView; 40 using hci::OobDataPresent; 41 using hci::OpCode; 51 FakeSecurityManagerChannel(os::Handler* handler, hci::HciLayer* hci_layer) in FakeSecurityManagerChannel() 59 void OnLinkDisconnected(hci::Address address) { in OnLinkDisconnected() 63 void OnAuthenticationComplete(hci::ErrorCode hci_status, hci::Address remote) override {} in OnAuthenticationComplete() [all …]
|
D | security_manager_channel.h | 36 using SecurityCommandStatusCallback = common::ContextualOnceCallback<void(hci::CommandCompleteView)… 44 virtual void OnHciEventReceived(hci::EventView packet) = 0; 45 virtual void OnConnectionClosed(hci::Address) = 0; 53 SecurityManagerChannel(os::Handler* handler, hci::HciLayer* hci_layer); 62 void Connect(hci::Address address); 71 void Release(hci::Address address); 80 void Disconnect(hci::Address address); 87 void SendCommand(std::unique_ptr<hci::SecurityCommandBuilder> command); 95 …void SendCommand(std::unique_ptr<hci::SecurityCommandBuilder> command, SecurityCommandStatusCallba… 115 void OnHciEventReceived(hci::EventView packet); [all …]
|
/system/bt/gd/security/pairing/ |
D | classic_pairing_handler_unittest.cc | 39 using hci::Address; 40 using hci::AuthenticationRequirements; 41 using hci::CommandCompleteBuilder; 42 using hci::IoCapabilityRequestReplyBuilder; 43 using hci::IoCapabilityRequestView; 44 using hci::OobDataPresent; 45 using hci::OpCode; 52 FakeSecurityManagerChannel(os::Handler* handler, hci::HciLayer* hci_layer) in FakeSecurityManagerChannel() 60 void OnLinkDisconnected(hci::Address address) override { in OnLinkDisconnected() 64 void OnEncryptionChange(hci::Address address, bool encrypted) override { in OnEncryptionChange() [all …]
|
D | classic_pairing_handler.cc | 77 void ClassicPairingHandler::OnPairingPromptAccepted(const bluetooth::hci::AddressWithType& address,… in OnPairingPromptAccepted() 82 void ClassicPairingHandler::OnConfirmYesNo(const bluetooth::hci::AddressWithType& address, bool con… in OnConfirmYesNo() 85 … hci::UserConfirmationRequestReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddress())); in OnConfirmYesNo() 88 …hci::UserConfirmationRequestNegativeReplyBuilder::Create(GetRecord()->GetPseudoAddress()->GetAddre… in OnConfirmYesNo() 92 void ClassicPairingHandler::OnPasskeyEntry(const bluetooth::hci::AddressWithType& address, uint32_t… in OnPasskeyEntry() 93 …GetChannel()->SendCommand(hci::UserPasskeyRequestReplyBuilder::Create(address.GetAddress(), passke… in OnPasskeyEntry() 96 void ClassicPairingHandler::OnPinEntry(const bluetooth::hci::AddressWithType& address, std::vector<… in OnPinEntry() 102 …GetChannel()->SendCommand(hci::PinCodeRequestReplyBuilder::Create(address.GetAddress(), pin.size()… in OnPinEntry() 107 hci::IoCapability io_capability, in Initiate() 108 hci::AuthenticationRequirements auth_requirements, in Initiate() [all …]
|
D | classic_pairing_handler.h | 42 common::OnceCallback<void(hci::Address, PairingResultOrFailure)> complete_callback, in ClassicPairingHandler() 49 remote_io_capability_(hci::IoCapability::DISPLAY_YES_NO), in ClassicPairingHandler() 50 remote_oob_present_(hci::OobDataPresent::NOT_PRESENT), in ClassicPairingHandler() 51 …remote_authentication_requirements_(hci::AuthenticationRequirements::DEDICATED_BONDING_MITM_PROTEC… in ClassicPairingHandler() 52 local_io_capability_(hci::IoCapability::DISPLAY_YES_NO), in ClassicPairingHandler() 53 local_oob_present_(hci::OobDataPresent::NOT_PRESENT), in ClassicPairingHandler() 54 …local_authentication_requirements_(hci::AuthenticationRequirements::DEDICATED_BONDING_MITM_PROTECT… in ClassicPairingHandler() 64 hci::IoCapability io_capability, 65 hci::AuthenticationRequirements auth_requirements, 70 void OnReceive(hci::ChangeConnectionLinkKeyCompleteView packet) override; [all …]
|
D | pairing_handler.h | 55 hci::IoCapability io_capability, 56 hci::AuthenticationRequirements auth_requirements, 60 virtual void OnReceive(hci::ChangeConnectionLinkKeyCompleteView packet) = 0; 61 virtual void OnReceive(hci::CentralLinkKeyCompleteView packet) = 0; 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; 67 virtual void OnReceive(hci::SimplePairingCompleteView packet) = 0; [all …]
|
/system/bt/gd/l2cap/classic/internal/ |
D | link_manager.h | 43 class LinkManager : public hci::acl_manager::ConnectionCallbacks { 45 LinkManager(os::Handler* l2cap_handler, hci::AclManager* acl_manager, in LinkManager() 66 Link* GetLink(hci::Address device); 67 …void OnConnectSuccess(std::unique_ptr<hci::acl_manager::ClassicAclConnection> acl_connection) over… 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); [all …]
|
/system/bt/gd/neighbor/ |
D | inquiry_test.cc | 57 hci::InquiryScanType inquiry_scan_type; 58 hci::InquiryMode inquiry_mode; 69 .inquiry_scan_type = hci::InquiryScanType::STANDARD, 70 .inquiry_mode = hci::InquiryMode::STANDARD, 77 hci::PacketView<hci::kLittleEndian> GetPacketView(std::unique_ptr<packet::BasePacketBuilder> packet… in GetPacketView() 79 hci::BitInserter i(*bytes); in GetPacketView() 85 class TestHciLayer : public hci::HciLayer { 88 std::unique_ptr<hci::CommandBuilder> command, in EnqueueCommand() 89 common::ContextualOnceCallback<void(hci::CommandCompleteView)> on_complete) override { in EnqueueCommand() 95 std::unique_ptr<hci::CommandBuilder> command, in EnqueueCommand() [all …]
|
D | inquiry.cc | 52 void SetScanType(hci::InquiryScanType scan_type); 54 void SetInquiryMode(hci::InquiryMode mode); 74 hci::InquiryMode inquiry_mode_; 75 hci::InquiryScanType inquiry_scan_type_; 80 void EnqueueCommandComplete(std::unique_ptr<hci::CommandBuilder> command); 81 void EnqueueCommandStatus(std::unique_ptr<hci::CommandBuilder> command); 82 void OnCommandComplete(hci::CommandCompleteView view); 83 void OnCommandStatus(hci::CommandStatusView status); 85 void EnqueueCommandCompleteSync(std::unique_ptr<hci::CommandBuilder> command); 86 void OnCommandCompleteSync(hci::CommandCompleteView view); [all …]
|
D | page.cc | 37 void SetScanType(hci::PageScanType type); 50 hci::PageScanType scan_type_; 53 void OnCommandComplete(hci::CommandCompleteView status); 55 hci::HciLayer* hci_layer_; 63 void neighbor::PageModule::impl::OnCommandComplete(hci::CommandCompleteView view) { in OnCommandComplete() 65 case hci::OpCode::WRITE_PAGE_SCAN_ACTIVITY: { in OnCommandComplete() 66 auto packet = hci::WritePageScanActivityCompleteView::Create(view); in OnCommandComplete() 68 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete() 71 case hci::OpCode::READ_PAGE_SCAN_ACTIVITY: { in OnCommandComplete() 72 auto packet = hci::ReadPageScanActivityCompleteView::Create(view); in OnCommandComplete() [all …]
|
D | name.cc | 48 hci::Address address, 49 hci::PageScanRepetitionMode page_scan_repetition_mode, 51 hci::ClockOffsetValid clock_offset_valid, 54 …void CancelRemoteNameRequest(hci::Address address, CancelRemoteNameCallback, os::Handler* handler); 64 void EnqueueCommandComplete(std::unique_ptr<hci::CommandBuilder> command); 65 void EnqueueCommandStatus(std::unique_ptr<hci::CommandBuilder> command); 67 void OnCommandComplete(hci::CommandCompleteView view); 68 void OnCommandStatus(hci::CommandStatusView status); 69 void OnEvent(hci::EventView view); 71 std::unordered_map<hci::Address, std::unique_ptr<ReadCallbackHandler>> read_callback_handler_map_; [all …]
|
D | scan.cc | 50 void ReadScanEnable(hci::ScanEnable); 52 void OnCommandComplete(hci::CommandCompleteView status); 54 hci::HciLayer* hci_layer_; 63 void neighbor::ScanModule::impl::OnCommandComplete(hci::CommandCompleteView view) { in OnCommandComplete() 65 case hci::OpCode::READ_SCAN_ENABLE: { in OnCommandComplete() 66 auto packet = hci::ReadScanEnableCompleteView::Create(view); in OnCommandComplete() 68 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete() 72 case hci::OpCode::WRITE_SCAN_ENABLE: { in OnCommandComplete() 73 auto packet = hci::WriteScanEnableCompleteView::Create(view); in OnCommandComplete() 75 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete() [all …]
|
/system/bt/gd/hci/fuzz/ |
D | fuzz_hci_layer.h | 29 namespace hci { 36 … common::ContextualOnceCallback<void(hci::CommandCompleteView)> on_complete) override {} in EnqueueCommand() 39 … common::ContextualOnceCallback<void(hci::CommandStatusView)> on_status) override {} in EnqueueCommand() 53 std::unique_ptr<hci::CommandBuilder> command, in EnqueueCommand() 54 common::ContextualOnceCallback<void(hci::CommandCompleteView)> on_complete) override { in EnqueueCommand() 63 common::ContextualOnceCallback<void(hci::CommandStatusView)> on_status) override { 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() 82 void UnregisterEventHandler(hci::EventCode event) override { in UnregisterEventHandler() [all …]
|
/system/bt/gd/security/internal/ |
D | security_manager_impl.h | 43 static constexpr hci::IoCapability kDefaultIoCapability = hci::IoCapability::DISPLAY_YES_NO; 44 static constexpr hci::AuthenticationRequirements kDefaultAuthenticationRequirements = 45 hci::AuthenticationRequirements::GENERAL_BONDING; 60 hci::HciLayer* hci_layer, 61 hci::AclManager* acl_manager, 62 hci::Controller* controller, 87 void CreateBond(hci::AddressWithType address); 99 …hci::AddressWithType address, pairing::OobData remote_p192_oob_data, pairing::OobData remote_p256_… 106 void CreateBondLe(hci::AddressWithType address); 115 void CancelBond(hci::AddressWithType device); [all …]
|
/system/bt/gd/security/ |
D | ui.h | 28 ConfirmationData() : address_with_type_(hci::AddressWithType()), name_("No name set") {} in ConfirmationData() 29 ConfirmationData(bluetooth::hci::AddressWithType address_with_type, std::string name) in ConfirmationData() 31 …ConfirmationData(bluetooth::hci::AddressWithType address_with_type, std::string name, uint32_t num… in ConfirmationData() 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() 65 void SetRemoteOobDataPresent(hci::OobDataPresent remote_oob_data_present) { in SetRemoteOobDataPresent() [all …]
|
/system/bt/vendor_libs/test_vendor_lib/model/controller/ |
D | acl_connection_handler.h | 38 bool CreatePendingConnection(bluetooth::hci::Address addr, 40 bool HasPendingConnection(bluetooth::hci::Address addr) const; 41 bool CancelPendingConnection(bluetooth::hci::Address addr); 44 bool CreatePendingLeConnection(bluetooth::hci::AddressWithType addr); 45 bool HasPendingLeConnection(bluetooth::hci::AddressWithType addr) const; 46 bool CancelPendingLeConnection(bluetooth::hci::AddressWithType addr); 48 uint16_t CreateConnection(bluetooth::hci::Address addr, 49 bluetooth::hci::Address own_addr); 50 uint16_t CreateLeConnection(bluetooth::hci::AddressWithType addr, 51 bluetooth::hci::AddressWithType own_addr); [all …]
|
/system/bt/gd/iso/internal/ |
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() 48 void IsoManagerImpl::OnHciLeEvent(hci::LeMetaEventView event) { in OnHciLeEvent() 49 hci::SubeventCode code = event.GetSubeventCode(); in OnHciLeEvent() 51 if (code == hci::SubeventCode::CIS_ESTABLISHED) { in OnHciLeEvent() 52 hci::LeCisEstablishedView le_cis_established_view = hci::LeCisEstablishedView::Create(event); in OnHciLeEvent() 60 } else if (code == hci::SubeventCode::CIS_REQUEST) { in OnHciLeEvent() 61 hci::LeCisRequestView le_cis_request_view = hci::LeCisRequestView::Create(event); in OnHciLeEvent() 68 hci::LeAcceptCisRequestBuilder::Create(le_cis_request_view.GetCisConnectionHandle()), in OnHciLeEvent() 69 iso_handler_->BindOnce([](hci::CommandStatusView command_status) { in OnHciLeEvent() [all …]
|
/system/bt/gd/l2cap/classic/ |
D | link_property_listener.h | 38 virtual void OnLinkConnected(hci::Address remote, uint16_t handle) {} in OnLinkConnected() 43 virtual void OnLinkDisconnected(hci::Address remote) {} in OnLinkDisconnected() 49 hci::ErrorCode hci_status, in OnReadRemoteVersionInformation() 50 hci::Address remote, in OnReadRemoteVersionInformation() 58 virtual void OnReadRemoteSupportedFeatures(hci::Address remote, uint64_t features) {} in OnReadRemoteSupportedFeatures() 64 hci::Address remote, uint8_t page_number, uint8_t max_page_number, uint64_t features) {} in OnReadRemoteExtendedFeatures() 69 virtual void OnRoleChange(hci::ErrorCode hci_status, hci::Address remote, hci::Role role) {} in OnRoleChange() 74 virtual void OnReadClockOffset(hci::Address remote, uint16_t clock_offset) {} in OnReadClockOffset() 79 …virtual void OnModeChange(hci::ErrorCode hci_status, hci::Address remote, hci::Mode mode, uint16_t… in OnModeChange() 85 hci::ErrorCode hci_status, in OnSniffSubrating() [all …]
|
/system/bt/gd/rust/shim/src/ |
D | hci.rs | 6 use bt_packets::hci::{AclPacket, CommandPacket, Packet}; 36 hci: &mut Hci, in hci_send_command() 43 let mut commands = hci.internal.commands.clone(); in hci_send_command() 44 hci.rt.spawn(async move { in hci_send_command() 53 pub fn hci_send_acl(hci: &mut Hci, data: &[u8]) { in hci_send_acl() 56 let tx = hci.internal.acl_tx.clone(); in hci_send_acl() 57 hci.rt.spawn(async move { in hci_send_acl() 65 pub fn hci_register_event(hci: &mut Hci, event: u8) { in hci_register_event() 66 let mut hci_facade = hci.internal.clone(); in hci_register_event() 67 hci.rt.spawn(async move { in hci_register_event() [all …]
|
/system/bt/gd/l2cap/le/internal/ |
D | link_manager.h | 43 class LinkManager : public hci::acl_manager::LeConnectionCallbacks { 47 hci::AclManager* acl_manager, in LinkManager() 70 Link* GetLink(hci::AddressWithType address_with_type); 71 void OnLeConnectSuccess(hci::AddressWithType connecting_address_with_type, 72 … std::unique_ptr<hci::acl_manager::LeAclConnection> acl_connection) override; 73 void OnLeConnectFail(hci::AddressWithType address_with_type, hci::ErrorCode reason) override; 77 void ConnectFixedChannelServices(hci::AddressWithType address_with_type, 82 void ConnectDynamicChannelServices(hci::AddressWithType device, 85 void OnDisconnect(hci::AddressWithType address_with_type); 92 hci::ErrorCode hci_status, [all …]
|