Lines Matching refs:lcid
146 uint16_t lcid) { in ConnectServerL2cap() argument
151 ConnectResponse(peer_addr, cmd_id, lcid, L2CAP_CONN_OK, 0)); in ConnectServerL2cap()
154 ConfigRequest(lcid, PointerMemoryEqual(&cfg_req))) in ConnectServerL2cap()
156 l2cap_appl_info_.pL2CA_ConnectInd_Cb(peer_addr, lcid, BT_PSM_RFCOMM, in ConnectServerL2cap()
162 l2cap_appl_info_.pL2CA_ConfigCfm_Cb(lcid, L2CAP_CFG_OK, {}); in ConnectServerL2cap()
167 ConfigResponse(lcid, PointerMemoryEqual(&cfg_req))) in ConnectServerL2cap()
169 l2cap_appl_info_.pL2CA_ConfigInd_Cb(lcid, &cfg_req); in ConnectServerL2cap()
174 CreateQuickSabmPacket(RFCOMM_MX_DLCI, lcid, acl_handle)); in ConnectServerL2cap()
176 CreateQuickUaPacket(RFCOMM_MX_DLCI, lcid, acl_handle)); in ConnectServerL2cap()
177 EXPECT_CALL(l2cap_interface_, DataWrite(lcid, BtHdrEqual(ua_channel_0))) in ConnectServerL2cap()
180 l2cap_appl_info_.pL2CA_DataInd_Cb(lcid, sabm_channel_0); in ConnectServerL2cap()
186 uint16_t lcid, int port_callback_index) { in ConnectServerPort() argument
192 lcid, acl_handle)); in ConnectServerPort()
196 lcid, acl_handle)); in ConnectServerPort()
198 DataWrite(lcid, BtHdrEqual(uih_pn_rsp_to_peer))) in ConnectServerPort()
201 l2cap_appl_info_.pL2CA_DataInd_Cb(lcid, uih_pn_cmd_from_peer); in ConnectServerPort()
209 CreateQuickSabmPacket(GetDlci(false, scn), lcid, acl_handle)); in ConnectServerPort()
217 l2cap_appl_info_.pL2CA_DataInd_Cb(lcid, sabm_channel_dlci); in ConnectServerPort()
225 CreateQuickUaPacket(GetDlci(false, scn), lcid, acl_handle)); in ConnectServerPort()
226 EXPECT_CALL(l2cap_interface_, DataWrite(lcid, BtHdrEqual(ua_channel_dlci))) in ConnectServerPort()
235 CreateQuickMscPacket(true, GetDlci(false, scn), lcid, acl_handle, true, in ConnectServerPort()
238 CreateQuickMscPacket(false, GetDlci(false, scn), lcid, acl_handle, in ConnectServerPort()
242 DataWrite(lcid, BtHdrEqual(uih_msc_response_to_peer))) in ConnectServerPort()
245 CreateQuickMscPacket(false, GetDlci(false, scn), lcid, acl_handle, true, in ConnectServerPort()
248 DataWrite(lcid, BtHdrEqual(uih_msc_cmd_to_peer))) in ConnectServerPort()
251 l2cap_appl_info_.pL2CA_DataInd_Cb(lcid, uih_msc_cmd_from_peer); in ConnectServerPort()
257 CreateQuickMscPacket(true, GetDlci(false, scn), lcid, acl_handle, false, in ConnectServerPort()
260 l2cap_appl_info_.pL2CA_DataInd_Cb(lcid, uih_msc_response_from_peer); in ConnectServerPort()
266 tPORT_CALLBACK* event_callback, uint16_t lcid, in StartClientPort() argument
273 RFCOMM_PN_PRIORITY_0, RFCOMM_K, lcid, acl_handle)); in StartClientPort()
276 .WillOnce(Return(lcid)); in StartClientPort()
279 DataWrite(lcid, BtHdrEqual(uih_pn_channel_3))) in StartClientPort()
291 void TestConnectClientPortL2cap(uint16_t acl_handle, uint16_t lcid) { in TestConnectClientPortL2cap() argument
296 ConfigRequest(lcid, PointerMemoryEqual(&cfg_req))) in TestConnectClientPortL2cap()
298 l2cap_appl_info_.pL2CA_ConnectCfm_Cb(lcid, L2CAP_CONN_OK); in TestConnectClientPortL2cap()
303 l2cap_appl_info_.pL2CA_ConfigCfm_Cb(lcid, L2CAP_CFG_OK, {}); in TestConnectClientPortL2cap()
309 ConfigResponse(lcid, PointerMemoryEqual(&cfg_req))) in TestConnectClientPortL2cap()
313 CreateQuickSabmPacket(RFCOMM_MX_DLCI, lcid, acl_handle)); in TestConnectClientPortL2cap()
314 EXPECT_CALL(l2cap_interface_, DataWrite(lcid, BtHdrEqual(sabm_channel_0))) in TestConnectClientPortL2cap()
316 l2cap_appl_info_.pL2CA_ConfigInd_Cb(lcid, &cfg_req); in TestConnectClientPortL2cap()
322 uint16_t lcid, int port_callback_index, in ConnectClientPort() argument
330 CreateQuickUaPacket(RFCOMM_MX_DLCI, lcid, acl_handle)); in ConnectClientPort()
335 RFCOMM_K_MAX, lcid, acl_handle)); in ConnectClientPort()
337 DataWrite(lcid, BtHdrEqual(uih_pn_channel_3))) in ConnectClientPort()
339 l2cap_appl_info_.pL2CA_DataInd_Cb(lcid, ua_channel_0); in ConnectClientPort()
349 RFCOMM_K_MAX, lcid, acl_handle)); in ConnectClientPort()
358 l2cap_appl_info_.pL2CA_DataInd_Cb(lcid, uih_pn_channel_3_accept); in ConnectClientPort()
363 CreateQuickSabmPacket(GetDlci(false, scn), lcid, acl_handle)); in ConnectClientPort()
364 EXPECT_CALL(l2cap_interface_, DataWrite(lcid, BtHdrEqual(sabm_channel_3))) in ConnectClientPort()
377 CreateQuickMscPacket(true, GetDlci(false, scn), lcid, acl_handle, true, in ConnectClientPort()
379 EXPECT_CALL(l2cap_interface_, DataWrite(lcid, BtHdrEqual(uih_msc_cmd))) in ConnectClientPort()
382 CreateQuickUaPacket(GetDlci(false, scn), lcid, acl_handle)); in ConnectClientPort()
383 l2cap_appl_info_.pL2CA_DataInd_Cb(lcid, ua_channel_3); in ConnectClientPort()
389 CreateQuickMscPacket(false, GetDlci(false, scn), lcid, acl_handle, in ConnectClientPort()
391 l2cap_appl_info_.pL2CA_DataInd_Cb(lcid, uih_msc_response); in ConnectClientPort()
396 CreateQuickMscPacket(false, GetDlci(false, scn), lcid, acl_handle, true, in ConnectClientPort()
399 CreateQuickMscPacket(true, GetDlci(false, scn), lcid, acl_handle, false, in ConnectClientPort()
402 DataWrite(lcid, BtHdrEqual(uih_msc_response_to_peer))) in ConnectClientPort()
404 l2cap_appl_info_.pL2CA_DataInd_Cb(lcid, uih_msc_cmd_from_peer); in ConnectClientPort()
412 uint16_t lcid) { in SendAndVerifyOutgoingTransmission() argument
415 CreateQuickDataPacket(GetDlci(is_initiator, scn), cr, lcid, acl_handle, in SendAndVerifyOutgoingTransmission()
418 EXPECT_CALL(l2cap_interface_, DataWrite(lcid, BtHdrEqual(data_packet))) in SendAndVerifyOutgoingTransmission()
430 uint16_t lcid, in ReceiveAndVerifyIncomingTransmission() argument
434 CreateQuickDataPacket(GetDlci(is_initiator, scn), cr, lcid, acl_handle, in ReceiveAndVerifyIncomingTransmission()
438 l2cap_appl_info_.pL2CA_DataInd_Cb(lcid, data_packet); in ReceiveAndVerifyIncomingTransmission()
477 static const uint16_t lcid = 0x0054; in TEST_F() local
486 ASSERT_NO_FATAL_FAILURE(ConnectServerL2cap(test_address, acl_handle, lcid)); in TEST_F()
488 test_address, server_handle, test_scn, test_mtu, acl_handle, lcid, 0)); in TEST_F()
491 lcid, 0)); in TEST_F()
494 "\r!dlroW olleH", 4, acl_handle, lcid)); in TEST_F()
500 static const uint16_t lcid = 0x0054; in TEST_F() local
511 ASSERT_NO_FATAL_FAILURE(ConnectServerL2cap(test_address, acl_handle, lcid)); in TEST_F()
514 lcid, 0)); in TEST_F()
528 lcid, 1)); in TEST_F()
533 acl_handle, lcid, 0)); in TEST_F()
536 acl_handle, lcid)); in TEST_F()
540 acl_handle, lcid, 1)); in TEST_F()
543 acl_handle, lcid)); in TEST_F()
598 static const uint16_t lcid = 0x0054; in TEST_F() local
606 port_event_cback_0, lcid, acl_handle, &client_handle, true)); in TEST_F()
607 ASSERT_NO_FATAL_FAILURE(TestConnectClientPortL2cap(acl_handle, lcid)); in TEST_F()
610 lcid, 0, true)); in TEST_F()
613 lcid)); in TEST_F()
616 lcid, 0)); in TEST_F()
621 static const uint16_t lcid = 0x0054; in TEST_F() local
631 port_event_cback_0, lcid, acl_handle, &client_handle_0, true)); in TEST_F()
632 ASSERT_NO_FATAL_FAILURE(TestConnectClientPortL2cap(acl_handle, lcid)); in TEST_F()
635 lcid, 0, true)); in TEST_F()
643 port_event_cback_1, lcid, acl_handle, &client_handle_1, false)); in TEST_F()
646 lcid, 1, false)); in TEST_F()
651 acl_handle, lcid)); in TEST_F()
654 acl_handle, lcid, 0)); in TEST_F()
659 acl_handle, lcid)); in TEST_F()
662 acl_handle, lcid, 1)); in TEST_F()