Home
last modified time | relevance | path

Searched refs:psm (Results 1 – 25 of 108) sorted by relevance

12345

/system/bt/gd/l2cap/classic/cert/
Dpts_l2cap_test.py71 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/
Ddynamic_channel_service_manager_impl.cc28 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 …]
Ddynamic_channel_service_manager_impl_mock.h34 …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));
Ddynamic_channel_service_manager_impl.h42 …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/
Ddynamic_channel_service_manager_impl.cc29 void DynamicChannelServiceManagerImpl::Register(Psm psm, in Register() argument
31 if (IsServiceRegistered(psm)) { in Register()
38 psm, DynamicChannelServiceImpl(pending_registration.user_handler_, in Register()
41 …std::unique_ptr<DynamicChannelService> user_service(new DynamicChannelService(psm, this, l2cap_lay… in Register()
48 void DynamicChannelServiceManagerImpl::Unregister(Psm psm, DynamicChannelService::OnUnregisteredCal… in Unregister() argument
50 if (IsServiceRegistered(psm)) { in Unregister()
51 service_map_.erase(psm); in Unregister()
54 LOG_ERROR("service not registered psm:%d", psm); in Unregister()
58 bool DynamicChannelServiceManagerImpl::IsServiceRegistered(Psm psm) const { in IsServiceRegistered()
59 return service_map_.find(psm) != service_map_.end(); in IsServiceRegistered()
[all …]
Ddynamic_channel_service_manager_test.cc82 Psm psm = 0x41; in TEST_F() local
83 EXPECT_FALSE(manager_->IsServiceRegistered(psm)); in TEST_F()
84 manager_->Register(psm, std::move(pending_registration)); in TEST_F()
85 EXPECT_TRUE(manager_->IsServiceRegistered(psm)); in TEST_F()
88 manager_->Unregister(psm, common::BindOnce([] {}), user_handler_); in TEST_F()
89 EXPECT_FALSE(manager_->IsServiceRegistered(psm)); in TEST_F()
98 Psm psm = 0x0100; in TEST_F() local
99 EXPECT_FALSE(manager_->IsServiceRegistered(psm)); in TEST_F()
100 manager_->Register(psm, std::move(pending_registration)); in TEST_F()
101 EXPECT_TRUE(manager_->IsServiceRegistered(psm)); in TEST_F()
Ddynamic_channel_service_manager_impl.h41 …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/gd/cert/
Dpy_l2cap.py37 def __init__(self, device, psm, l2cap_stream): argument
39 self._psm = psm
49 l2cap_facade_pb2.DynamicChannelPacket(psm=self._psm, payload=payload))
52 self._device.l2cap.CloseChannel(l2cap_facade_pb2.CloseChannelRequest(psm=self._psm))
55 …self._device.l2cap.SetTrafficPaused(l2cap_facade_pb2.SetTrafficPausedRequest(psm=self._psm, paused…
64 def __init__(self, grpc_response_future, device, psm, l2cap_stream): argument
67 self._psm = psm
91 …def register_dynamic_channel(self, psm=0x33, mode=l2cap_facade_pb2.RetransmissionFlowControlMode.B… argument
93 l2cap_facade_pb2.SetEnableDynamicChannelRequest(psm=psm, retransmission_mode=mode))
94 return PyL2capChannel(self._device, psm, self._l2cap_stream)
[all …]
/system/bt/test/mock/
Dmock_stack_l2cap_api.h73 std::function<uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
77 body{[](uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
80 uint16_t operator()(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, in operator()
84 return body(psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu, in operator()
94 std::function<uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
98 body{[](uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
101 uint16_t operator()(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, in operator()
105 return body(psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu, in operator()
114 std::function<void(uint16_t psm)> body{[](uint16_t psm) {}};
115 void operator()(uint16_t psm) { body(psm); }; in operator()
[all …]
Dmock_stack_l2cap_api.cc106 uint16_t L2CA_Register2(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, in L2CA_Register2() argument
112 psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu, required_remote_mtu, in L2CA_Register2()
115 uint16_t L2CA_Register(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, in L2CA_Register() argument
121 psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu, required_remote_mtu, in L2CA_Register()
124 void L2CA_Deregister(uint16_t psm) { in L2CA_Deregister() argument
126 test::mock::stack_l2cap_api::L2CA_Deregister(psm); in L2CA_Deregister()
132 void L2CA_FreeLePSM(uint16_t psm) { in L2CA_FreeLePSM() argument
134 test::mock::stack_l2cap_api::L2CA_FreeLePSM(psm); in L2CA_FreeLePSM()
136 uint16_t L2CA_ConnectReq2(uint16_t psm, const RawAddress& p_bd_addr, in L2CA_ConnectReq2() argument
139 return test::mock::stack_l2cap_api::L2CA_ConnectReq2(psm, p_bd_addr, in L2CA_ConnectReq2()
[all …]
Dmock_main_shim_l2cap_api.h130 std::function<void(uint16_t psm)> body{[](uint16_t psm) {}};
131 void operator()(uint16_t psm) { body(psm); }; in operator()
138 std::function<uint16_t(uint16_t psm, const RawAddress& raw_address)> body{
139 [](uint16_t psm, const RawAddress& raw_address) { return 0; }};
140 uint16_t operator()(uint16_t psm, const RawAddress& raw_address) { in operator()
141 return body(psm, raw_address); in operator()
183 std::function<std::vector<uint16_t>(uint16_t psm, const RawAddress& p_bd_addr,
185 body{[this](uint16_t psm, const RawAddress& p_bd_addr,
187 std::vector<uint16_t> operator()(uint16_t psm, const RawAddress& p_bd_addr, in operator()
189 return body(psm, p_bd_addr, p_cfg); in operator()
[all …]
/system/bt/stack/l2cap/
Dl2c_api.cc51 uint16_t L2CA_Register2(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, in L2CA_Register2() argument
55 auto ret = L2CA_Register(psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu, in L2CA_Register2()
57 BTM_SetSecurityLevel(false, "", 0, sec_level, psm, 0, 0); in L2CA_Register2()
75 uint16_t L2CA_Register(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, in L2CA_Register() argument
80 return bluetooth::shim::L2CA_Register(psm, p_cb_info, enable_snoop, in L2CA_Register()
91 uint16_t vpsm = psm; in L2CA_Register()
102 psm, config_cfm_cb, config_ind_cb, data_ind_cb, disconnect_ind_cb); in L2CA_Register()
107 if (L2C_INVALID_PSM(psm)) { in L2CA_Register()
108 LOG_ERROR("L2CAP - invalid PSM value, PSM: 0x%04x", psm); in L2CA_Register()
114 if ((psm >= 0x1001) && (p_cb_info.pL2CA_ConnectInd_Cb == NULL)) { in L2CA_Register()
[all …]
/system/bt/stack/test/common/
Dmock_l2cap_layer.cc27 uint16_t L2CA_Register(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, in L2CA_Register() argument
31 VLOG(1) << __func__ << ": psm=" << psm << ", enable_snoop=" << enable_snoop; 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()
64 uint16_t L2CA_RegisterLECoc(uint16_t psm, const tL2CAP_APPL_INFO& cb_info, in L2CA_RegisterLECoc() argument
66 return l2cap_interface->RegisterLECoc(psm, cb_info, sec_level); in L2CA_RegisterLECoc()
69 void L2CA_DeregisterLECoc(uint16_t psm) { in L2CA_DeregisterLECoc() argument
70 return l2cap_interface->DeregisterLECoc(psm); in L2CA_DeregisterLECoc()
77 std::vector<uint16_t> L2CA_ConnectCreditBasedReq(uint16_t psm, in L2CA_ConnectCreditBasedReq() argument
[all …]
Dmock_l2cap_layer.h29 virtual uint16_t Register(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
32 virtual uint16_t ConnectRequest(uint16_t psm, const RawAddress& bd_addr) = 0;
41 …virtual uint16_t RegisterLECoc(uint16_t psm, const tL2CAP_APPL_INFO &cb_info, uint16_t sec_level) …
42 virtual void DeregisterLECoc(uint16_t psm) = 0;
47 virtual std::vector<uint16_t> ConnectCreditBasedReq(uint16_t psm,
58 uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
61 uint16_t(uint16_t psm, const RawAddress& bd_addr));
71 uint16_t(uint16_t psm, const tL2CAP_APPL_INFO &cb_info, uint16_t sec_level));
72 MOCK_METHOD1(DeregisterLECoc, void(uint16_t psm));
80 std::vector<uint16_t> (uint16_t psm,
/system/bt/gd/l2cap/internal/
Ddynamic_channel_allocator_test.cc62 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()
Ddynamic_channel_allocator.cc30 std::shared_ptr<DynamicChannelImpl> DynamicChannelAllocator::AllocateChannel(Psm psm, Cid remote_ci… in AllocateChannel() argument
44 …channels_.try_emplace(cid, std::make_shared<DynamicChannelImpl>(psm, cid, remote_cid, link_, l2cap… in AllocateChannel()
45 ASSERT_LOG(elem.second, "Failed to create channel for psm 0x%x device %s", psm, in AllocateChannel()
53 …ptr<DynamicChannelImpl> DynamicChannelAllocator::AllocateReservedChannel(Cid reserved_cid, Psm psm, in AllocateReservedChannel() argument
60 …reserved_cid, std::make_shared<DynamicChannelImpl>(psm, reserved_cid, remote_cid, link_, l2cap_han… in AllocateReservedChannel()
61 ASSERT_LOG(elem.second, "Failed to create channel for psm 0x%x device %s", psm, in AllocateReservedChannel()
92 bool DynamicChannelAllocator::IsPsmUsed(Psm psm) const { in IsPsmUsed()
94 if (channel.second->GetPsm() == psm) { in IsPsmUsed()
/system/bt/gd/l2cap/le/cert/
Dle_l2cap_test.py91 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 …]
Ddual_l2cap_test.py100 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/
Dl2c_api.h96 #define L2C_INVALID_PSM(psm) (((psm)&0x0101) != 0x0001) argument
97 #define L2C_IS_VALID_PSM(psm) (((psm)&0x0101) == 0x0001) argument
98 #define L2C_IS_VALID_LE_PSM(psm) (((psm) > 0x0000) && ((psm) < 0x0100)) argument
273 uint16_t psm, uint16_t peer_mtu,
336 uint16_t L2CA_Register2(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
355 extern uint16_t L2CA_Register(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
370 extern void L2CA_Deregister(uint16_t psm);
393 extern void L2CA_FreeLePSM(uint16_t psm);
395 extern uint16_t L2CA_ConnectReq2(uint16_t psm, const RawAddress& p_bd_addr,
410 extern uint16_t L2CA_ConnectReq(uint16_t psm, const RawAddress& p_bd_addr);
[all …]
/system/bt/main/shim/
Dl2c_api.cc70 uint16_t add_classic_cid_token_entry(uint16_t psm) { in add_classic_cid_token_entry() argument
72 classic_cid_token_to_channel_map_[new_token] = psm; in add_classic_cid_token_entry()
82 void remove_classic_dynamic_channel_helper(uint16_t psm);
85 ClassicDynamicChannelHelper(uint16_t psm, tL2CAP_APPL_INFO appl_info, in ClassicDynamicChannelHelper()
88 : psm_(psm), appl_info_(appl_info), config_(config), policy_(policy) {} in ClassicDynamicChannelHelper()
304 void remove_classic_dynamic_channel_helper(uint16_t psm) { in remove_classic_dynamic_channel_helper() argument
305 if (classic_dynamic_channel_helper_map_.count(psm) != 0 && in remove_classic_dynamic_channel_helper()
306 classic_dynamic_channel_helper_map_[psm]->channels_.empty()) { in remove_classic_dynamic_channel_helper()
307 classic_dynamic_channel_helper_map_.erase(psm); in remove_classic_dynamic_channel_helper()
745 void L2CA_Deregister(uint16_t psm) { in L2CA_Deregister() argument
[all …]
Dl2c_api.h43 uint16_t L2CA_Register(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
58 void L2CA_Deregister(uint16_t psm);
81 void L2CA_FreeLePSM(uint16_t psm);
96 uint16_t L2CA_ConnectReq(uint16_t psm, const RawAddress& p_bd_addr);
112 uint16_t L2CA_RegisterLECoc(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
125 void L2CA_DeregisterLECoc(uint16_t psm);
139 uint16_t L2CA_ConnectLECocReq(uint16_t psm, const RawAddress& p_bd_addr,
182 uint16_t psm, const RawAddress& p_bd_addr, tL2CAP_LE_CFG_INFO* p_cfg);
/system/bt/gd/l2cap/le/
Dfacade.proto22 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
Ddynamic_channel_manager.cc28 … 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/l2cap/classic/
Ddynamic_channel_manager.cc30 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()
/system/bt/gd/l2cap/fuzz/
Dfuzz_dynamic_channel_manager.h43 l2cap::Psm psm, in ConnectChannel() argument
46 …impl_.ConnectChannel(device, configuration_option, psm, std::move(on_open_callback), std::move(on_… in ConnectChannel()
50 l2cap::Psm psm, in RegisterService() argument
56psm, configuration_option, security_policy, std::move(on_registration_complete), std::move(on_open… in RegisterService()

12345