Home
last modified time | relevance | path

Searched refs:hci (Results 1 – 25 of 321) sorted by relevance

12345678910>>...13

/system/bt/gd/hci/
Dsecurity_interface.h23 namespace hci {
25 constexpr hci::EventCode SecurityEvents[] = {
26 hci::EventCode::ENCRYPTION_CHANGE,
27 hci::EventCode::CHANGE_CONNECTION_LINK_KEY_COMPLETE,
28 hci::EventCode::MASTER_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 …]
Denum_helper.h25 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 …]
Dle_scanning_interface.h23 namespace hci {
25 constexpr hci::SubeventCode LeScanningEvents[] = {
26 hci::SubeventCode::SCAN_TIMEOUT,
27 hci::SubeventCode::ADVERTISING_REPORT,
28 hci::SubeventCode::DIRECTED_ADVERTISING_REPORT,
29 hci::SubeventCode::EXTENDED_ADVERTISING_REPORT,
30 hci::SubeventCode::PERIODIC_ADVERTISING_REPORT,
31 hci::SubeventCode::PERIODIC_ADVERTISING_SYNC_ESTABLISHED,
32 hci::SubeventCode::PERIODIC_ADVERTISING_SYNC_LOST,
/system/bt/gd/security/pairing/
Dclassic_pairing_handler_unittest.cc38 using hci::Address;
39 using hci::AuthenticationRequirements;
40 using hci::CommandCompleteBuilder;
41 using hci::IoCapabilityRequestReplyBuilder;
42 using hci::IoCapabilityRequestView;
43 using hci::OobDataPresent;
44 using hci::OpCode;
51 FakeSecurityManagerChannel(os::Handler* handler, hci::HciLayer* hci_layer) in FakeSecurityManagerChannel()
59 void OnLinkDisconnected(hci::Address address) override { in OnLinkDisconnected()
68 void OnHciEventReceived(hci::EventPacketView packet) override { in OnHciEventReceived()
[all …]
Dclassic_pairing_handler.h40 … common::OnceCallback<void(hci::Address, PairingResultOrFailure)> complete_callback, in ClassicPairingHandler()
43 …remote_io_capability_(hci::IoCapability::DISPLAY_YES_NO), remote_oob_present_(hci::OobDataPresent:… in ClassicPairingHandler()
44 …remote_authentication_requirements_(hci::AuthenticationRequirements::DEDICATED_BONDING_MITM_PROTEC… in ClassicPairingHandler()
45 …local_io_capability_(hci::IoCapability::DISPLAY_YES_NO), local_oob_present_(hci::OobDataPresent::N… in ClassicPairingHandler()
46 …local_authentication_requirements_(hci::AuthenticationRequirements::DEDICATED_BONDING_MITM_PROTECT… in ClassicPairingHandler()
52 …void Initiate(bool locally_initiated, hci::IoCapability io_capability, hci::OobDataPresent oob_pre…
53 hci::AuthenticationRequirements auth_requirements) override;
56 void OnReceive(hci::ChangeConnectionLinkKeyCompleteView packet) override;
57 void OnReceive(hci::MasterLinkKeyCompleteView packet) override;
58 void OnReceive(hci::PinCodeRequestView packet) override;
[all …]
Dclassic_pairing_handler.cc56 void ClassicPairingHandler::OnPairingPromptAccepted(const bluetooth::hci::AddressWithType& address,… in OnPairingPromptAccepted()
60 void ClassicPairingHandler::OnConfirmYesNo(const bluetooth::hci::AddressWithType& address, bool con… in OnConfirmYesNo()
63hci::UserConfirmationRequestReplyBuilder::Create(GetRecord()->GetPseudoAddress().GetAddress())); in OnConfirmYesNo()
66hci::UserConfirmationRequestNegativeReplyBuilder::Create(GetRecord()->GetPseudoAddress().GetAddres… in OnConfirmYesNo()
70 void ClassicPairingHandler::OnPasskeyEntry(const bluetooth::hci::AddressWithType& address, uint32_t… in OnPasskeyEntry()
74 void ClassicPairingHandler::Initiate(bool locally_initiated, hci::IoCapability io_capability, in Initiate()
75 hci::OobDataPresent oob_present, in Initiate()
76 hci::AuthenticationRequirements auth_requirements) { in Initiate()
92 if (last_status_ != hci::ErrorCode::SUCCESS) { in Cancel()
93 result = PairingFailure(hci::ErrorCodeText(last_status_)); in Cancel()
[all …]
Dpairing_handler.h46 …virtual void Initiate(bool locally_initiated, hci::IoCapability io_capability, hci::OobDataPresent…
47hci::AuthenticationRequirements auth_requirements) = 0; // This is for local initiated only
49 virtual void OnReceive(hci::ChangeConnectionLinkKeyCompleteView packet) = 0;
50 virtual void OnReceive(hci::MasterLinkKeyCompleteView packet) = 0;
51 virtual void OnReceive(hci::PinCodeRequestView packet) = 0;
52 virtual void OnReceive(hci::LinkKeyRequestView packet) = 0;
53 virtual void OnReceive(hci::LinkKeyNotificationView packet) = 0;
54 virtual void OnReceive(hci::IoCapabilityRequestView packet) = 0;
55 virtual void OnReceive(hci::IoCapabilityResponseView packet) = 0;
56 virtual void OnReceive(hci::SimplePairingCompleteView packet) = 0;
[all …]
/system/bt/gd/security/channel/
Dsecurity_manager_channel_unittest.cc35 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()
84 void OnReceive(hci::AddressWithType device, hci::ChangeConnectionLinkKeyCompleteView packet) { in OnReceive()
[all …]
Dsecurity_manager_channel.h41 virtual void OnHciEventReceived(hci::EventPacketView packet) = 0;
42 virtual void OnConnectionClosed(hci::Address) = 0;
50 SecurityManagerChannel(os::Handler* handler, hci::HciLayer* hci_layer);
59 void Connect(hci::Address address);
68 void Release(hci::Address address);
77 void Disconnect(hci::Address address);
84 void SendCommand(std::unique_ptr<hci::SecurityCommandBuilder> command);
104 void OnHciEventReceived(hci::EventPacketView packet);
111 void OnCommandComplete(hci::CommandCompleteView packet);
115 void OnLinkDisconnected(hci::Address address) override;
[all …]
/system/bt/gd/neighbor/
Dinquiry_test.cc57 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::CommandPacketBuilder> command, in EnqueueCommand()
89 common::ContextualOnceCallback<void(hci::CommandCompleteView)> on_complete) override { in EnqueueCommand()
95 std::unique_ptr<hci::CommandPacketBuilder> command, in EnqueueCommand()
[all …]
Dinquiry.cc52 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::CommandPacketBuilder> command);
81 void EnqueueCommandStatus(std::unique_ptr<hci::CommandPacketBuilder> command);
82 void OnCommandComplete(hci::CommandCompleteView view);
83 void OnCommandStatus(hci::CommandStatusView status);
85 void EnqueueCommandCompleteSync(std::unique_ptr<hci::CommandPacketBuilder> command);
86 void OnCommandCompleteSync(hci::CommandCompleteView view);
[all …]
Dpage.cc37 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 …]
Dname.cc48 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::CommandPacketBuilder> command);
65 void EnqueueCommandStatus(std::unique_ptr<hci::CommandPacketBuilder> command);
67 void OnCommandComplete(hci::CommandCompleteView view);
68 void OnCommandStatus(hci::CommandStatusView status);
69 void OnEvent(hci::EventPacketView view);
71 std::unordered_map<hci::Address, std::unique_ptr<ReadCallbackHandler>> read_callback_handler_map_;
[all …]
Dscan.cc50 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 …]
Ddiscoverability.cc37 void StartDiscoverability(std::vector<hci::Lap>& laps);
49 std::vector<hci::Lap> laps_;
51 void OnCommandComplete(hci::CommandCompleteView status);
53 hci::HciLayer* hci_layer_;
66 void neighbor::DiscoverabilityModule::impl::OnCommandComplete(hci::CommandCompleteView status) { in OnCommandComplete()
68 case hci::OpCode::READ_CURRENT_IAC_LAP: { in OnCommandComplete()
69 auto packet = hci::ReadCurrentIacLapCompleteView::Create(status); in OnCommandComplete()
71 ASSERT(packet.GetStatus() == hci::ErrorCode::SUCCESS); in OnCommandComplete()
75 case hci::OpCode::WRITE_CURRENT_IAC_LAP: { in OnCommandComplete()
76 auto packet = hci::WriteCurrentIacLapCompleteView::Create(status); in OnCommandComplete()
[all …]
Dname_db.cc41 …void ReadRemoteNameRequest(hci::Address address, ReadRemoteNameDbCallback callback, os::Handler* h…
43 bool IsNameCached(hci::Address address) const;
44 RemoteName ReadCachedRemoteName(hci::Address address) const;
52 std::unordered_map<hci::Address, PendingRemoteNameRead> address_to_pending_read_map_;
53 std::unordered_map<hci::Address, RemoteName> address_to_name_map_;
55 void OnRemoteNameResponse(hci::ErrorCode status, hci::Address address, RemoteName name);
68 hci::Address address, ReadRemoteNameDbCallback callback, os::Handler* handler) { in ReadRemoteNameRequest()
77 hci::PageScanRepetitionMode page_scan_repetition_mode = hci::PageScanRepetitionMode::R1; in ReadRemoteNameRequest()
79 hci::ClockOffsetValid clock_offset_valid = hci::ClockOffsetValid::INVALID; in ReadRemoteNameRequest()
89 void neighbor::NameDbModule::impl::OnRemoteNameResponse(hci::ErrorCode status, hci::Address address… in OnRemoteNameResponse()
[all …]
/system/bt/gd/hci/fuzz/
Dfuzz_hci_layer.h29 namespace hci {
36 … common::ContextualOnceCallback<void(hci::CommandCompleteView)> on_complete) override {} in EnqueueCommand()
39 … common::ContextualOnceCallback<void(hci::CommandStatusView)> on_status) override {} in EnqueueCommand()
52 void EnqueueCommand(std::unique_ptr<hci::CommandPacketBuilder> command, in EnqueueCommand()
53 … common::ContextualOnceCallback<void(hci::CommandCompleteView)> on_complete) override { in EnqueueCommand()
61 … common::ContextualOnceCallback<void(hci::CommandStatusView)> on_status) override { in EnqueueCommand()
68 common::BidiQueueEnd<hci::AclPacketBuilder, hci::AclPacketView>* GetAclQueueEnd() override { in GetAclQueueEnd()
72 void RegisterEventHandler(hci::EventCode event, in RegisterEventHandler()
73 … common::ContextualCallback<void(hci::EventPacketView)> handler) override { in RegisterEventHandler()
77 void UnregisterEventHandler(hci::EventCode event) override { in UnregisterEventHandler()
[all …]
/system/bt/main/shim/
Dhci_layer.cc49 bool IsCommandStatusOpcode(bluetooth::hci::OpCode op_code) { in IsCommandStatusOpcode()
51 case bluetooth::hci::OpCode::INQUIRY: in IsCommandStatusOpcode()
52 case bluetooth::hci::OpCode::CREATE_CONNECTION: in IsCommandStatusOpcode()
53 case bluetooth::hci::OpCode::DISCONNECT: in IsCommandStatusOpcode()
54 case bluetooth::hci::OpCode::ACCEPT_CONNECTION_REQUEST: in IsCommandStatusOpcode()
55 case bluetooth::hci::OpCode::REJECT_CONNECTION_REQUEST: in IsCommandStatusOpcode()
56 case bluetooth::hci::OpCode::CHANGE_CONNECTION_PACKET_TYPE: in IsCommandStatusOpcode()
57 case bluetooth::hci::OpCode::AUTHENTICATION_REQUESTED: in IsCommandStatusOpcode()
58 case bluetooth::hci::OpCode::SET_CONNECTION_ENCRYPTION: in IsCommandStatusOpcode()
59 case bluetooth::hci::OpCode::CHANGE_CONNECTION_LINK_KEY: in IsCommandStatusOpcode()
[all …]
Dhelpers.h24 inline RawAddress ToRawAddress(const hci::Address& address) { in ToRawAddress()
35 inline hci::Address ToGdAddress(const RawAddress& address) { in ToGdAddress()
36 hci::Address ret; in ToGdAddress()
46 inline hci::AddressWithType ToAddressWithType(const RawAddress& legacy_address, in ToAddressWithType()
48 hci::Address address = ToGdAddress(legacy_address); in ToAddressWithType()
50 hci::AddressType type; in ToAddressWithType()
52 type = hci::AddressType::PUBLIC_DEVICE_ADDRESS; in ToAddressWithType()
54 type = hci::AddressType::RANDOM_DEVICE_ADDRESS; in ToAddressWithType()
56 type = hci::AddressType::PUBLIC_IDENTITY_ADDRESS; in ToAddressWithType()
58 type = hci::AddressType::RANDOM_IDENTITY_ADDRESS; in ToAddressWithType()
[all …]
/system/bt/gd/security/internal/
Dsecurity_manager_impl.h40 static constexpr hci::IoCapability kDefaultIoCapability = hci::IoCapability::DISPLAY_YES_NO;
41 static constexpr hci::OobDataPresent kDefaultOobDataPresent = hci::OobDataPresent::NOT_PRESENT;
42 static constexpr hci::AuthenticationRequirements kDefaultAuthenticationRequirements =
43 hci::AuthenticationRequirements::GENERAL_BONDING;
58 hci::HciLayer* hci_layer,
59 hci::AclManager* acl_manager,
83 void CreateBond(hci::AddressWithType address);
90 void CreateBondLe(hci::AddressWithType address);
99 void CancelBond(hci::AddressWithType device);
109 void RemoveBond(hci::AddressWithType device);
[all …]
/system/bt/vendor_libs/test_vendor_lib/model/controller/
Dacl_connection_handler.h37 bool CreatePendingConnection(bluetooth::hci::Address addr,
39 bool HasPendingConnection(bluetooth::hci::Address addr) const;
40 bool CancelPendingConnection(bluetooth::hci::Address addr);
43 bool CreatePendingLeConnection(bluetooth::hci::AddressWithType addr);
44 bool HasPendingLeConnection(bluetooth::hci::AddressWithType addr) const;
45 bool CancelPendingLeConnection(bluetooth::hci::AddressWithType addr);
47 uint16_t CreateConnection(bluetooth::hci::Address addr,
48 bluetooth::hci::Address own_addr);
49 uint16_t CreateLeConnection(bluetooth::hci::AddressWithType addr,
50 bluetooth::hci::AddressWithType own_addr);
[all …]
/system/bt/gd/l2cap/classic/internal/
Dlink_manager.h39 class LinkManager : public hci::acl_manager::ConnectionCallbacks {
41 LinkManager(os::Handler* l2cap_handler, hci::AclManager* acl_manager, in LinkManager()
62 Link* GetLink(hci::Address device);
63 …void OnConnectSuccess(std::unique_ptr<hci::acl_manager::ClassicAclConnection> acl_connection) over…
64 void OnConnectFail(hci::Address device, hci::ErrorCode reason) override;
65 virtual void OnDisconnect(hci::Address device, hci::ErrorCode status);
69 …void ConnectFixedChannelServices(hci::Address device, PendingFixedChannelConnection pending_fixed_…
74 hci::Address device, Link::PendingDynamicChannelConnection pending_connection, Psm psm);
77 void InitiateConnectionForSecurity(hci::Address remote);
85 void handle_link_security_hold(hci::Address remote);
[all …]
Dfixed_channel_impl_test.cc72 hci::AddressWithType device{hci::Address{{0x01, 0x02, 0x03, 0x04, 0x05, 0x06}}, in TEST_F()
73 hci::AddressType::PUBLIC_IDENTITY_ADDRESS}; in TEST_F()
89 hci::AddressWithType device{hci::Address{{0x01, 0x02, 0x03, 0x04, 0x05, 0x06}}, in TEST_F()
90 hci::AddressType::PUBLIC_IDENTITY_ADDRESS}; in TEST_F()
96 hci::ErrorCode my_status = hci::ErrorCode::SUCCESS; in TEST_F()
98 …user_handler.get(), common::testing::BindLambdaForTesting([&](hci::ErrorCode status) { my_status =… in TEST_F()
101 fixed_channel_impl.OnClosed(hci::ErrorCode::REMOTE_USER_TERMINATED_CONNECTION); in TEST_F()
103 EXPECT_EQ(hci::ErrorCode::REMOTE_USER_TERMINATED_CONNECTION, my_status); in TEST_F()
118 hci::AddressWithType device{hci::Address{{0x01, 0x02, 0x03, 0x04, 0x05, 0x06}}, in TEST_F()
119 hci::AddressType::PUBLIC_IDENTITY_ADDRESS}; in TEST_F()
[all …]
/system/bt/gd/l2cap/le/internal/
Dlink_manager.h40 class LinkManager : public hci::acl_manager::LeConnectionCallbacks {
42 …LinkManager(os::Handler* l2cap_handler, hci::AclManager* acl_manager, FixedChannelServiceManagerIm… in LinkManager()
61 Link* GetLink(hci::AddressWithType address_with_type);
62 void OnLeConnectSuccess(hci::AddressWithType connecting_address_with_type,
63 … std::unique_ptr<hci::acl_manager::LeAclConnection> acl_connection) override;
64 void OnLeConnectFail(hci::AddressWithType address_with_type, hci::ErrorCode reason) override;
68 void ConnectFixedChannelServices(hci::AddressWithType address_with_type,
73 void ConnectDynamicChannelServices(hci::AddressWithType device,
76 void OnDisconnect(hci::AddressWithType address_with_type);
81 hci::AclManager* acl_manager_;
[all …]
/system/bt/gd/security/test/
Dmocks.h35 MOCK_METHOD2(DisplayPairingPrompt, void(const bluetooth::hci::AddressWithType&, std::string));
36 MOCK_METHOD1(Cancel, void(const bluetooth::hci::AddressWithType&));
37 …MOCK_METHOD3(DisplayConfirmValue, void(const bluetooth::hci::AddressWithType&, std::string, uint32…
38 MOCK_METHOD2(DisplayYesNoDialog, void(const bluetooth::hci::AddressWithType&, std::string));
39 …MOCK_METHOD2(DisplayEnterPasskeyDialog, void(const bluetooth::hci::AddressWithType&, std::string));
40 MOCK_METHOD3(DisplayPasskey, void(const bluetooth::hci::AddressWithType&, std::string, uint32_t));
46 class LeSecurityInterfaceMock : public hci::LeSecurityInterface {
48 MOCK_METHOD2(EnqueueCommand, void(std::unique_ptr<hci::LeSecurityCommandBuilder> command,
49 … common::ContextualOnceCallback<void(hci::CommandCompleteView)> on_complete));
50 MOCK_METHOD2(EnqueueCommand, void(std::unique_ptr<hci::LeSecurityCommandBuilder> command,
[all …]

12345678910>>...13