Home
last modified time | relevance | path

Searched refs:p_rec (Results 1 – 21 of 21) sorted by relevance

/system/nfc/src/nfc/ndef/
Dndef_utils.cc76 uint8_t* p_rec = p_msg; in NDEF_MsgValidate() local
93 for (count = 0; p_rec < p_end; count++) { in NDEF_MsgValidate()
95 if (p_rec + 3 > p_end) return (NDEF_MSG_TOO_SHORT); in NDEF_MsgValidate()
97 rec_hdr = *p_rec++; in NDEF_MsgValidate()
108 type_len = *p_rec++; in NDEF_MsgValidate()
118 payload_len = *p_rec++; in NDEF_MsgValidate()
121 if (p_rec + 4 > p_end) return (NDEF_MSG_TOO_SHORT); in NDEF_MsgValidate()
123 BE_STREAM_TO_UINT32(payload_len, p_rec); in NDEF_MsgValidate()
129 if (p_rec + 1 > p_end) return (NDEF_MSG_TOO_SHORT); in NDEF_MsgValidate()
131 id_len = *p_rec++; in NDEF_MsgValidate()
[all …]
/system/bt/stack/sdp/
Dsdp_db.cc52 tSDP_RECORD* sdp_db_service_search(tSDP_RECORD* p_rec, tSDP_UUID_SEQ* p_seq) { in sdp_db_service_search() argument
59 if (!p_rec) in sdp_db_service_search()
60 p_rec = &sdp_cb.server_db.record[0]; in sdp_db_service_search()
62 p_rec++; in sdp_db_service_search()
66 for (; p_rec < p_end; p_rec++) { in sdp_db_service_search()
68 p_attr = &p_rec->attribute[0]; in sdp_db_service_search()
69 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) { in sdp_db_service_search()
83 if (xx == p_rec->num_attributes) break; in sdp_db_service_search()
87 if (yy == p_seq->num_uids) return (p_rec); in sdp_db_service_search()
144 tSDP_RECORD* p_rec; in sdp_db_find_record() local
[all …]
Dsdp_api.cc220 tSDP_DISC_ATTR* SDP_FindAttributeInRec(tSDP_DISC_REC* p_rec, uint16_t attr_id) { in SDP_FindAttributeInRec() argument
223 p_attr = p_rec->p_first_attr; in SDP_FindAttributeInRec()
247 bool SDP_FindServiceUUIDInRec(tSDP_DISC_REC* p_rec, Uuid* p_uuid) { in SDP_FindServiceUUIDInRec() argument
250 p_attr = p_rec->p_first_attr; in SDP_FindServiceUUIDInRec()
320 bool SDP_FindServiceUUIDInRec_128bit(tSDP_DISC_REC* p_rec, Uuid* p_uuid) { in SDP_FindServiceUUIDInRec_128bit() argument
321 tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; in SDP_FindServiceUUIDInRec_128bit()
366 tSDP_DISC_REC* p_rec; in SDP_FindServiceInDb() local
373 p_rec = p_db->p_first_rec; in SDP_FindServiceInDb()
375 p_rec = p_start_rec->p_next_rec; in SDP_FindServiceInDb()
377 while (p_rec) { in SDP_FindServiceInDb()
[all …]
Dsdp_server.cc189 tSDP_RECORD* p_rec = NULL; in process_service_search() local
213 p_rec = sdp_db_service_search(p_rec, &uid_seq); in process_service_search()
215 if (p_rec) in process_service_search()
216 rsp_handles[num_rsp_handles++] = p_rec->record_handle; in process_service_search()
318 tSDP_RECORD* p_rec; in process_service_attr_req() local
353 p_rec = sdp_db_find_record(rec_handle); in process_service_attr_req()
354 if (!p_rec) { in process_service_attr_req()
403 p_attr = sdp_db_find_attr_in_rec(p_rec, attr_seq.attr_entry[xx].start, in process_service_attr_req()
472 p_ccb->list_len = sdpu_get_attrib_seq_len(p_rec, &attr_seq_sav) + 3; in process_service_attr_req()
552 tSDP_RECORD* p_rec; in process_service_search_attr_req() local
[all …]
Dsdp_discovery.cc57 tSDP_DISC_REC* p_rec, uint16_t attr_id,
690 tSDP_DISC_REC* p_rec; in save_attr_seq() local
705 p_rec = add_record(p_ccb->p_db, p_ccb->device_address); in save_attr_seq()
706 if (!p_rec) { in save_attr_seq()
729 p = add_attr(p, p_seq_end, p_ccb->p_db, p_rec, attr_id, NULL, 0); in save_attr_seq()
750 tSDP_DISC_REC* p_rec; in add_record() local
755 p_rec = (tSDP_DISC_REC*)p_db->p_free_mem; in add_record()
759 p_rec->p_first_attr = NULL; in add_record()
760 p_rec->p_next_rec = NULL; in add_record()
762 p_rec->remote_bd_addr = p_bda; in add_record()
[all …]
Dsdp_utils.cc64 tSDP_DISC_REC* p_rec) { in sdpu_find_profile_version() argument
66 for (tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; p_attr != nullptr; in sdpu_find_profile_version()
118 static uint16_t sdpu_find_most_specific_service_uuid(tSDP_DISC_REC* p_rec) { in sdpu_find_most_specific_service_uuid() argument
119 for (tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; p_attr != nullptr; in sdpu_find_most_specific_service_uuid()
160 for (tSDP_DISC_REC* p_rec = p_db->p_first_rec; p_rec != nullptr; in sdpu_log_attribute_metrics() local
161 p_rec = p_rec->p_next_rec) { in sdpu_log_attribute_metrics()
162 uint16_t service_uuid = sdpu_find_most_specific_service_uuid(p_rec); in sdpu_log_attribute_metrics()
171 auto uuid_version_array = sdpu_find_profile_version(p_rec); in sdpu_log_attribute_metrics()
198 if (SDP_FindProtocolListElemInRec(p_rec, protocol_uuid, in sdpu_log_attribute_metrics()
218 SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in sdpu_log_attribute_metrics()
[all …]
Dsdpint.h223 extern uint16_t sdpu_get_attrib_seq_len(tSDP_RECORD* p_rec,
233 extern tSDP_RECORD* sdp_db_service_search(tSDP_RECORD* p_rec,
236 extern tSDP_ATTRIBUTE* sdp_db_find_attr_in_rec(tSDP_RECORD* p_rec,
/system/bt/bta/sdp/
Dbta_sdp_act.cc35 tSDP_DISC_REC* p_rec) { in bta_create_mns_sdp_record() argument
47 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAP_SUPPORTED_FEATURES); in bta_create_mns_sdp_record()
52 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME); in bta_create_mns_sdp_record()
59 if (SDP_FindProfileVersionInRec(p_rec, UUID_SERVCLASS_MAP_PROFILE, in bta_create_mns_sdp_record()
64 if (SDP_FindProtocolListElemInRec(p_rec, UUID_PROTOCOL_RFCOMM, &pe)) { in bta_create_mns_sdp_record()
68 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_GOEP_L2CAP_PSM); in bta_create_mns_sdp_record()
75 tSDP_DISC_REC* p_rec) { in bta_create_mas_sdp_record() argument
90 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAS_INSTANCE_ID); in bta_create_mas_sdp_record()
95 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_MSG_TYPE); in bta_create_mas_sdp_record()
100 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAP_SUPPORTED_FEATURES); in bta_create_mas_sdp_record()
[all …]
/system/bt/stack/btm/
Dbtm_ble.cc1112 tBTM_SEC_DEV_REC* p_rec; in btm_sec_save_le_key() local
1121 if ((p_rec = btm_find_dev(bd_addr)) != NULL && in btm_sec_save_le_key()
1123 btm_ble_init_pseudo_addr(p_rec, bd_addr); in btm_sec_save_le_key()
1127 p_rec->ble.keys.pltk = p_keys->penc_key.ltk; in btm_sec_save_le_key()
1128 memcpy(p_rec->ble.keys.rand, p_keys->penc_key.rand, BT_OCTET8_LEN); in btm_sec_save_le_key()
1129 p_rec->ble.keys.sec_level = p_keys->penc_key.sec_level; in btm_sec_save_le_key()
1130 p_rec->ble.keys.ediv = p_keys->penc_key.ediv; in btm_sec_save_le_key()
1131 p_rec->ble.keys.key_size = p_keys->penc_key.key_size; in btm_sec_save_le_key()
1132 p_rec->ble.key_type |= BTM_LE_KEY_PENC; in btm_sec_save_le_key()
1133 p_rec->sec_flags |= BTM_SEC_LE_LINK_KEY_KNOWN; in btm_sec_save_le_key()
[all …]
/system/bt/stack/hid/
Dhidh_api.cc72 void hidh_get_str_attr(tSDP_DISC_REC* p_rec, uint16_t attr_id, uint16_t max_len, in hidh_get_str_attr() argument
77 p_attr = SDP_FindAttributeInRec(p_rec, attr_id); in hidh_get_str_attr()
93 tSDP_DISC_REC* p_rec; in hidh_search_callback() local
107 p_rec = SDP_FindServiceUUIDInDb(p_db, hid_uuid, NULL); in hidh_search_callback()
108 if (p_rec == NULL) { in hidh_search_callback()
116 if (((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_HID_DESCRIPTOR_LIST)) == in hidh_search_callback()
133 if (((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_HID_VIRTUAL_CABLE)) != in hidh_search_callback()
140 p_rec, ATTR_ID_HID_RECONNECT_INITIATE)) != NULL) && in hidh_search_callback()
146 p_rec, ATTR_ID_HID_NORMALLY_CONNECTABLE)) != NULL) && in hidh_search_callback()
151 if (((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_HID_SDP_DISABLE)) != in hidh_search_callback()
[all …]
/system/nfc/src/nfc/include/
Dndef_utils.h208 extern uint8_t* NDEF_RecGetType(uint8_t* p_rec, uint8_t* p_tnf,
221 extern uint8_t* NDEF_RecGetId(uint8_t* p_rec, uint8_t* p_id_len);
234 extern uint8_t* NDEF_RecGetPayload(uint8_t* p_rec, uint32_t* p_payload_len);
280 uint32_t* p_cur_size, uint8_t* p_rec,
296 uint32_t* p_cur_size, uint8_t* p_rec,
312 uint32_t* p_cur_size, uint8_t* p_rec,
328 uint32_t* p_cur_size, uint8_t* p_rec,
/system/bt/test/mock/
Dmock_stack_sdp.cc57 tSDP_DISC_ATTR* SDP_FindAttributeInRec(tSDP_DISC_REC* p_rec, uint16_t attr_id) { in SDP_FindAttributeInRec() argument
61 bool SDP_FindServiceUUIDInRec(tSDP_DISC_REC* p_rec, Uuid* p_uuid) { in SDP_FindServiceUUIDInRec() argument
65 bool SDP_FindServiceUUIDInRec_128bit(tSDP_DISC_REC* p_rec, Uuid* p_uuid) { in SDP_FindServiceUUIDInRec_128bit() argument
86 bool SDP_FindProtocolListElemInRec(tSDP_DISC_REC* p_rec, uint16_t layer_uuid, in SDP_FindProtocolListElemInRec() argument
91 bool SDP_FindProfileVersionInRec(tSDP_DISC_REC* p_rec, uint16_t profile_uuid, in SDP_FindProfileVersionInRec() argument
Dmock_stack_sdp_db.cc86 tSDP_ATTRIBUTE* sdp_db_find_attr_in_rec(tSDP_RECORD* p_rec, uint16_t start_attr, in sdp_db_find_attr_in_rec() argument
95 tSDP_RECORD* sdp_db_service_search(tSDP_RECORD* p_rec, tSDP_UUID_SEQ* p_seq) { in sdp_db_service_search() argument
Dmock_stack_hidh.cc78 void hidh_get_str_attr(tSDP_DISC_REC* p_rec, uint16_t attr_id, uint16_t max_len, in hidh_get_str_attr() argument
/system/bt/bta/hf_client/
Dbta_hf_client_sdp.cc223 tSDP_DISC_REC* p_rec = NULL; in bta_hf_client_sdp_find_attr() local
233 p_rec = SDP_FindServiceInDb(client_cb->p_disc_db, in bta_hf_client_sdp_find_attr()
234 UUID_SERVCLASS_AG_HANDSFREE, p_rec); in bta_hf_client_sdp_find_attr()
235 if (p_rec == NULL) { in bta_hf_client_sdp_find_attr()
241 if (SDP_FindProtocolListElemInRec(p_rec, UUID_PROTOCOL_RFCOMM, &pe)) { in bta_hf_client_sdp_find_attr()
249 SDP_FindProfileVersionInRec(p_rec, UUID_SERVCLASS_HF_HANDSFREE, in bta_hf_client_sdp_find_attr()
253 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_hf_client_sdp_find_attr()
268 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_NETWORK); in bta_hf_client_sdp_find_attr()
/system/bt/stack/a2dp/
Da2dp_api.cc66 tSDP_DISC_REC* p_rec = NULL; in a2dp_sdp_cback() local
79 if ((p_rec = SDP_FindServiceInDb( in a2dp_sdp_cback()
80 a2dp_cb.find.p_db, a2dp_cb.find.service_uuid, p_rec)) == NULL) { in a2dp_sdp_cback()
84 peer_address = p_rec->remote_bd_addr; in a2dp_sdp_cback()
87 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME)) != in a2dp_sdp_cback()
94 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_PROVIDER_NAME)) != in a2dp_sdp_cback()
102 p_rec, ATTR_ID_SUPPORTED_FEATURES)) != NULL) { in a2dp_sdp_cback()
107 if (SDP_FindProtocolListElemInRec(p_rec, UUID_PROTOCOL_AVDTP, &elem)) { in a2dp_sdp_cback()
/system/bt/stack/test/fuzzers/sdp/
DsdpFuzzFunctions.h109 tSDP_DISC_REC* p_rec =
111 SDP_FindAttributeInRec(p_rec, fdp->ConsumeIntegral<uint16_t>());
133 tSDP_DISC_REC* p_rec =
135 SDP_FindServiceUUIDInRec_128bit(p_rec, &uuid);
148 tSDP_DISC_REC* p_rec =
150 SDP_FindProtocolListElemInRec(p_rec, fdp->ConsumeIntegral<uint16_t>(),
157 tSDP_DISC_REC* p_rec =
160 SDP_FindProfileVersionInRec(p_rec, fdp->ConsumeIntegral<uint16_t>(),
325 tSDP_DISC_REC* p_rec =
328 SDP_FindServiceUUIDInRec(p_rec, &uuid);
/system/nfc/src/nfa/dm/
Dnfa_dm_ndef.cc373 uint8_t *p_rec, *p_ndef_start, *p_type, *p_payload, *p_rec_end; in nfa_dm_ndef_handle_message() local
439 p_rec = p_ndef_start = p_msg_buf; in nfa_dm_ndef_handle_message()
442 while (p_rec != nullptr) { in nfa_dm_ndef_handle_message()
444 p_type = NDEF_RecGetType(p_rec, &tnf, &type_len); in nfa_dm_ndef_handle_message()
450 p_payload = NDEF_RecGetPayload(p_rec, &payload_len); in nfa_dm_ndef_handle_message()
479 ndef_data.p_data = p_rec; /* Start of record */ in nfa_dm_ndef_handle_message()
483 ndef_data.len = payload_len + (uint32_t)(p_payload - p_rec); in nfa_dm_ndef_handle_message()
486 p_rec_end = p_rec; in nfa_dm_ndef_handle_message()
508 ndef_data.len = (uint32_t)(p_rec_end - p_rec); in nfa_dm_ndef_handle_message()
547 p_rec = NDEF_MsgGetNextRec(p_rec); in nfa_dm_ndef_handle_message()
/system/bt/bta/ag/
Dbta_ag_sdp.cc290 tSDP_DISC_REC* p_rec = nullptr; in bta_ag_sdp_find_attr() local
313 p_rec = SDP_FindServiceInDb(p_scb->p_disc_db, uuid, p_rec); in bta_ag_sdp_find_attr()
314 if (p_rec == nullptr) { in bta_ag_sdp_find_attr()
319 p_rec = SDP_FindServiceInDb(p_scb->p_disc_db, uuid, p_rec); in bta_ag_sdp_find_attr()
320 if (p_rec == nullptr) { in bta_ag_sdp_find_attr()
329 if (SDP_FindProtocolListElemInRec(p_rec, UUID_PROTOCOL_RFCOMM, &pe)) { in bta_ag_sdp_find_attr()
338 if (!SDP_FindProfileVersionInRec(p_rec, uuid, &peer_version)) { in bta_ag_sdp_find_attr()
358 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_ag_sdp_find_attr()
395 SDP_FindAttributeInRec(p_rec, ATTR_ID_REMOTE_AUDIO_VOLUME_CONTROL); in bta_ag_sdp_find_attr()
/system/bt/stack/include/
Dsdp_api.h283 tSDP_DISC_ATTR* SDP_FindAttributeInRec(tSDP_DISC_REC* p_rec, uint16_t attr_id);
334 bool SDP_FindServiceUUIDInRec_128bit(tSDP_DISC_REC* p_rec,
363 bool SDP_FindProtocolListElemInRec(tSDP_DISC_REC* p_rec, uint16_t layer_uuid,
380 bool SDP_FindProfileVersionInRec(tSDP_DISC_REC* p_rec, uint16_t profile_uuid,
625 bool SDP_FindServiceUUIDInRec(tSDP_DISC_REC* p_rec, bluetooth::Uuid* p_uuid);
/system/bt/bta/av/
Dbta_av_act.cc1634 tSDP_DISC_REC* p_rec = NULL; in bta_av_check_peer_features() local
1643 p_rec = SDP_FindServiceInDb(p_cb->p_disc_db, service_uuid, p_rec); in bta_av_check_peer_features()
1644 if (p_rec == NULL) { in bta_av_check_peer_features()
1648 if ((SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_CLASS_ID_LIST)) != in bta_av_check_peer_features()
1661 if ((SDP_FindAttributeInRec(p_rec, ATTR_ID_BT_PROFILE_DESC_LIST)) != NULL) { in bta_av_check_peer_features()
1663 SDP_FindProfileVersionInRec(p_rec, UUID_SERVCLASS_AV_REMOTE_CONTROL, in bta_av_check_peer_features()
1672 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_av_check_peer_features()
1704 tSDP_DISC_REC* p_rec = in bta_avk_check_peer_features() local
1706 while (p_rec) { in bta_avk_check_peer_features()
1710 if ((SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_CLASS_ID_LIST)) != in bta_avk_check_peer_features()
[all …]