/system/nfc/src/nfc/ndef/ |
D | ndef_utils.cc | 76 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/ |
D | sdp_db.cc | 58 tSDP_RECORD* sdp_db_service_search(tSDP_RECORD* p_rec, tSDP_UUID_SEQ* p_seq) { in sdp_db_service_search() argument 65 if (!p_rec) in sdp_db_service_search() 66 p_rec = &sdp_cb.server_db.record[0]; in sdp_db_service_search() 68 p_rec++; in sdp_db_service_search() 72 for (; p_rec < p_end; p_rec++) { in sdp_db_service_search() 74 p_attr = &p_rec->attribute[0]; in sdp_db_service_search() 75 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) { in sdp_db_service_search() 89 if (xx == p_rec->num_attributes) break; in sdp_db_service_search() 93 if (yy == p_seq->num_uids) return (p_rec); in sdp_db_service_search() 150 tSDP_RECORD* p_rec; in sdp_db_find_record() local [all …]
|
D | sdp_api.cc | 232 tSDP_DISC_REC* p_rec; in SDP_FindAttributeInDb() local 239 p_rec = p_db->p_first_rec; in SDP_FindAttributeInDb() 241 p_rec = p_start_rec->p_next_rec; in SDP_FindAttributeInDb() 243 while (p_rec) { in SDP_FindAttributeInDb() 244 p_attr = p_rec->p_first_attr; in SDP_FindAttributeInDb() 246 if (p_attr->attr_id == attr_id) return (p_rec); in SDP_FindAttributeInDb() 251 p_rec = p_rec->p_next_rec; in SDP_FindAttributeInDb() 267 tSDP_DISC_ATTR* SDP_FindAttributeInRec(tSDP_DISC_REC* p_rec, uint16_t attr_id) { in SDP_FindAttributeInRec() argument 270 p_attr = p_rec->p_first_attr; in SDP_FindAttributeInRec() 294 bool SDP_FindServiceUUIDInRec(tSDP_DISC_REC* p_rec, Uuid* p_uuid) { in SDP_FindServiceUUIDInRec() argument [all …]
|
D | sdp_utils.cc | 69 tSDP_DISC_REC* p_rec) { in sdpu_find_profile_version() argument 71 for (tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; p_attr != nullptr; in sdpu_find_profile_version() 123 static uint16_t sdpu_find_most_specific_service_uuid(tSDP_DISC_REC* p_rec) { in sdpu_find_most_specific_service_uuid() argument 124 for (tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; p_attr != nullptr; in sdpu_find_most_specific_service_uuid() 165 for (tSDP_DISC_REC* p_rec = p_db->p_first_rec; p_rec != nullptr; in sdpu_log_attribute_metrics() local 166 p_rec = p_rec->p_next_rec) { in sdpu_log_attribute_metrics() 167 uint16_t service_uuid = sdpu_find_most_specific_service_uuid(p_rec); in sdpu_log_attribute_metrics() 176 auto uuid_version_array = sdpu_find_profile_version(p_rec); in sdpu_log_attribute_metrics() 204 if (SDP_FindProtocolListElemInRec(p_rec, protocol_uuid, in sdpu_log_attribute_metrics() 225 SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in sdpu_log_attribute_metrics() [all …]
|
D | sdp_server.cc | 193 tSDP_RECORD* p_rec = NULL; in process_service_search() local 217 p_rec = sdp_db_service_search(p_rec, &uid_seq); in process_service_search() 219 if (p_rec) in process_service_search() 220 rsp_handles[num_rsp_handles++] = p_rec->record_handle; in process_service_search() 322 tSDP_RECORD* p_rec; in process_service_attr_req() local 357 p_rec = sdp_db_find_record(rec_handle); in process_service_attr_req() 358 if (!p_rec) { in process_service_attr_req() 407 p_attr = sdp_db_find_attr_in_rec(p_rec, attr_seq.attr_entry[xx].start, in process_service_attr_req() 476 p_ccb->list_len = sdpu_get_attrib_seq_len(p_rec, &attr_seq_sav) + 3; in process_service_attr_req() 556 tSDP_RECORD* p_rec; in process_service_search_attr_req() local [all …]
|
D | sdp_discovery.cc | 55 tSDP_DISC_REC* p_rec, uint16_t attr_id, 699 tSDP_DISC_REC* p_rec; in save_attr_seq() local 714 p_rec = add_record(p_ccb->p_db, p_ccb->device_address); in save_attr_seq() 715 if (!p_rec) { in save_attr_seq() 738 p = add_attr(p, p_seq_end, p_ccb->p_db, p_rec, attr_id, NULL, 0); in save_attr_seq() 759 tSDP_DISC_REC* p_rec; in add_record() local 764 p_rec = (tSDP_DISC_REC*)p_db->p_free_mem; in add_record() 768 p_rec->p_first_attr = NULL; in add_record() 769 p_rec->p_next_rec = NULL; in add_record() 771 p_rec->remote_bd_addr = p_bda; in add_record() [all …]
|
D | sdpint.h | 279 extern uint16_t sdpu_get_attrib_seq_len(tSDP_RECORD* p_rec, 288 extern tSDP_RECORD* sdp_db_service_search(tSDP_RECORD* p_rec, 291 extern tSDP_ATTRIBUTE* sdp_db_find_attr_in_rec(tSDP_RECORD* p_rec,
|
/system/bt/bta/sdp/ |
D | bta_sdp_act.cc | 52 tSDP_DISC_REC* p_rec) { in bta_create_mns_sdp_record() argument 64 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAP_SUPPORTED_FEATURES); in bta_create_mns_sdp_record() 69 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME); in bta_create_mns_sdp_record() 76 if (SDP_FindProfileVersionInRec(p_rec, UUID_SERVCLASS_MAP_PROFILE, in bta_create_mns_sdp_record() 81 if (SDP_FindProtocolListElemInRec(p_rec, UUID_PROTOCOL_RFCOMM, &pe)) { in bta_create_mns_sdp_record() 85 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_GOEP_L2CAP_PSM); in bta_create_mns_sdp_record() 92 tSDP_DISC_REC* p_rec) { in bta_create_mas_sdp_record() argument 107 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAS_INSTANCE_ID); in bta_create_mas_sdp_record() 112 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_MSG_TYPE); in bta_create_mas_sdp_record() 117 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAP_SUPPORTED_FEATURES); in bta_create_mas_sdp_record() [all …]
|
/system/bt/stack/btm/ |
D | btm_ble.cc | 1263 tBTM_SEC_DEV_REC* p_rec; in btm_sec_save_le_key() local 1272 if ((p_rec = btm_find_dev(bd_addr)) != NULL && in btm_sec_save_le_key() 1274 btm_ble_init_pseudo_addr(p_rec, bd_addr); in btm_sec_save_le_key() 1278 p_rec->ble.keys.pltk = p_keys->penc_key.ltk; in btm_sec_save_le_key() 1279 memcpy(p_rec->ble.keys.rand, p_keys->penc_key.rand, BT_OCTET8_LEN); in btm_sec_save_le_key() 1280 p_rec->ble.keys.sec_level = p_keys->penc_key.sec_level; in btm_sec_save_le_key() 1281 p_rec->ble.keys.ediv = p_keys->penc_key.ediv; in btm_sec_save_le_key() 1282 p_rec->ble.keys.key_size = p_keys->penc_key.key_size; in btm_sec_save_le_key() 1283 p_rec->ble.key_type |= BTM_LE_KEY_PENC; in btm_sec_save_le_key() 1284 p_rec->sec_flags |= BTM_SEC_LE_LINK_KEY_KNOWN; in btm_sec_save_le_key() [all …]
|
/system/bt/bta/mce/ |
D | bta_mce_act.cc | 61 tSDP_DISC_REC* p_rec = NULL; in bta_mce_search_cback() local 80 p_rec = SDP_FindServiceUUIDInDb(p_bta_mce_cfg->p_sdp_db, bta_mce_mas_uuid, in bta_mce_search_cback() 81 p_rec); in bta_mce_search_cback() 83 APPL_TRACE_DEBUG("p_rec:%p", p_rec); in bta_mce_search_cback() 85 if (p_rec == NULL) break; in bta_mce_search_cback() 87 if (!SDP_FindProtocolListElemInRec(p_rec, UUID_PROTOCOL_RFCOMM, &pe)) in bta_mce_search_cback() 92 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME); in bta_mce_search_cback() 99 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAS_INSTANCE_ID); in bta_mce_search_cback() 104 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_MSG_TYPE); in bta_mce_search_cback() 110 } while (p_rec != NULL && found < BTA_MCE_MAX_MAS_INSTANCES); in bta_mce_search_cback()
|
/system/bt/stack/hid/ |
D | hidh_api.cc | 71 void hidh_get_str_attr(tSDP_DISC_REC* p_rec, uint16_t attr_id, uint16_t max_len, in hidh_get_str_attr() argument 76 p_attr = SDP_FindAttributeInRec(p_rec, attr_id); in hidh_get_str_attr() 92 tSDP_DISC_REC* p_rec; in hidh_search_callback() local 106 p_rec = SDP_FindServiceUUIDInDb(p_db, hid_uuid, NULL); in hidh_search_callback() 107 if (p_rec == NULL) { in hidh_search_callback() 115 if (((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_HID_DESCRIPTOR_LIST)) == in hidh_search_callback() 132 if (((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_HID_VIRTUAL_CABLE)) != in hidh_search_callback() 139 p_rec, ATTR_ID_HID_RECONNECT_INITIATE)) != NULL) && in hidh_search_callback() 145 p_rec, ATTR_ID_HID_NORMALLY_CONNECTABLE)) != NULL) && in hidh_search_callback() 150 if (((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_HID_SDP_DISABLE)) != in hidh_search_callback() [all …]
|
/system/nfc/src/nfc/include/ |
D | ndef_utils.h | 208 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/nfc/src/nfa/dm/ |
D | nfa_dm_ndef.cc | 367 uint8_t *p_rec, *p_ndef_start, *p_type, *p_payload, *p_rec_end; in nfa_dm_ndef_handle_message() local 433 p_rec = p_ndef_start = p_msg_buf; in nfa_dm_ndef_handle_message() 436 while (p_rec != nullptr) { in nfa_dm_ndef_handle_message() 438 p_type = NDEF_RecGetType(p_rec, &tnf, &type_len); in nfa_dm_ndef_handle_message() 444 p_payload = NDEF_RecGetPayload(p_rec, &payload_len); in nfa_dm_ndef_handle_message() 473 ndef_data.p_data = p_rec; /* Start of record */ in nfa_dm_ndef_handle_message() 477 ndef_data.len = payload_len + (uint32_t)(p_payload - p_rec); in nfa_dm_ndef_handle_message() 480 p_rec_end = p_rec; in nfa_dm_ndef_handle_message() 502 ndef_data.len = (uint32_t)(p_rec_end - p_rec); in nfa_dm_ndef_handle_message() 541 p_rec = NDEF_MsgGetNextRec(p_rec); in nfa_dm_ndef_handle_message()
|
/system/bt/stack/a2dp/ |
D | a2dp_api.cc | 66 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/bta/hf_client/ |
D | bta_hf_client_sdp.cc | 219 tSDP_DISC_REC* p_rec = NULL; in bta_hf_client_sdp_find_attr() local 229 p_rec = SDP_FindServiceInDb(client_cb->p_disc_db, in bta_hf_client_sdp_find_attr() 230 UUID_SERVCLASS_AG_HANDSFREE, p_rec); in bta_hf_client_sdp_find_attr() 231 if (p_rec == NULL) { in bta_hf_client_sdp_find_attr() 237 if (SDP_FindProtocolListElemInRec(p_rec, UUID_PROTOCOL_RFCOMM, &pe)) { in bta_hf_client_sdp_find_attr() 245 SDP_FindProfileVersionInRec(p_rec, UUID_SERVCLASS_HF_HANDSFREE, in bta_hf_client_sdp_find_attr() 249 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_hf_client_sdp_find_attr() 264 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_NETWORK); in bta_hf_client_sdp_find_attr()
|
/system/bt/bta/ag/ |
D | bta_ag_sdp.cc | 293 tSDP_DISC_REC* p_rec = nullptr; in bta_ag_sdp_find_attr() local 316 p_rec = SDP_FindServiceInDb(p_scb->p_disc_db, uuid, p_rec); in bta_ag_sdp_find_attr() 317 if (p_rec == nullptr) { in bta_ag_sdp_find_attr() 322 p_rec = SDP_FindServiceInDb(p_scb->p_disc_db, uuid, p_rec); in bta_ag_sdp_find_attr() 323 if (p_rec == nullptr) { in bta_ag_sdp_find_attr() 332 if (SDP_FindProtocolListElemInRec(p_rec, UUID_PROTOCOL_RFCOMM, &pe)) { in bta_ag_sdp_find_attr() 341 if (!SDP_FindProfileVersionInRec(p_rec, uuid, &peer_version)) { in bta_ag_sdp_find_attr() 361 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_ag_sdp_find_attr() 398 SDP_FindAttributeInRec(p_rec, ATTR_ID_REMOTE_AUDIO_VOLUME_CONTROL); in bta_ag_sdp_find_attr()
|
/system/bt/stack/include/ |
D | sdp_api.h | 266 tSDP_DISC_ATTR* SDP_FindAttributeInRec(tSDP_DISC_REC* p_rec, uint16_t attr_id); 317 bool SDP_FindServiceUUIDInRec_128bit(tSDP_DISC_REC* p_rec, 346 bool SDP_FindProtocolListElemInRec(tSDP_DISC_REC* p_rec, uint16_t layer_uuid, 360 bool SDP_FindAddProtoListsElemInRec(tSDP_DISC_REC* p_rec, uint16_t layer_uuid, 377 bool SDP_FindProfileVersionInRec(tSDP_DISC_REC* p_rec, uint16_t profile_uuid, 637 bool SDP_FindServiceUUIDInRec(tSDP_DISC_REC* p_rec, bluetooth::Uuid* p_uuid);
|
/system/bt/bta/av/ |
D | bta_av_act.cc | 1622 tSDP_DISC_REC* p_rec = NULL; in bta_av_check_peer_features() local 1631 p_rec = SDP_FindServiceInDb(p_cb->p_disc_db, service_uuid, p_rec); in bta_av_check_peer_features() 1632 if (p_rec == NULL) { in bta_av_check_peer_features() 1636 if ((SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_CLASS_ID_LIST)) != in bta_av_check_peer_features() 1649 if ((SDP_FindAttributeInRec(p_rec, ATTR_ID_BT_PROFILE_DESC_LIST)) != NULL) { in bta_av_check_peer_features() 1651 SDP_FindProfileVersionInRec(p_rec, UUID_SERVCLASS_AV_REMOTE_CONTROL, in bta_av_check_peer_features() 1660 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_av_check_peer_features() 1692 tSDP_DISC_REC* p_rec = in bta_avk_check_peer_features() local 1694 while (p_rec) { in bta_avk_check_peer_features() 1698 if ((SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_CLASS_ID_LIST)) != in bta_avk_check_peer_features() [all …]
|
/system/bt/btif/src/ |
D | btif_hl.cc | 969 tBTA_HL_SDP_REC* p_rec; in btif_hl_find_peer_mdep_id() local 994 p_rec = &p_mcb->sdp.sdp_rec[p_mcb->sdp_idx]; in btif_hl_find_peer_mdep_id() 995 num_mdeps = p_rec->num_mdeps; in btif_hl_find_peer_mdep_id() 1000 p_rec->mdep_cfg[i].mdep_role); in btif_hl_find_peer_mdep_id() 1002 p_rec->mdep_cfg[i].data_type); in btif_hl_find_peer_mdep_id() 1003 if ((p_rec->mdep_cfg[i].mdep_role == peer_mdep_role) && in btif_hl_find_peer_mdep_id() 1004 (p_rec->mdep_cfg[i].data_type == data_type)) { in btif_hl_find_peer_mdep_id() 1006 *p_peer_mdep_id = p_rec->mdep_cfg[i].mdep_id; in btif_hl_find_peer_mdep_id()
|