Lines Matching defs:p_bcb

141     tBNEP_CONN      *p_bcb = bnepu_find_bcb_by_bd_addr (p_rem_bda);
159 if (!p_bcb)
161 if ((p_bcb = bnepu_allocate_bcb (p_rem_bda)) == NULL)
164 else if (p_bcb->con_state != BNEP_STATE_CONNECTED)
169 memcpy ((UINT8 *)&(p_bcb->prv_src_uuid), (UINT8 *)&(p_bcb->src_uuid), sizeof (tBT_UUID));
170 memcpy ((UINT8 *)&(p_bcb->prv_dst_uuid), (UINT8 *)&(p_bcb->dst_uuid), sizeof (tBT_UUID));
174 p_bcb->con_flags |= BNEP_FLAGS_IS_ORIG;
176 memcpy ((UINT8 *)&(p_bcb->src_uuid), (UINT8 *)src_uuid, sizeof (tBT_UUID));
177 memcpy ((UINT8 *)&(p_bcb->dst_uuid), (UINT8 *)dst_uuid, sizeof (tBT_UUID));
179 if (p_bcb->con_state == BNEP_STATE_CONNECTED)
182 p_bcb->con_state = BNEP_STATE_SEC_CHECKING;
185 p_bcb->src_uuid.uu.uuid16);
188 btm_sec_mx_access_request (p_bcb->rem_bda, BT_PSM_BNEP, TRUE,
191 &bnep_sec_check_complete, p_bcb);
193 bnep_sec_check_complete (p_bcb->rem_bda, p_bcb, BTM_SUCCESS);
200 p_bcb->con_state = BNEP_STATE_CONN_START;
202 if ((cid = L2CA_ConnectReq (BT_PSM_BNEP, p_bcb->rem_bda)) != 0)
204 p_bcb->l2cap_cid = cid;
211 (*bnep_cb.p_conn_state_cb) (p_bcb->handle, p_bcb->rem_bda, BNEP_CONN_FAILED, FALSE);
212 bnepu_release_bcb (p_bcb);
217 btu_start_timer (&p_bcb->conn_tle, BTU_TTYPE_BNEP, BNEP_CONN_TIMEOUT);
220 *p_handle = p_bcb->handle;
242 tBNEP_CONN *p_bcb;
248 p_bcb = &(bnep_cb.bcb[handle - 1]);
250 if (p_bcb->con_state != BNEP_STATE_CONN_SETUP ||
251 (!(p_bcb->con_flags & BNEP_FLAGS_SETUP_RCVD)))
263 bnep_send_conn_responce (p_bcb, resp_code);
264 p_bcb->con_flags &= (~BNEP_FLAGS_SETUP_RCVD);
267 bnep_connected (p_bcb);
268 else if (p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED)
271 p_bcb->con_state = BNEP_STATE_CONNECTED;
272 p_bcb->con_flags &= (~BNEP_FLAGS_SETUP_RCVD);
274 memcpy ((UINT8 *)&(p_bcb->src_uuid), (UINT8 *)&(p_bcb->prv_src_uuid), sizeof (tBT_UUID));
275 memcpy ((UINT8 *)&(p_bcb->dst_uuid), (UINT8 *)&(p_bcb->prv_dst_uuid), sizeof (tBT_UUID));
279 if (p_bcb->p_pending_data)
284 rem_len = p_bcb->p_pending_data->len;
285 p = (UINT8 *)(p_bcb->p_pending_data + 1) + p_bcb->p_pending_data->offset;
296 p = bnep_process_control_packet (p_bcb, p, &rem_len, TRUE);
299 GKI_freebuf (p_bcb->p_pending_data);
300 p_bcb->p_pending_data = NULL;
320 tBNEP_CONN *p_bcb;
325 p_bcb = &(bnep_cb.bcb[handle - 1]);
327 if (p_bcb->con_state == BNEP_STATE_IDLE)
332 L2CA_DisconnectReq (p_bcb->l2cap_cid);
334 bnepu_release_bcb (p_bcb);
368 tBNEP_CONN *p_bcb;
377 p_bcb = &(bnep_cb.bcb[handle - 1]);
388 if (bnep_is_packet_allowed (p_bcb, p_dest_addr, protocol, fw_ext_present, p_data) != BNEP_SUCCESS)
435 if (p_bcb->xmit_q.count >= BNEP_MAX_XMITQ_DEPTH)
442 bnepu_build_bnep_hdr (p_bcb, p_buf, protocol, p_src_addr, p_dest_addr, fw_ext_present);
445 bnepu_check_send_packet (p_bcb, p_buf);
482 tBNEP_CONN *p_bcb;
495 p_bcb = &(bnep_cb.bcb[handle - 1]);
498 if (bnep_is_packet_allowed (p_bcb, p_dest_addr, protocol, fw_ext_present, p_data) != BNEP_SUCCESS)
541 if (p_bcb->xmit_q.count >= BNEP_MAX_XMITQ_DEPTH)
558 bnepu_build_bnep_hdr (p_bcb, p_buf, protocol, p_src_addr, p_dest_addr, fw_ext_present);
561 bnepu_check_send_packet (p_bcb, p_buf);
591 tBNEP_CONN *p_bcb;
596 p_bcb = &(bnep_cb.bcb[handle - 1]);
599 if ((p_bcb->con_state != BNEP_STATE_CONNECTED) &&
600 (!(p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED)))
613 p_bcb->sent_prot_filter_start[xx] = *p_start_array++;
614 p_bcb->sent_prot_filter_end[xx] = *p_end_array++;
617 p_bcb->sent_num_filters = num_filters;
619 bnepu_send_peer_our_filters (p_bcb);
654 tBNEP_CONN *p_bcb;
659 p_bcb = &(bnep_cb.bcb[handle - 1]);
662 if ((p_bcb->con_state != BNEP_STATE_CONNECTED) &&
663 (!(p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED)))
676 memcpy (p_bcb->sent_mcast_filter_start[xx], p_start_array, BD_ADDR_LEN);
677 memcpy (p_bcb->sent_mcast_filter_end[xx], p_end_array, BD_ADDR_LEN);
683 p_bcb->sent_mcast_filters = num_filters;
685 bnepu_send_peer_our_multi_filters (p_bcb);
746 tBNEP_CONN *p_bcb;
754 p_bcb = &(bnep_cb.bcb[handle - 1]);
757 if ((p_bcb->con_state != BNEP_STATE_CONNECTED) &&
758 (!(p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED)))
763 p_status->l2cap_cid = p_bcb->l2cap_cid;
764 p_status->rem_mtu_size = p_bcb->rem_mtu_size;
765 p_status->xmit_q_depth = p_bcb->xmit_q.count;
766 p_status->sent_num_filters = p_bcb->sent_num_filters;
767 p_status->sent_mcast_filters = p_bcb->sent_mcast_filters;
768 p_status->rcvd_num_filters = p_bcb->rcvd_num_filters;
769 p_status->rcvd_mcast_filters = p_bcb->rcvd_mcast_filters;
771 memcpy (p_status->rem_bda, p_bcb->rem_bda, BD_ADDR_LEN);
772 memcpy (&(p_status->src_uuid), &(p_bcb->src_uuid), sizeof (tBT_UUID));
773 memcpy (&(p_status->dst_uuid), &(p_bcb->dst_uuid), sizeof (tBT_UUID));