Home
last modified time | relevance | path

Searched refs:dlci (Results 1 – 17 of 17) sorted by relevance

/system/bt/stack/rfcomm/
Drfc_port_if.cc77 void RFCOMM_DlcEstablishReq(tRFC_MCB* p_mcb, uint8_t dlci, in RFCOMM_DlcEstablishReq() argument
80 PORT_DlcEstablishCnf(p_mcb, dlci, 0, RFCOMM_ERROR); in RFCOMM_DlcEstablishReq()
84 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_DlcEstablishReq()
86 RFCOMM_TRACE_WARNING("%s Unable to find DLCI port dlci:%d", __func__, dlci); in RFCOMM_DlcEstablishReq()
101 void RFCOMM_DlcEstablishRsp(tRFC_MCB* p_mcb, uint8_t dlci, in RFCOMM_DlcEstablishRsp() argument
104 PORT_DlcReleaseInd(p_mcb, dlci); in RFCOMM_DlcEstablishRsp()
108 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_DlcEstablishRsp()
110 RFCOMM_TRACE_WARNING("%s Unable to find DLCI port dlci:%d", __func__, dlci); in RFCOMM_DlcEstablishRsp()
127 void RFCOMM_ParameterNegotiationRequest(tRFC_MCB* p_mcb, uint8_t dlci, in RFCOMM_ParameterNegotiationRequest() argument
133 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_ParameterNegotiationRequest()
[all …]
Drfc_int.h51 extern void RFCOMM_DlcEstablishReq(tRFC_MCB* p_mcb, uint8_t dlci, uint16_t mtu);
52 extern void RFCOMM_DlcEstablishRsp(tRFC_MCB* p_mcb, uint8_t dlci, uint16_t mtu,
55 extern void RFCOMM_DataReq(tRFC_MCB* p_mcb, uint8_t dlci, BT_HDR* p_buf);
57 extern void RFCOMM_DlcReleaseReq(tRFC_MCB* p_mcb, uint8_t dlci);
59 extern void RFCOMM_ParameterNegotiationRequest(tRFC_MCB* p_mcb, uint8_t dlci,
61 extern void RFCOMM_ParameterNegotiationResponse(tRFC_MCB* p_mcb, uint8_t dlci,
67 extern void RFCOMM_FlowReq(tRFC_MCB* p_mcb, uint8_t dlci, bool state);
70 uint8_t dlci,
73 uint8_t dlci,
77 extern void RFCOMM_ControlReq(tRFC_MCB* p_mcb, uint8_t dlci,
[all …]
Dport_rfc.cc71 p_mcb->port_handles[p_port->dlci] = p_port->handle; in port_open_continue()
77 RFCOMM_ParameterNegotiationRequest(p_mcb, p_port->dlci, p_port->mtu); in port_open_continue()
109 RFCOMM_ControlReq(p_mcb, p_port->dlci, &p_port->local_ctrl); in port_start_control()
127 RFCOMM_PortParameterNegotiationRequest(p_mcb, p_port->dlci, in port_start_par_neg()
173 RFCOMM_DlcReleaseReq(p_mcb, p_port->dlci); in port_start_close()
198 RFCOMM_TRACE_EVENT("%s: dlci %d", __func__, p_port->dlci); in PORT_StartCnf()
199 RFCOMM_ParameterNegotiationRequest(p_mcb, p_port->dlci, p_port->mtu); in PORT_StartCnf()
272 void PORT_ParNegInd(tRFC_MCB* p_mcb, uint8_t dlci, uint16_t mtu, uint8_t cl, in PORT_ParNegInd() argument
275 p_mcb->bd_addr.ToString().c_str(), dlci, mtu); in PORT_ParNegInd()
276 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in PORT_ParNegInd()
[all …]
Drfc_port_fsm.cc124 (uint32_t)(p_port->dlci / 2), &rfc_sec_check_complete, p_port); in rfc_port_sm_state_closed()
146 (uint32_t)(p_port->dlci / 2), in rfc_port_sm_state_closed()
161 rfc_send_dm(p_port->rfc.p_mcb, p_port->dlci, false); in rfc_port_sm_state_closed()
165 rfc_send_dm(p_port->rfc.p_mcb, p_port->dlci, false); in rfc_port_sm_state_closed()
199 rfc_send_disc(p_port->rfc.p_mcb, p_port->dlci); in rfc_port_sm_sabme_wait_ua()
221 p_port->dlci); in rfc_port_sm_sabme_wait_ua()
224 PORT_DlcEstablishCnf(p_port->rfc.p_mcb, p_port->dlci, in rfc_port_sm_sabme_wait_ua()
232 PORT_DlcEstablishCnf(p_port->rfc.p_mcb, p_port->dlci, in rfc_port_sm_sabme_wait_ua()
240 rfc_send_ua(p_port->rfc.p_mcb, p_port->dlci); in rfc_port_sm_sabme_wait_ua()
241 PORT_DlcEstablishCnf(p_port->rfc.p_mcb, p_port->dlci, in rfc_port_sm_sabme_wait_ua()
[all …]
Dport_utils.cc63 tPORT* port_allocate_port(uint8_t dlci, const RawAddress& bd_addr) { in port_allocate_port() argument
81 p_port->dlci = dlci; in port_allocate_port()
93 << std::to_string(dlci) << ", bd_addr " << bd_addr; in port_allocate_port()
228 p_port->rfc.p_mcb->port_handles[p_port->dlci] = 0; in port_release_port()
262 if (p_port->is_server) p_port->dlci &= 0xfe; in port_release_port()
307 tPORT* port_find_mcb_dlci_port(tRFC_MCB* p_mcb, uint8_t dlci) { in port_find_mcb_dlci_port() argument
309 LOG(ERROR) << __func__ << ": p_mcb is null, dlci=" << std::to_string(dlci); in port_find_mcb_dlci_port()
313 if (dlci > RFCOMM_MAX_DLCI) { in port_find_mcb_dlci_port()
314 LOG(WARNING) << __func__ << ": DLCI " << std::to_string(dlci) in port_find_mcb_dlci_port()
320 uint8_t handle = p_mcb->port_handles[dlci]; in port_find_mcb_dlci_port()
[all …]
Drfc_ts_frames.cc42 void rfc_send_sabme(tRFC_MCB* p_mcb, uint8_t dlci) { in rfc_send_sabme() argument
51 *p_data++ = RFCOMM_EA | cr | (dlci << RFCOMM_SHIFT_DLCI); in rfc_send_sabme()
56 RFCOMM_SABME_FCS((uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET, cr, dlci); in rfc_send_sabme()
70 void rfc_send_ua(tRFC_MCB* p_mcb, uint8_t dlci) { in rfc_send_ua() argument
79 *p_data++ = RFCOMM_EA | cr | (dlci << RFCOMM_SHIFT_DLCI); in rfc_send_ua()
83 *p_data = RFCOMM_UA_FCS((uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET, cr, dlci); in rfc_send_ua()
97 void rfc_send_dm(tRFC_MCB* p_mcb, uint8_t dlci, bool pf) { in rfc_send_dm() argument
106 *p_data++ = RFCOMM_EA | cr | (dlci << RFCOMM_SHIFT_DLCI); in rfc_send_dm()
110 *p_data = RFCOMM_DM_FCS((uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET, cr, dlci); in rfc_send_dm()
124 void rfc_send_disc(tRFC_MCB* p_mcb, uint8_t dlci) { in rfc_send_disc() argument
[all …]
Drfc_l2cap_if.cc173 rfc_cb.port.port[handle - 1].dlci += 1; in RFCOMM_ConnectCnf()
175 i, rfc_cb.port.port[handle - 1].dlci); in RFCOMM_ConnectCnf()
303 if (rfc_cb.rfc.rx_frame.dlci == RFCOMM_MX_DLCI) { in RFCOMM_BufDataInd()
319 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, rfc_cb.rfc.rx_frame.dlci); in RFCOMM_BufDataInd()
331 rfc_send_dm(p_mcb, rfc_cb.rfc.rx_frame.dlci, rfc_cb.rfc.rx_frame.pf); in RFCOMM_BufDataInd()
337 p_port = port_find_dlci_port(rfc_cb.rfc.rx_frame.dlci); in RFCOMM_BufDataInd()
340 << +rfc_cb.rfc.rx_frame.dlci << ", lcid=" << loghex(lcid) in RFCOMM_BufDataInd()
342 rfc_send_dm(p_mcb, rfc_cb.rfc.rx_frame.dlci, true); in RFCOMM_BufDataInd()
347 rfc_cb.rfc.rx_frame.dlci, in RFCOMM_BufDataInd()
348 p_mcb->port_handles[rfc_cb.rfc.rx_frame.dlci], in RFCOMM_BufDataInd()
[all …]
Dport_int.h157 uint8_t dlci; /* DLCI of the connection */ member
218 extern tPORT* port_allocate_port(uint8_t dlci, const RawAddress& bd_addr);
222 extern tPORT* port_find_mcb_dlci_port(tRFC_MCB* p_mcb, uint8_t dlci);
224 extern tPORT* port_find_dlci_port(uint8_t dlci);
225 extern tPORT* port_find_port(uint8_t dlci, const RawAddress& bd_addr);
Dport_api.cc132 uint8_t dlci; in RFCOMM_CreateConnection() local
135 dlci = static_cast<uint8_t>((scn << 1) + 1); in RFCOMM_CreateConnection()
137 dlci = (scn << 1); in RFCOMM_CreateConnection()
144 p_port = port_find_port(dlci, bd_addr); in RFCOMM_CreateConnection()
155 << ", uuid=" << loghex(uuid) << ", dlci=" << +dlci in RFCOMM_CreateConnection()
165 p_port = port_allocate_port(dlci, bd_addr); in RFCOMM_CreateConnection()
170 << ", dlci=" << +dlci; in RFCOMM_CreateConnection()
230 << ", dlci=" << std::to_string(dlci) in RFCOMM_CreateConnection()
999 RFCOMM_LineStatusReq(p_port->rfc.p_mcb, p_port->dlci, errors); in PORT_SendError()
1318 RFCOMM_DataReq(p_port->rfc.p_mcb, p_port->dlci, p_buf); in port_write()
Drfc_utils.cc356 p_mcb->port_handles[p_port->dlci] = 0; in rfc_port_closed()
383 if (p_port->tx.peer_fc) PORT_FlowInd(p_port->rfc.p_mcb, p_port->dlci, true); in rfc_inc_credit()
Drfc_mx_fsm.cc245 rfc_cb.port.port[handle - 1].dlci += 1; in rfc_mx_sm_state_wait_conn_cnf()
247 rfc_cb.port.port[handle - 1].dlci); in rfc_mx_sm_state_wait_conn_cnf()
/system/bt/stack/test/rfcomm/
Dstack_rfcomm_test_utils_test.cc53 uint8_t dlci = GetDlci(false, 0); in TEST() local
54 EXPECT_EQ(dlci, 0); in TEST()
55 uint8_t address_field = GetAddressField(true, true, dlci); in TEST()
77 uint8_t dlci = GetDlci(false, 0); in TEST() local
78 EXPECT_EQ(dlci, 0); in TEST()
79 uint8_t address_field = GetAddressField(true, true, dlci); in TEST()
102 uint8_t dlci = GetDlci(false, 0); in TEST() local
103 EXPECT_EQ(dlci, 0); in TEST()
104 uint8_t address_field = GetAddressField(true, true, dlci); in TEST()
133 uint8_t dlci = GetDlci(false, 3); in TEST() local
[all …]
Dstack_rfcomm_test_utils.h64 uint8_t GetAddressField(bool ea, bool cr, uint8_t dlci);
88 std::vector<uint8_t> CreateMccPnFrame(uint8_t dlci, uint8_t i_bits,
104 std::vector<uint8_t> CreateMccMscFrame(uint8_t dlci, bool fc, bool rtc,
144 std::vector<uint8_t> CreateQuickSabmPacket(uint8_t dlci, uint16_t l2cap_lcid,
155 std::vector<uint8_t> CreateQuickUaPacket(uint8_t dlci, uint16_t l2cap_lcid,
193 std::vector<uint8_t> CreateQuickMscPacket(bool rfc_cr, uint8_t dlci,
210 std::vector<uint8_t> CreateQuickDataPacket(uint8_t dlci, bool cr,
226 std::vector<uint8_t> CreateQuickDataPacket(uint8_t dlci, bool cr,
Dstack_rfcomm_test_utils.cc35 uint8_t GetAddressField(bool ea, bool cr, uint8_t dlci) { in GetAddressField() argument
46 address |= dlci << 2; in GetAddressField()
61 std::vector<uint8_t> CreateMccPnFrame(uint8_t dlci, uint8_t i_bits, in CreateMccPnFrame() argument
68 result.push_back(static_cast<uint8_t>(dlci & 0b00111111)); in CreateMccPnFrame()
79 std::vector<uint8_t> CreateMccMscFrame(uint8_t dlci, bool fc, bool rtc, in CreateMccMscFrame() argument
83 result.push_back(static_cast<uint8_t>((dlci << 2) | 0b11)); in CreateMccMscFrame()
142 std::vector<uint8_t> CreateQuickUaPacket(uint8_t dlci, uint16_t l2cap_lcid, in CreateQuickUaPacket() argument
144 uint8_t address_field = GetAddressField(true, true, dlci); in CreateQuickUaPacket()
153 std::vector<uint8_t> CreateQuickSabmPacket(uint8_t dlci, uint16_t l2cap_lcid, in CreateQuickSabmPacket() argument
155 uint8_t address_field = GetAddressField(true, true, dlci); in CreateQuickSabmPacket()
[all …]
/system/bt/stack/include/
Drfcdefs.h69 #define RFCOMM_PARSE_CTRL_FIELD(ea, cr, dlci, p_data) \ argument
73 (dlci) = *(p_data)++ >> RFCOMM_SHIFT_DLCI; \
74 if (!(ea)) (dlci) += *(p_data)++ << RFCOMM_SHIFT_DLCI2; \
77 #define RFCOMM_FORMAT_CTRL_FIELD(p_data, ea, cr, dlci) \ argument
78 (*(p_data)++ = (ea) | (cr) | ((dlci) << RFCOMM_SHIFT_DLCI))
105 #define RFCOMM_VALID_DLCI(dlci) \ argument
106 (((dlci) == 0) || (((dlci) >= 2) && ((dlci) <= RFCOMM_MAX_DLCI)))
/system/bt/hci/include/
Dbtsnoop.h43 void (*whitelist_rfc_dlci)(uint16_t local_cid, uint8_t dlci);
/system/bt/hci/src/
Dbtsnoop.cc149 bool isWhitelistedDlci(uint8_t dlci) { in isWhitelistedDlci() argument
150 return rfc_channels.find(dlci) != rfc_channels.end(); in isWhitelistedDlci()
299 static void whitelist_rfc_dlci(uint16_t local_cid, uint8_t dlci) { in whitelist_rfc_dlci() argument
302 << " DLCI=" << loghex(dlci); in whitelist_rfc_dlci()
306 filter_list[p_ccb->p_lcb->handle].addRfcDlci(dlci); in whitelist_rfc_dlci()