• Home
  • Raw
  • Download

Lines Matching refs:sdp

113 static int sdp_svc_match(struct bt_l2cap_sdp_state_s *sdp,  in sdp_svc_match()  argument
126 for (i = 0; i < sdp->services; i ++) in sdp_svc_match()
127 if (sdp_uuid_match(&sdp->service_list[i], *req, datalen)) in sdp_svc_match()
128 sdp->service_list[i].match = 1; in sdp_svc_match()
136 static ssize_t sdp_svc_search(struct bt_l2cap_sdp_state_s *sdp, in sdp_svc_search() argument
144 for (i = 0; i < sdp->services; i ++) in sdp_svc_search()
145 sdp->service_list[i].match = 0; in sdp_svc_search()
156 if (sdp_svc_match(sdp, &req, &seqlen)) in sdp_svc_search()
158 } else if (sdp_svc_match(sdp, &req, &seqlen)) in sdp_svc_search()
182 for (i = 0; i < sdp->services; i ++) in sdp_svc_search()
183 if (sdp->service_list[i].match) { in sdp_svc_search()
244 static ssize_t sdp_attr_get(struct bt_l2cap_sdp_state_s *sdp, in sdp_attr_get() argument
260 if (handle < 0 || handle > sdp->services) in sdp_attr_get()
262 record = &sdp->service_list[handle]; in sdp_attr_get()
333 static int sdp_svc_attr_match(struct bt_l2cap_sdp_state_s *sdp, in sdp_svc_attr_match() argument
361 for (i = 0; i < sdp->services; i ++) in sdp_svc_attr_match()
362 if ((record = &sdp->service_list[i])->match) in sdp_svc_attr_match()
371 static ssize_t sdp_svc_search_attr_get(struct bt_l2cap_sdp_state_s *sdp, in sdp_svc_search_attr_get() argument
380 for (i = 0; i < sdp->services; i ++) { in sdp_svc_search_attr_get()
381 sdp->service_list[i].match = 0; in sdp_svc_search_attr_get()
382 for (j = 0; j < sdp->service_list[i].attributes; j ++) in sdp_svc_search_attr_get()
383 sdp->service_list[i].attribute_list[j].match = 0; in sdp_svc_search_attr_get()
395 if (sdp_svc_match(sdp, &req, &seqlen)) in sdp_svc_search_attr_get()
397 } else if (sdp_svc_match(sdp, &req, &seqlen)) in sdp_svc_search_attr_get()
415 if (sdp_svc_attr_match(sdp, &req, &seqlen)) in sdp_svc_search_attr_get()
417 } else if (sdp_svc_attr_match(sdp, &req, &seqlen)) in sdp_svc_search_attr_get()
443 for (i = 0; i < sdp->services; i ++) in sdp_svc_search_attr_get()
444 if ((record = &sdp->service_list[i])->match) { in sdp_svc_search_attr_get()
489 struct bt_l2cap_sdp_state_s *sdp = opaque; in bt_l2cap_sdp_sdu_in() local
516 rsp_len = sdp_svc_search(sdp, rsp, data, len); in bt_l2cap_sdp_sdu_in()
521 rsp_len = sdp_attr_get(sdp, rsp, data, len); in bt_l2cap_sdp_sdu_in()
526 rsp_len = sdp_svc_search_attr_get(sdp, rsp, data, len); in bt_l2cap_sdp_sdu_in()
553 sdu_out = sdp->channel->sdu_out(sdp->channel, rsp_len + PDU_HEADER_SIZE); in bt_l2cap_sdp_sdu_in()
562 sdp->channel->sdu_submit(sdp->channel); in bt_l2cap_sdp_sdu_in()
567 struct bt_l2cap_sdp_state_s *sdp = opaque; in bt_l2cap_sdp_close_ch() local
570 for (i = 0; i < sdp->services; i ++) { in bt_l2cap_sdp_close_ch()
571 qemu_free(sdp->service_list[i].attribute_list->pair); in bt_l2cap_sdp_close_ch()
572 qemu_free(sdp->service_list[i].attribute_list); in bt_l2cap_sdp_close_ch()
573 qemu_free(sdp->service_list[i].uuid); in bt_l2cap_sdp_close_ch()
575 qemu_free(sdp->service_list); in bt_l2cap_sdp_close_ch()
576 qemu_free(sdp); in bt_l2cap_sdp_close_ch()
750 static void sdp_service_db_build(struct bt_l2cap_sdp_state_s *sdp, in sdp_service_db_build() argument
753 sdp->services = 0; in sdp_service_db_build()
754 while (service[sdp->services]) in sdp_service_db_build()
755 sdp->services ++; in sdp_service_db_build()
756 sdp->service_list = in sdp_service_db_build()
757 qemu_mallocz(sdp->services * sizeof(*sdp->service_list)); in sdp_service_db_build()
759 sdp->services = 0; in sdp_service_db_build()
761 sdp_service_record_build(&sdp->service_list[sdp->services], in sdp_service_db_build()
762 *service, sdp->services); in sdp_service_db_build()
764 sdp->services ++; in sdp_service_db_build()
896 SERVICE(sdp,
946 struct bt_l2cap_sdp_state_s *sdp = qemu_mallocz(sizeof(*sdp)); in bt_l2cap_sdp_new_ch() local
954 sdp->channel = params; in bt_l2cap_sdp_new_ch()
955 sdp->channel->opaque = sdp; in bt_l2cap_sdp_new_ch()
956 sdp->channel->close = bt_l2cap_sdp_close_ch; in bt_l2cap_sdp_new_ch()
957 sdp->channel->sdu_in = bt_l2cap_sdp_sdu_in; in bt_l2cap_sdp_new_ch()
959 sdp_service_db_build(sdp, services); in bt_l2cap_sdp_new_ch()