Home
last modified time | relevance | path

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

/system/bt/stack/rfcomm/
Drfc_port_if.cc79 void RFCOMM_DlcEstablishReq(tRFC_MCB* p_mcb, uint8_t dlci, in RFCOMM_DlcEstablishReq() argument
82 PORT_DlcEstablishCnf(p_mcb, dlci, 0, RFCOMM_ERROR); in RFCOMM_DlcEstablishReq()
86 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_DlcEstablishReq()
88 RFCOMM_TRACE_WARNING("%s Unable to find DLCI port dlci:%d", __func__, dlci); in RFCOMM_DlcEstablishReq()
103 void RFCOMM_DlcEstablishRsp(tRFC_MCB* p_mcb, uint8_t dlci, in RFCOMM_DlcEstablishRsp() argument
106 PORT_DlcReleaseInd(p_mcb, dlci); in RFCOMM_DlcEstablishRsp()
110 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_DlcEstablishRsp()
112 RFCOMM_TRACE_WARNING("%s Unable to find DLCI port dlci:%d", __func__, dlci); in RFCOMM_DlcEstablishRsp()
129 void RFCOMM_ParameterNegotiationRequest(tRFC_MCB* p_mcb, uint8_t dlci, in RFCOMM_ParameterNegotiationRequest() argument
135 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_ParameterNegotiationRequest()
[all …]
Drfc_int.h50 extern void RFCOMM_DlcEstablishReq(tRFC_MCB* p_mcb, uint8_t dlci, uint16_t mtu);
51 extern void RFCOMM_DlcEstablishRsp(tRFC_MCB* p_mcb, uint8_t dlci, uint16_t mtu,
54 extern void RFCOMM_DataReq(tRFC_MCB* p_mcb, uint8_t dlci, BT_HDR* p_buf);
56 extern void RFCOMM_DlcReleaseReq(tRFC_MCB* p_mcb, uint8_t dlci);
58 extern void RFCOMM_ParameterNegotiationRequest(tRFC_MCB* p_mcb, uint8_t dlci,
60 extern void RFCOMM_ParameterNegotiationResponse(tRFC_MCB* p_mcb, uint8_t dlci,
64 extern void RFCOMM_FlowReq(tRFC_MCB* p_mcb, uint8_t dlci, bool state);
67 uint8_t dlci,
70 uint8_t dlci,
74 extern void RFCOMM_ControlReq(tRFC_MCB* p_mcb, uint8_t dlci,
[all …]
Dport_rfc.cc70 p_mcb->port_handles[p_port->dlci] = p_port->handle; in port_open_continue()
76 RFCOMM_ParameterNegotiationRequest(p_mcb, p_port->dlci, p_port->mtu); in port_open_continue()
108 RFCOMM_ControlReq(p_mcb, p_port->dlci, &p_port->local_ctrl); in port_start_control()
126 RFCOMM_PortParameterNegotiationRequest(p_mcb, p_port->dlci, in port_start_par_neg()
172 RFCOMM_DlcReleaseReq(p_mcb, p_port->dlci); in port_start_close()
197 RFCOMM_TRACE_EVENT("%s: dlci %d", __func__, p_port->dlci); in PORT_StartCnf()
198 RFCOMM_ParameterNegotiationRequest(p_mcb, p_port->dlci, p_port->mtu); in PORT_StartCnf()
271 void PORT_ParNegInd(tRFC_MCB* p_mcb, uint8_t dlci, uint16_t mtu, uint8_t cl, in PORT_ParNegInd() argument
274 p_mcb->bd_addr.ToString().c_str(), dlci, mtu); in PORT_ParNegInd()
275 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in PORT_ParNegInd()
[all …]
Drfc_port_fsm.cc119 uint32_t scn = (uint32_t)(p_port->dlci / 2); in rfc_port_sm_state_closed()
171 rfc_send_dm(p_port->rfc.p_mcb, p_port->dlci, false); in rfc_port_sm_state_closed()
175 rfc_send_dm(p_port->rfc.p_mcb, p_port->dlci, false); in rfc_port_sm_state_closed()
209 rfc_send_disc(p_port->rfc.p_mcb, p_port->dlci); in rfc_port_sm_sabme_wait_ua()
231 p_port->dlci); in rfc_port_sm_sabme_wait_ua()
234 PORT_DlcEstablishCnf(p_port->rfc.p_mcb, p_port->dlci, in rfc_port_sm_sabme_wait_ua()
242 PORT_DlcEstablishCnf(p_port->rfc.p_mcb, p_port->dlci, in rfc_port_sm_sabme_wait_ua()
250 rfc_send_ua(p_port->rfc.p_mcb, p_port->dlci); in rfc_port_sm_sabme_wait_ua()
251 PORT_DlcEstablishCnf(p_port->rfc.p_mcb, p_port->dlci, in rfc_port_sm_sabme_wait_ua()
258 rfc_send_ua(p_port->rfc.p_mcb, p_port->dlci); in rfc_port_sm_sabme_wait_ua()
[all …]
Dport_utils.cc64 tPORT* port_allocate_port(uint8_t dlci, const RawAddress& bd_addr) { in port_allocate_port() argument
82 p_port->dlci = dlci; in port_allocate_port()
94 << std::to_string(dlci) << ", bd_addr " << bd_addr; in port_allocate_port()
230 p_port->rfc.p_mcb->port_handles[p_port->dlci] = 0; in port_release_port()
264 if (p_port->is_server) p_port->dlci &= 0xfe; in port_release_port()
309 tPORT* port_find_mcb_dlci_port(tRFC_MCB* p_mcb, uint8_t dlci) { in port_find_mcb_dlci_port() argument
311 LOG(ERROR) << __func__ << ": p_mcb is null, dlci=" << std::to_string(dlci); in port_find_mcb_dlci_port()
315 if (dlci > RFCOMM_MAX_DLCI) { in port_find_mcb_dlci_port()
316 LOG(WARNING) << __func__ << ": DLCI " << std::to_string(dlci) in port_find_mcb_dlci_port()
322 uint8_t handle = p_mcb->port_handles[dlci]; in port_find_mcb_dlci_port()
[all …]
Drfc_ts_frames.cc43 void rfc_send_sabme(tRFC_MCB* p_mcb, uint8_t dlci) { in rfc_send_sabme() argument
52 *p_data++ = RFCOMM_EA | cr | (dlci << RFCOMM_SHIFT_DLCI); in rfc_send_sabme()
57 RFCOMM_SABME_FCS((uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET, cr, dlci); in rfc_send_sabme()
71 void rfc_send_ua(tRFC_MCB* p_mcb, uint8_t dlci) { in rfc_send_ua() argument
80 *p_data++ = RFCOMM_EA | cr | (dlci << RFCOMM_SHIFT_DLCI); in rfc_send_ua()
84 *p_data = RFCOMM_UA_FCS((uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET, cr, dlci); in rfc_send_ua()
98 void rfc_send_dm(tRFC_MCB* p_mcb, uint8_t dlci, bool pf) { in rfc_send_dm() argument
107 *p_data++ = RFCOMM_EA | cr | (dlci << RFCOMM_SHIFT_DLCI); in rfc_send_dm()
111 *p_data = RFCOMM_DM_FCS((uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET, cr, dlci); in rfc_send_dm()
125 void rfc_send_disc(tRFC_MCB* p_mcb, uint8_t dlci) { in rfc_send_disc() argument
[all …]
Drfc_l2cap_if.cc270 if (rfc_cb.rfc.rx_frame.dlci == RFCOMM_MX_DLCI) { in RFCOMM_BufDataInd()
286 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, rfc_cb.rfc.rx_frame.dlci); in RFCOMM_BufDataInd()
298 rfc_send_dm(p_mcb, rfc_cb.rfc.rx_frame.dlci, rfc_cb.rfc.rx_frame.pf); in RFCOMM_BufDataInd()
304 p_port = port_find_dlci_port(rfc_cb.rfc.rx_frame.dlci); in RFCOMM_BufDataInd()
307 << +rfc_cb.rfc.rx_frame.dlci << ", lcid=" << loghex(lcid) in RFCOMM_BufDataInd()
309 rfc_send_dm(p_mcb, rfc_cb.rfc.rx_frame.dlci, true); in RFCOMM_BufDataInd()
314 rfc_cb.rfc.rx_frame.dlci, in RFCOMM_BufDataInd()
315 p_mcb->port_handles[rfc_cb.rfc.rx_frame.dlci], in RFCOMM_BufDataInd()
317 p_mcb->port_handles[rfc_cb.rfc.rx_frame.dlci] = p_port->handle; in RFCOMM_BufDataInd()
Dport_int.h142 uint8_t dlci; /* DLCI of the connection */ member
203 extern tPORT* port_allocate_port(uint8_t dlci, const RawAddress& bd_addr);
207 extern tPORT* port_find_mcb_dlci_port(tRFC_MCB* p_mcb, uint8_t dlci);
209 extern tPORT* port_find_dlci_port(uint8_t dlci);
210 extern tPORT* port_find_port(uint8_t dlci, const RawAddress& bd_addr);
Dport_api.cc139 uint8_t dlci; in RFCOMM_CreateConnection() local
142 dlci = static_cast<uint8_t>((scn << 1) + 1); in RFCOMM_CreateConnection()
144 dlci = (scn << 1); in RFCOMM_CreateConnection()
151 p_port = port_find_port(dlci, bd_addr); in RFCOMM_CreateConnection()
162 << ", uuid=" << loghex(uuid) << ", dlci=" << +dlci in RFCOMM_CreateConnection()
172 p_port = port_allocate_port(dlci, bd_addr); in RFCOMM_CreateConnection()
177 << ", dlci=" << +dlci; in RFCOMM_CreateConnection()
237 << ", dlci=" << std::to_string(dlci) in RFCOMM_CreateConnection()
831 RFCOMM_DataReq(p_port->rfc.p_mcb, p_port->dlci, p_buf); in port_write()
Drfc_mx_fsm.cc246 rfc_cb.port.port[handle - 1].dlci += 1; in rfc_mx_sm_state_wait_conn_cnf()
248 rfc_cb.port.port[handle - 1].dlci); in rfc_mx_sm_state_wait_conn_cnf()
589 rfc_cb.port.port[handle - 1].dlci += 1; in rfc_on_l2cap_error()
591 i, rfc_cb.port.port[handle - 1].dlci); in rfc_on_l2cap_error()
Drfc_utils.cc355 p_mcb->port_handles[p_port->dlci] = 0; in rfc_port_closed()
382 if (p_port->tx.peer_fc) PORT_FlowInd(p_port->rfc.p_mcb, p_port->dlci, true); in rfc_inc_credit()
/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 (*allowlist_rfc_dlci)(uint16_t local_cid, uint8_t dlci);
/system/bt/hci/src/
Dbtsnoop.cc151 bool isAllowlistedDlci(uint8_t dlci) { in isAllowlistedDlci() argument
152 return rfc_channels.find(dlci) != rfc_channels.end(); in isAllowlistedDlci()
308 static void allowlist_rfc_dlci(uint16_t local_cid, uint8_t dlci) { in allowlist_rfc_dlci() argument
311 << " DLCI=" << loghex(dlci); in allowlist_rfc_dlci()
318 filter_list[p_ccb->p_lcb->Handle()].addRfcDlci(dlci); in allowlist_rfc_dlci()