/system/bt/gd/l2cap/classic/cert/ |
D | pts_l2cap_test.py | 71 psm = 1 72 …under_test.l2cap.OpenChannel(l2cap_facade_pb2.OpenChannelRequest(remote=self.pts_address, psm=psm)) 81 psm = 1 84 … l2cap_facade_pb2.SetEnableDynamicChannelRequest(psm=psm, retransmission_mode=retransmission_mode)) 94 psm = 1 97 … l2cap_facade_pb2.SetEnableDynamicChannelRequest(psm=psm, retransmission_mode=retransmission_mode)) 106 psm = 1 109 … l2cap_facade_pb2.SetEnableDynamicChannelRequest(psm=psm, retransmission_mode=retransmission_mode)) 119 psm = 1 122 … l2cap_facade_pb2.SetEnableDynamicChannelRequest(psm=psm, retransmission_mode=retransmission_mode)) [all …]
|
/system/bt/gd/l2cap/classic/internal/ |
D | dynamic_channel_service_manager_impl.cc | 28 void DynamicChannelServiceManagerImpl::Register(Psm psm, in Register() argument 30 if (!IsPsmValid(psm)) { in Register() 34 } else if (IsServiceRegistered(psm)) { in Register() 40 psm, in Register() 45 …std::unique_ptr<DynamicChannelService> user_service(new DynamicChannelService(psm, this, l2cap_lay… in Register() 51 void DynamicChannelServiceManagerImpl::Unregister(Psm psm, DynamicChannelService::OnUnregisteredCal… in Unregister() argument 52 if (IsServiceRegistered(psm)) { in Unregister() 53 service_map_.erase(psm); in Unregister() 56 LOG_ERROR("service not registered psm:%d", psm); in Unregister() 60 bool DynamicChannelServiceManagerImpl::IsServiceRegistered(Psm psm) const { in IsServiceRegistered() [all …]
|
D | dynamic_channel_service_manager_impl_mock.h | 34 …MOCK_METHOD(void, Register, (Psm psm, DynamicChannelServiceImpl::PendingRegistration pending_regis… 36 …MOCK_METHOD(void, Unregister, (Psm psm, DynamicChannelService::OnUnregisteredCallback callback), (… 37 MOCK_METHOD(bool, IsServiceRegistered, (Psm psm), (const, override)); 38 MOCK_METHOD(DynamicChannelServiceImpl*, GetService, (Psm psm), (override));
|
D | dynamic_channel_service_manager_impl.h | 42 …virtual void Register(Psm psm, DynamicChannelServiceImpl::PendingRegistration pending_registration… 43 virtual void Unregister(Psm psm, DynamicChannelService::OnUnregisteredCallback callback); 44 virtual bool IsServiceRegistered(Psm psm) const; 45 virtual DynamicChannelServiceImpl* GetService(Psm psm);
|
/system/bt/gd/l2cap/le/internal/ |
D | dynamic_channel_service_manager_impl.cc | 29 void DynamicChannelServiceManagerImpl::Register(Psm psm, in Register() argument 31 if (!IsPsmValid(psm)) { in Register() 36 } else if (IsServiceRegistered(psm)) { in Register() 43 psm, DynamicChannelServiceImpl(pending_registration.user_handler_, in Register() 46 …std::unique_ptr<DynamicChannelService> user_service(new DynamicChannelService(psm, this, l2cap_lay… in Register() 53 void DynamicChannelServiceManagerImpl::Unregister(Psm psm, DynamicChannelService::OnUnregisteredCal… in Unregister() argument 55 if (IsServiceRegistered(psm)) { in Unregister() 56 service_map_.erase(psm); in Unregister() 59 LOG_ERROR("service not registered psm:%d", psm); in Unregister() 63 bool DynamicChannelServiceManagerImpl::IsServiceRegistered(Psm psm) const { in IsServiceRegistered() [all …]
|
D | dynamic_channel_service_manager_impl.h | 41 …virtual void Register(Psm psm, DynamicChannelServiceImpl::PendingRegistration pending_registration… 42 …virtual void Unregister(Psm psm, DynamicChannelService::OnUnregisteredCallback callback, os::Handl… 43 virtual bool IsServiceRegistered(Psm psm) const; 44 virtual DynamicChannelServiceImpl* GetService(Psm psm);
|
/system/bt/main/shim/ |
D | l2cap.cc | 41 bool bluetooth::shim::legacy::PsmManager::IsPsmRegistered(uint16_t psm) const { in IsPsmRegistered() 42 return psm_to_callback_map_.find(psm) != psm_to_callback_map_.end(); in IsPsmRegistered() 45 bool bluetooth::shim::legacy::PsmManager::HasClient(uint16_t psm) const { in HasClient() 46 return IsPsmRegistered(psm) && psm_to_callback_map_.at(psm) != nullptr; in HasClient() 50 uint16_t psm, const tL2CAP_APPL_INFO* callbacks) { in RegisterPsm() argument 51 CHECK(!HasClient(psm)); in RegisterPsm() 52 psm_to_callback_map_[psm] = callbacks; in RegisterPsm() 55 void bluetooth::shim::legacy::PsmManager::RegisterPsm(uint16_t psm) { in RegisterPsm() argument 56 RegisterPsm(psm, nullptr); in RegisterPsm() 59 void bluetooth::shim::legacy::PsmManager::UnregisterPsm(uint16_t psm) { in UnregisterPsm() argument [all …]
|
D | l2cap.h | 39 bool IsPsmRegistered(uint16_t psm) const; 40 bool HasClient(uint16_t psm) const; 41 void RegisterPsm(uint16_t psm, const tL2CAP_APPL_INFO* callbacks); 42 void RegisterPsm(uint16_t psm); 43 void UnregisterPsm(uint16_t psm); 44 const tL2CAP_APPL_INFO* Callbacks(uint16_t psm); 62 uint16_t RegisterService(uint16_t psm, const tL2CAP_APPL_INFO* callbacks, 65 void UnregisterService(uint16_t psm); 67 uint16_t CreateConnection(uint16_t psm, const RawAddress& raw_address); 72 uint16_t psm, uint16_t cid, [all …]
|
D | l2c_api.cc | 58 uint16_t psm = shim_l2cap.ConvertClientToRealPsm(client_psm, in L2CA_Register() local 61 if (shim_l2cap.Classic().IsPsmRegistered(psm)) { in L2CA_Register() 63 client_psm, psm); in L2CA_Register() 66 LOG_INFO("%s classic client_psm:%hd psm:%hd", __func__, client_psm, psm); in L2CA_Register() 68 return shim_l2cap.RegisterService(psm, callbacks, enable_snoop, p_ertm_info, in L2CA_Register() 77 uint16_t psm = shim_l2cap.ConvertClientToRealPsm(client_psm); in L2CA_Deregister() local 79 shim_l2cap.UnregisterService(psm); in L2CA_Deregister() 80 shim_l2cap.RemoveClientPsm(psm); in L2CA_Deregister() 91 void bluetooth::shim::L2CA_FreeLePSM(uint16_t psm) { in L2CA_FreeLePSM() argument 92 if (!shim_l2cap.Le().IsPsmRegistered(psm)) { in L2CA_FreeLePSM() [all …]
|
D | l2c_api.h | 42 uint16_t L2CA_Register(uint16_t psm, tL2CAP_APPL_INFO* p_cb_info, 56 void L2CA_Deregister(uint16_t psm); 91 void L2CA_FreeLePSM(uint16_t psm); 106 uint16_t L2CA_ConnectReq(uint16_t psm, const RawAddress& p_bd_addr); 135 uint16_t L2CA_ErtmConnectReq(uint16_t psm, const RawAddress& p_bd_addr, 152 uint16_t L2CA_RegisterLECoc(uint16_t psm, tL2CAP_APPL_INFO* p_cb_info); 164 void L2CA_DeregisterLECoc(uint16_t psm); 178 uint16_t L2CA_ConnectLECocReq(uint16_t psm, const RawAddress& p_bd_addr,
|
/system/bt/gd/cert/ |
D | py_l2cap.py | 33 def __init__(self, device, psm, l2cap_stream): argument 35 self._psm = psm 45 l2cap_facade_pb2.DynamicChannelPacket(psm=self._psm, payload=payload)) 48 self._device.l2cap.CloseChannel(l2cap_facade_pb2.CloseChannelRequest(psm=self._psm)) 51 …self._device.l2cap.SetTrafficPaused(l2cap_facade_pb2.SetTrafficPausedRequest(psm=self._psm, paused… 60 def __init__(self, grpc_response_future, device, psm, l2cap_stream): argument 63 self._psm = psm 80 …def register_dynamic_channel(self, psm=0x33, mode=l2cap_facade_pb2.RetransmissionFlowControlMode.B… argument 82 l2cap_facade_pb2.SetEnableDynamicChannelRequest(psm=psm, retransmission_mode=mode)) 83 return PyL2capChannel(self._device, psm, self._l2cap_stream) [all …]
|
/system/bt/stack/l2cap/ |
D | l2c_api.cc | 63 uint16_t L2CA_Register(uint16_t psm, tL2CAP_APPL_INFO* p_cb_info, in L2CA_Register() argument 67 return bluetooth::shim::L2CA_Register(psm, p_cb_info, enable_snoop, in L2CA_Register() 72 uint16_t vpsm = psm; in L2CA_Register() 74 L2CAP_TRACE_API("L2CAP - L2CA_Register() called for PSM: 0x%04x", psm); in L2CA_Register() 83 L2CAP_TRACE_ERROR("L2CAP - no cb registering PSM: 0x%04x", psm); in L2CA_Register() 88 if (L2C_INVALID_PSM(psm)) { in L2CA_Register() 89 L2CAP_TRACE_ERROR("L2CAP - invalid PSM value, PSM: 0x%04x", psm); in L2CA_Register() 95 if ((psm >= 0x1001) && (p_cb_info->pL2CA_ConnectInd_Cb == NULL)) { in L2CA_Register() 102 psm, vpsm); in L2CA_Register() 111 psm, vpsm); in L2CA_Register() [all …]
|
/system/bt/gd/l2cap/internal/ |
D | dynamic_channel_allocator_test.cc | 62 Psm psm = 0x03; in TEST_F() local 63 EXPECT_FALSE(channel_allocator_->IsPsmUsed(psm)); in TEST_F() 67 Psm psm = 0x03; in TEST_F() local 69 auto channel = channel_allocator_->AllocateChannel(psm, remote_cid); in TEST_F() 71 EXPECT_TRUE(channel_allocator_->IsPsmUsed(psm)); in TEST_F() 74 EXPECT_FALSE(channel_allocator_->IsPsmUsed(psm)); in TEST_F() 78 Psm psm = 0x03; in TEST_F() local 81 auto channel = channel_allocator_->AllocateReservedChannel(reserved, psm, remote_cid); in TEST_F() 84 EXPECT_TRUE(channel_allocator_->IsPsmUsed(psm)); in TEST_F() 87 EXPECT_FALSE(channel_allocator_->IsPsmUsed(psm)); in TEST_F()
|
D | dynamic_channel_allocator.cc | 30 std::shared_ptr<DynamicChannelImpl> DynamicChannelAllocator::AllocateChannel(Psm psm, Cid remote_ci… in AllocateChannel() argument 31 ASSERT_LOG(IsPsmValid(psm), "Psm 0x%x is invalid", psm); in AllocateChannel() 46 …channels_.try_emplace(cid, std::make_shared<DynamicChannelImpl>(psm, cid, remote_cid, link_, l2cap… in AllocateChannel() 47 ASSERT_LOG(elem.second, "Failed to create channel for psm 0x%x device %s", psm, in AllocateChannel() 55 …ptr<DynamicChannelImpl> DynamicChannelAllocator::AllocateReservedChannel(Cid reserved_cid, Psm psm, in AllocateReservedChannel() argument 57 ASSERT_LOG(IsPsmValid(psm), "Psm 0x%x is invalid", psm); in AllocateReservedChannel() 64 …reserved_cid, std::make_shared<DynamicChannelImpl>(psm, reserved_cid, remote_cid, link_, l2cap_han… in AllocateReservedChannel() 65 ASSERT_LOG(elem.second, "Failed to create channel for psm 0x%x device %s", psm, in AllocateReservedChannel() 96 bool DynamicChannelAllocator::IsPsmUsed(Psm psm) const { in IsPsmUsed() 98 if (channel.second->GetPsm() == psm) { in IsPsmUsed()
|
/system/bt/gd/l2cap/le/cert/ |
D | le_l2cap_test.py | 91 psm=0x33, argument 110 response_future = self.dut_l2cap.connect_coc_to_cert(self.cert_address, psm) 113 cert_channel = self.cert_l2cap.verify_and_respond_open_channel_from_remote(psm) 117 …def _open_channel_from_cert(self, signal_id=1, scid=0x0101, psm=0x33, mtu=1000, mps=100, initial_c… argument 119 dut_channel = self.dut_l2cap.register_coc(self.cert_address, psm) 120 cert_channel = self.cert_l2cap.open_channel(signal_id, psm, scid, mtu, mps, initial_credit) 124 def _open_channel_from_dut(self, psm=0x33): argument 125 response_future = self.dut_l2cap.connect_coc_to_cert(self.cert_address, psm) 126 cert_channel = self.cert_l2cap.verify_and_respond_open_channel_from_remote(psm) 271 … (dut_channel_x, cert_channel_x) = self._open_channel_from_cert(signal_id=1, scid=0x0103, psm=0x33) [all …]
|
D | dual_l2cap_test.py | 100 def _open_le_coc_from_dut(self, psm=0x33, our_scid=None): argument 101 response_future = self.dut_le_l2cap.connect_coc_to_cert(self.cert_address, psm) 102 …cert_channel = self.cert_le_l2cap.verify_and_respond_open_channel_from_remote(psm=psm, our_scid=ou… 106 def _open_channel_from_dut(self, psm=0x33, our_scid=None): argument 107 dut_channel_future = self.dut_l2cap.connect_dynamic_channel_to_cert(psm) 108 … cert_channel = self.cert_l2cap.verify_and_respond_open_channel_from_remote(psm=psm, scid=our_scid) 117 def _open_unconfigured_channel_from_cert(self, signal_id=1, scid=0x0101, psm=0x33): argument 119 dut_channel = self.dut_l2cap.register_dynamic_channel(psm) 120 cert_channel = self.cert_l2cap.open_channel(signal_id, psm, scid) 124 def _open_channel_from_cert(self, signal_id=1, scid=0x0101, psm=0x33): argument [all …]
|
/system/bt/stack/include/ |
D | l2c_api.h | 106 #define L2C_INVALID_PSM(psm) (((psm)&0x0101) != 0x0001) argument 107 #define L2C_IS_VALID_PSM(psm) (((psm)&0x0101) == 0x0001) argument 108 #define L2C_IS_VALID_LE_PSM(psm) (((psm) > 0x0000) && ((psm) < 0x0100)) argument 325 extern uint16_t L2CA_Register(uint16_t psm, tL2CAP_APPL_INFO* p_cb_info, 339 extern void L2CA_Deregister(uint16_t psm); 374 extern void L2CA_FreeLePSM(uint16_t psm); 389 extern uint16_t L2CA_ConnectReq(uint16_t psm, const RawAddress& p_bd_addr); 418 extern uint16_t L2CA_ErtmConnectReq(uint16_t psm, const RawAddress& p_bd_addr, 435 extern uint16_t L2CA_RegisterLECoc(uint16_t psm, tL2CAP_APPL_INFO* p_cb_info); 447 extern void L2CA_DeregisterLECoc(uint16_t psm); [all …]
|
/system/bt/stack/test/common/ |
D | mock_l2cap_layer.cc | 27 uint16_t L2CA_Register(uint16_t psm, tL2CAP_APPL_INFO* p_cb_info, in L2CA_Register() argument 30 VLOG(1) << __func__ << ": psm=" << psm << ", p_cb_info=" << p_cb_info in L2CA_Register() 32 return l2cap_interface->Register(psm, p_cb_info, enable_snoop, p_ertm_info); in L2CA_Register() 35 uint16_t L2CA_ConnectReq(uint16_t psm, const RawAddress& bd_addr) { in L2CA_ConnectReq() argument 36 return l2cap_interface->ConnectRequest(psm, bd_addr); in L2CA_ConnectReq()
|
/system/bt/gd/l2cap/classic/ |
D | facade.cc | 62 if (dynamic_channel_helper_map_.find(request->psm()) == dynamic_channel_helper_map_.end()) { in SendDynamicChannelPacket() 66 if (!dynamic_channel_helper_map_[request->psm()]->SendPacket(packet)) { in SendDynamicChannelPacket() 75 auto service_helper = dynamic_channel_helper_map_.find(request->psm()); in OpenChannel() 81 dynamic_channel_helper_map_[request->psm()]->Connect(peer); in OpenChannel() 88 auto psm = request->psm(); in CloseChannel() local 89 if (dynamic_channel_helper_map_.find(request->psm()) == dynamic_channel_helper_map_.end()) { in CloseChannel() 92 dynamic_channel_helper_map_[psm]->Disconnect(); in CloseChannel() 106 …request->psm(), std::make_unique<L2capDynamicChannelHelper>(this, l2cap_layer_, facade_handler_, r… in SetDynamicChannel() 113 auto psm = request->psm(); in SetTrafficPaused() local 114 if (dynamic_channel_helper_map_.find(request->psm()) == dynamic_channel_helper_map_.end()) { in SetTrafficPaused() [all …]
|
D | dynamic_channel_manager.cc | 30 Psm psm, in ConnectChannel() argument 39 …&internal::LinkManager::ConnectDynamicChannelServices, device, std::move(pending_connection), psm); in ConnectChannel() 43 Psm psm, in RegisterService() argument 55 …service_manager_, &internal::DynamicChannelServiceManagerImpl::Register, psm, std::move(pending_re… in RegisterService()
|
D | facade.proto | 48 uint32 psm = 2; field 53 uint32 psm = 1; field 78 uint32 psm = 1; field 85 uint32 psm = 1; field 92 uint32 psm = 2; field 98 uint32 psm = 2; field
|
/system/bt/gd/l2cap/le/ |
D | facade.proto | 22 uint32 psm = 1; field 29 uint32 psm = 1; field 35 uint32 psm = 2; field 44 uint32 psm = 2; field 56 uint32 psm = 1; field 63 uint32 psm = 2; field
|
D | dynamic_channel_manager.cc | 28 … DynamicChannelConfigurationOption configuration_option, Psm psm, in ConnectChannel() argument 39 std::move(pending_dynamic_channel_connection), psm)); in ConnectChannel() 44 bool DynamicChannelManager::RegisterService(Psm psm, DynamicChannelConfigurationOption configuratio… in RegisterService() argument 56 common::Unretained(service_manager_), psm, in RegisterService()
|
/system/bt/gd/shim/ |
D | l2cap.cc | 209 l2cap::Psm psm, in ConnectionOpened() argument 213 LOG_DEBUG("Connection opened address:%s psm:%hd cid:%hd", address.ToString().c_str(), psm, cid); in ConnectionOpened() 216 static_cast<uint16_t>(psm), in ConnectionOpened() 223 …ConnectionCompleteCallback on_complete, hci::Address address, l2cap::Psm psm, ConnectionInterfaceD… in ConnectionFailed() argument 224 LOG_DEBUG("Connection failed address:%s psm:%hd", address.ToString().c_str(), psm); in ConnectionFailed() 225 …on_complete(address.ToString(), static_cast<uint16_t>(psm), static_cast<uint16_t>(cid), 0, kConnec… in ConnectionFailed() 331 l2cap::Psm psm, in PendingConnection() argument 337 psm_(psm), in PendingConnection() 397 l2cap::Psm psm, 401 void UnregisterService(l2cap::Psm psm, UnregisterServicePromise unregister_promise); [all …]
|
D | l2cap_test.cc | 52 …l2cap::Psm psm, l2cap::classic::internal::DynamicChannelServiceManagerImpl* manager, os::Handler* … in TestDynamicChannelService() argument 53 : DynamicChannelService(psm, manager, handler) {} in TestDynamicChannelService() 76 l2cap::Psm psm, in ConnectChannel() argument 88 l2cap::Psm psm, in RegisterService() argument 149 l2cap::Psm psm, in ConnectChannel() argument 152 …impl_.ConnectChannel(device, configuration_option, psm, std::move(on_open_callback), std::move(on_… in ConnectChannel() 156 l2cap::Psm psm, in RegisterService() argument 162 …psm, configuration_option, security_policy, std::move(on_registration_complete), std::move(on_open… in RegisterService() 192 …void OnConnectionComplete(std::string string_address, uint16_t psm, uint16_t cid, bool connected) { in OnConnectionComplete() argument 194 connection_psm_ = psm; in OnConnectionComplete() [all …]
|