• Home
  • Raw
  • Download

Lines Matching refs:p_attr

156 uint8_t* sdpu_build_attrib_seq(uint8_t* p_out, uint16_t* p_attr,  in sdpu_build_attrib_seq()  argument
162 if (!p_attr) in sdpu_build_attrib_seq()
178 if (!p_attr) { in sdpu_build_attrib_seq()
184 for (xx = 0; xx < num_attrs; xx++, p_attr++) { in sdpu_build_attrib_seq()
186 UINT16_TO_BE_STREAM(p_out, *p_attr); in sdpu_build_attrib_seq()
204 uint8_t* sdpu_build_attrib_entry(uint8_t* p_out, tSDP_ATTRIBUTE* p_attr) { in sdpu_build_attrib_entry() argument
207 UINT16_TO_BE_STREAM(p_out, p_attr->id); in sdpu_build_attrib_entry()
211 switch (p_attr->type) { in sdpu_build_attrib_entry()
217 if (p_attr->len > 0xFFFF) { in sdpu_build_attrib_entry()
218 UINT8_TO_BE_STREAM(p_out, (p_attr->type << 3) | SIZE_IN_NEXT_LONG); in sdpu_build_attrib_entry()
219 UINT32_TO_BE_STREAM(p_out, p_attr->len); in sdpu_build_attrib_entry()
223 if (p_attr->len > 0xFF) { in sdpu_build_attrib_entry()
224 UINT8_TO_BE_STREAM(p_out, (p_attr->type << 3) | SIZE_IN_NEXT_WORD); in sdpu_build_attrib_entry()
225 UINT16_TO_BE_STREAM(p_out, p_attr->len); in sdpu_build_attrib_entry()
229 UINT8_TO_BE_STREAM(p_out, (p_attr->type << 3) | SIZE_IN_NEXT_BYTE); in sdpu_build_attrib_entry()
230 UINT8_TO_BE_STREAM(p_out, p_attr->len); in sdpu_build_attrib_entry()
233 if (p_attr->value_ptr != NULL) { in sdpu_build_attrib_entry()
234 ARRAY_TO_BE_STREAM(p_out, p_attr->value_ptr, (int)p_attr->len); in sdpu_build_attrib_entry()
241 switch (p_attr->len) { in sdpu_build_attrib_entry()
243 UINT8_TO_BE_STREAM(p_out, (p_attr->type << 3) | SIZE_ONE_BYTE); in sdpu_build_attrib_entry()
246 UINT8_TO_BE_STREAM(p_out, (p_attr->type << 3) | SIZE_TWO_BYTES); in sdpu_build_attrib_entry()
249 UINT8_TO_BE_STREAM(p_out, (p_attr->type << 3) | SIZE_FOUR_BYTES); in sdpu_build_attrib_entry()
252 UINT8_TO_BE_STREAM(p_out, (p_attr->type << 3) | SIZE_EIGHT_BYTES); in sdpu_build_attrib_entry()
255 UINT8_TO_BE_STREAM(p_out, (p_attr->type << 3) | SIZE_SIXTEEN_BYTES); in sdpu_build_attrib_entry()
258 UINT8_TO_BE_STREAM(p_out, (p_attr->type << 3) | SIZE_IN_NEXT_BYTE); in sdpu_build_attrib_entry()
259 UINT8_TO_BE_STREAM(p_out, p_attr->len); in sdpu_build_attrib_entry()
263 if (p_attr->value_ptr != NULL) { in sdpu_build_attrib_entry()
264 ARRAY_TO_BE_STREAM(p_out, p_attr->value_ptr, (int)p_attr->len); in sdpu_build_attrib_entry()
703 bool sdpu_compare_uuid_with_attr(const Uuid& uuid, tSDP_DISC_ATTR* p_attr) { in sdpu_compare_uuid_with_attr() argument
705 if (len == 2) return uuid.As16Bit() == p_attr->attr_value.v.u16; in sdpu_compare_uuid_with_attr()
706 if (len == 4) return uuid.As32Bit() == p_attr->attr_value.v.u32; in sdpu_compare_uuid_with_attr()
707 if (memcmp(uuid.To128BitBE().data(), (void*)p_attr->attr_value.v.array, in sdpu_compare_uuid_with_attr()
789 tSDP_ATTRIBUTE* p_attr; in sdpu_get_attrib_seq_len() local
800 p_attr = sdp_db_find_attr_in_rec(p_rec, start_id, end_id); in sdpu_get_attrib_seq_len()
801 if (p_attr) { in sdpu_get_attrib_seq_len()
802 len1 += sdpu_get_attrib_entry_len(p_attr); in sdpu_get_attrib_seq_len()
807 start_id = p_attr->id + 1; in sdpu_get_attrib_seq_len()
827 uint16_t sdpu_get_attrib_entry_len(tSDP_ATTRIBUTE* p_attr) { in sdpu_get_attrib_entry_len() argument
832 switch (p_attr->type) { in sdpu_get_attrib_entry_len()
838 if (p_attr->len > 0xFFFF) { in sdpu_get_attrib_entry_len()
843 if (p_attr->len > 0xFF) { in sdpu_get_attrib_entry_len()
850 len += p_attr->len; in sdpu_get_attrib_entry_len()
855 switch (p_attr->len) { in sdpu_get_attrib_entry_len()
868 len += p_attr->len; in sdpu_get_attrib_entry_len()
889 uint8_t* sdpu_build_partial_attrib_entry(uint8_t* p_out, tSDP_ATTRIBUTE* p_attr, in sdpu_build_partial_attrib_entry() argument
893 sdpu_build_attrib_entry(p_attr_buff, p_attr); in sdpu_build_partial_attrib_entry()
895 uint16_t attr_len = sdpu_get_attrib_entry_len(p_attr); in sdpu_build_partial_attrib_entry()