• Home
  • Raw
  • Download

Lines Matching refs:p

44 static bool find_uuid_in_seq(uint8_t* p, uint32_t seq_len, uint8_t* p_his_uuid,
109 static bool find_uuid_in_seq(uint8_t* p, uint32_t seq_len, uint8_t* p_uuid, in find_uuid_in_seq() argument
111 uint8_t* p_end = p + seq_len; in find_uuid_in_seq()
118 while (p < p_end) { in find_uuid_in_seq()
119 type = *p++; in find_uuid_in_seq()
120 p = sdpu_get_len_from_type(p, p_end, type, &len); in find_uuid_in_seq()
121 if (p == NULL || (p + len) > p_end) { in find_uuid_in_seq()
127 if (sdpu_compare_uuid_arrays(p, len, p_uuid, uuid_len)) return (true); in find_uuid_in_seq()
129 if (find_uuid_in_seq(p, len, p_uuid, uuid_len, nest_level + 1)) in find_uuid_in_seq()
132 p = p + len; in find_uuid_in_seq()
199 static int sdp_compose_proto_list(uint8_t* p, uint16_t num_elem, in sdp_compose_proto_list() argument
203 uint8_t* p_head = p; in sdp_compose_proto_list()
212 UINT8_TO_BE_STREAM(p, (DATA_ELE_SEQ_DESC_TYPE << 3) | SIZE_IN_NEXT_BYTE); in sdp_compose_proto_list()
214 p_len = p; in sdp_compose_proto_list()
215 *p++ = (uint8_t)len; in sdp_compose_proto_list()
217 UINT8_TO_BE_STREAM(p, (UUID_DESC_TYPE << 3) | SIZE_TWO_BYTES); in sdp_compose_proto_list()
218 UINT16_TO_BE_STREAM(p, p_elem_list->protocol_uuid); in sdp_compose_proto_list()
227 UINT8_TO_BE_STREAM(p, (UINT_DESC_TYPE << 3) | SIZE_ONE_BYTE); in sdp_compose_proto_list()
228 UINT8_TO_BE_STREAM(p, p_elem_list->params[yy]); in sdp_compose_proto_list()
232 UINT8_TO_BE_STREAM(p, (UINT_DESC_TYPE << 3) | SIZE_TWO_BYTES); in sdp_compose_proto_list()
233 UINT16_TO_BE_STREAM(p, p_elem_list->params[yy]); in sdp_compose_proto_list()
237 return (p - p_head); in sdp_compose_proto_list()
481 uint8_t* p; in SDP_AddSequence() local
487 p = p_buff; in SDP_AddSequence()
491 p_head = p; in SDP_AddSequence()
494 UINT8_TO_BE_STREAM(p, (type[xx] << 3) | SIZE_ONE_BYTE); in SDP_AddSequence()
497 UINT8_TO_BE_STREAM(p, (type[xx] << 3) | SIZE_TWO_BYTES); in SDP_AddSequence()
500 UINT8_TO_BE_STREAM(p, (type[xx] << 3) | SIZE_FOUR_BYTES); in SDP_AddSequence()
503 UINT8_TO_BE_STREAM(p, (type[xx] << 3) | SIZE_EIGHT_BYTES); in SDP_AddSequence()
506 UINT8_TO_BE_STREAM(p, (type[xx] << 3) | SIZE_SIXTEEN_BYTES); in SDP_AddSequence()
509 UINT8_TO_BE_STREAM(p, (type[xx] << 3) | SIZE_IN_NEXT_BYTE); in SDP_AddSequence()
510 UINT8_TO_BE_STREAM(p, len[xx]); in SDP_AddSequence()
514 ARRAY_TO_BE_STREAM(p, p_val[xx], len[xx]); in SDP_AddSequence()
516 if (p - p_buff > SDP_MAX_ATTR_LEN) { in SDP_AddSequence()
518 p = p_head; in SDP_AddSequence()
531 (uint32_t)(p - p_buff), p_buff); in SDP_AddSequence()
555 uint8_t* p; in SDP_AddUuidSequence() local
561 p = p_buff; in SDP_AddUuidSequence()
565 UINT8_TO_BE_STREAM(p, (UUID_DESC_TYPE << 3) | SIZE_TWO_BYTES); in SDP_AddUuidSequence()
566 UINT16_TO_BE_STREAM(p, *p_uuids); in SDP_AddUuidSequence()
568 if ((p - p_buff) > max_len) { in SDP_AddUuidSequence()
576 (uint32_t)(p - p_buff), p_buff); in SDP_AddUuidSequence()
630 uint8_t* p; in SDP_AddAdditionProtoLists() local
637 p = p_buff; in SDP_AddAdditionProtoLists()
641 UINT8_TO_BE_STREAM(p, (DATA_ELE_SEQ_DESC_TYPE << 3) | SIZE_IN_NEXT_BYTE); in SDP_AddAdditionProtoLists()
642 p_len = p++; in SDP_AddAdditionProtoLists()
644 offset = sdp_compose_proto_list(p, p_proto_list->num_elems, in SDP_AddAdditionProtoLists()
646 p += offset; in SDP_AddAdditionProtoLists()
648 *p_len = (uint8_t)(p - p_len - 1); in SDP_AddAdditionProtoLists()
652 DATA_ELE_SEQ_DESC_TYPE, (uint32_t)(p - p_buff), p_buff); in SDP_AddAdditionProtoLists()
676 uint8_t* p; in SDP_AddProfileDescriptorList() local
680 p = p_buff + 2; in SDP_AddProfileDescriptorList()
685 UINT8_TO_BE_STREAM(p, (UUID_DESC_TYPE << 3) | SIZE_TWO_BYTES); in SDP_AddProfileDescriptorList()
686 UINT16_TO_BE_STREAM(p, profile_uuid); in SDP_AddProfileDescriptorList()
688 UINT8_TO_BE_STREAM(p, (UINT_DESC_TYPE << 3) | SIZE_TWO_BYTES); in SDP_AddProfileDescriptorList()
689 UINT16_TO_BE_STREAM(p, version); in SDP_AddProfileDescriptorList()
693 *(p_buff + 1) = (uint8_t)(p - (p_buff + 2)); in SDP_AddProfileDescriptorList()
697 DATA_ELE_SEQ_DESC_TYPE, (uint32_t)(p - p_buff), p_buff); in SDP_AddProfileDescriptorList()
721 uint8_t* p; in SDP_AddLanguageBaseAttrIDList() local
725 p = p_buff; in SDP_AddLanguageBaseAttrIDList()
729 UINT8_TO_BE_STREAM(p, (UINT_DESC_TYPE << 3) | SIZE_TWO_BYTES); in SDP_AddLanguageBaseAttrIDList()
730 UINT16_TO_BE_STREAM(p, lang); in SDP_AddLanguageBaseAttrIDList()
732 UINT8_TO_BE_STREAM(p, (UINT_DESC_TYPE << 3) | SIZE_TWO_BYTES); in SDP_AddLanguageBaseAttrIDList()
733 UINT16_TO_BE_STREAM(p, char_enc); in SDP_AddLanguageBaseAttrIDList()
735 UINT8_TO_BE_STREAM(p, (UINT_DESC_TYPE << 3) | SIZE_TWO_BYTES); in SDP_AddLanguageBaseAttrIDList()
736 UINT16_TO_BE_STREAM(p, base_id); in SDP_AddLanguageBaseAttrIDList()
740 DATA_ELE_SEQ_DESC_TYPE, (uint32_t)(p - p_buff), p_buff); in SDP_AddLanguageBaseAttrIDList()
764 uint8_t* p; in SDP_AddServiceClassIdList() local
769 p = p_buff; in SDP_AddServiceClassIdList()
772 UINT8_TO_BE_STREAM(p, (UUID_DESC_TYPE << 3) | SIZE_TWO_BYTES); in SDP_AddServiceClassIdList()
773 UINT16_TO_BE_STREAM(p, *p_service_uuids); in SDP_AddServiceClassIdList()
778 DATA_ELE_SEQ_DESC_TYPE, (uint32_t)(p - p_buff), p_buff); in SDP_AddServiceClassIdList()