Lines Matching refs:pcb
195 tPAN_CONN* pcb = pan_get_pcb_by_handle(handle); in pan_conn_ind_cb() local
196 if (pcb) { in pan_conn_ind_cb()
209 if (pcb->con_state == PAN_STATE_CONNECTED) { in pan_conn_ind_cb()
213 pcb->prv_src_uuid = pcb->src_uuid; in pan_conn_ind_cb()
214 pcb->prv_dst_uuid = pcb->dst_uuid; in pan_conn_ind_cb()
216 if (pcb->src_uuid == UUID_SERVCLASS_NAP && in pan_conn_ind_cb()
220 (*pan_cb.pan_bridge_req_cb)(pcb->rem_bda, false); in pan_conn_ind_cb()
225 pcb->src_uuid = local_uuid16; in pan_conn_ind_cb()
226 pcb->dst_uuid = remote_uuid16; in pan_conn_ind_cb()
244 pcb = pan_allocate_pcb(p_bda, handle); in pan_conn_ind_cb()
245 if (!pcb) { in pan_conn_ind_cb()
254 pcb->src_uuid = local_uuid16; in pan_conn_ind_cb()
255 pcb->dst_uuid = remote_uuid16; in pan_conn_ind_cb()
256 pcb->con_state = PAN_STATE_CONN_START; in pan_conn_ind_cb()
285 tPAN_CONN* pcb; in pan_connect_state_cb() local
290 pcb = pan_get_pcb_by_handle(handle); in pan_connect_state_cb()
291 if (!pcb) { in pan_connect_state_cb()
300 (*pan_cb.pan_conn_state_cb)(pcb->handle, pcb->rem_bda, result, in pan_connect_state_cb()
305 if (pcb->con_state != PAN_STATE_CONNECTED && in pan_connect_state_cb()
306 (pcb->con_flags & PAN_FLAGS_CONN_COMPLETED)) { in pan_connect_state_cb()
309 pcb->con_state = PAN_STATE_CONNECTED; in pan_connect_state_cb()
310 pcb->con_flags &= (~PAN_FLAGS_CONN_COMPLETED); in pan_connect_state_cb()
312 pcb->src_uuid = pcb->prv_src_uuid; in pan_connect_state_cb()
313 pcb->dst_uuid = pcb->prv_dst_uuid; in pan_connect_state_cb()
316 if ((pcb->src_uuid == UUID_SERVCLASS_NAP) && pan_cb.pan_bridge_req_cb) in pan_connect_state_cb()
317 (*pan_cb.pan_bridge_req_cb)(pcb->rem_bda, true); in pan_connect_state_cb()
322 if (pcb->con_state == PAN_STATE_CONNECTED) { in pan_connect_state_cb()
324 if ((pcb->src_uuid == UUID_SERVCLASS_NAP) && pan_cb.pan_bridge_req_cb) in pan_connect_state_cb()
325 (*pan_cb.pan_bridge_req_cb)(pcb->rem_bda, false); in pan_connect_state_cb()
329 pan_release_pcb(pcb); in pan_connect_state_cb()
334 if (pcb->src_uuid == UUID_SERVCLASS_PANU) in pan_connect_state_cb()
336 else if (pcb->src_uuid == UUID_SERVCLASS_GN) in pan_connect_state_cb()
341 if (pcb->dst_uuid == UUID_SERVCLASS_PANU) in pan_connect_state_cb()
343 else if (pcb->dst_uuid == UUID_SERVCLASS_GN) in pan_connect_state_cb()
348 pcb->con_state = PAN_STATE_CONNECTED; in pan_connect_state_cb()
352 (*pan_cb.pan_conn_state_cb)(pcb->handle, pcb->rem_bda, PAN_SUCCESS, in pan_connect_state_cb()
356 if (pan_cb.pan_bridge_req_cb && pcb->src_uuid == UUID_SERVCLASS_NAP) { in pan_connect_state_cb()
358 (*pan_cb.pan_bridge_req_cb)(pcb->rem_bda, true); in pan_connect_state_cb()
385 tPAN_CONN* pcb; in pan_data_ind_cb() local
401 pcb = pan_get_pcb_by_handle(handle); in pan_data_ind_cb()
402 if (!pcb) { in pan_data_ind_cb()
407 if (pcb->con_state != PAN_STATE_CONNECTED) { in pan_data_ind_cb()
409 pcb->con_state, handle); in pan_data_ind_cb()
416 handle, pcb->src_uuid); in pan_data_ind_cb()
418 if (pan_cb.pcb[i].con_state == PAN_STATE_CONNECTED && in pan_data_ind_cb()
419 pan_cb.pcb[i].handle != handle && in pan_data_ind_cb()
420 pcb->src_uuid == pan_cb.pcb[i].src_uuid) { in pan_data_ind_cb()
421 BNEP_Write(pan_cb.pcb[i].handle, dst, p_data, len, protocol, &src, ext); in pan_data_ind_cb()
426 (*pan_cb.pan_data_ind_cb)(pcb->handle, src, dst, protocol, p_data, len, in pan_data_ind_cb()
434 if (pan_cb.pcb[i].con_state == PAN_STATE_CONNECTED && in pan_data_ind_cb()
435 pcb->src_uuid == pan_cb.pcb[i].src_uuid) { in pan_data_ind_cb()
436 if (pan_cb.pcb[i].rem_bda == dst) { in pan_data_ind_cb()
437 BNEP_Write(pan_cb.pcb[i].handle, dst, p_data, len, protocol, &src, ext); in pan_data_ind_cb()
443 if (pcb->src_uuid == UUID_SERVCLASS_NAP) in pan_data_ind_cb()
450 (*pan_cb.pan_data_ind_cb)(pcb->handle, src, dst, protocol, p_data, len, ext, in pan_data_ind_cb()
479 tPAN_CONN *pcb, *dst_pcb; in pan_data_buf_ind_cb() local
486 pcb = pan_get_pcb_by_handle(handle); in pan_data_buf_ind_cb()
487 if (!pcb) { in pan_data_buf_ind_cb()
493 if (pcb->con_state != PAN_STATE_CONNECTED) { in pan_data_buf_ind_cb()
495 pcb->con_state, handle); in pan_data_buf_ind_cb()
507 if (pcb->src_uuid == UUID_SERVCLASS_NAP) in pan_data_buf_ind_cb()
513 if (pcb->src_uuid != UUID_SERVCLASS_PANU) { in pan_data_buf_ind_cb()
517 pcb->src_uuid); in pan_data_buf_ind_cb()
519 if (pan_cb.pcb[i].con_state == PAN_STATE_CONNECTED && in pan_data_buf_ind_cb()
520 pan_cb.pcb[i].handle != handle && in pan_data_buf_ind_cb()
521 pcb->src_uuid == pan_cb.pcb[i].src_uuid) { in pan_data_buf_ind_cb()
522 BNEP_Write(pan_cb.pcb[i].handle, dst, p_data, len, protocol, &src, in pan_data_buf_ind_cb()
528 (*pan_cb.pan_data_buf_ind_cb)(pcb->handle, src, dst, protocol, p_buf, in pan_data_buf_ind_cb()
531 (*pan_cb.pan_data_ind_cb)(pcb->handle, src, dst, protocol, p_data, len, in pan_data_buf_ind_cb()
557 (*pan_cb.pan_data_buf_ind_cb)(pcb->handle, src, dst, protocol, p_buf, ext, in pan_data_buf_ind_cb()
560 (*pan_cb.pan_data_ind_cb)(pcb->handle, src, dst, protocol, p_data, len, ext, in pan_data_buf_ind_cb()