/system/bt/stack/btu/ |
D | btu_hcif.c | 53 extern void btm_ble_test_command_complete(UINT8 *p); 58 static void btu_hcif_inquiry_comp_evt (UINT8 *p); 59 static void btu_hcif_inquiry_result_evt (UINT8 *p); 60 static void btu_hcif_inquiry_rssi_result_evt (UINT8 *p); 61 static void btu_hcif_extended_inquiry_result_evt (UINT8 *p); 63 static void btu_hcif_connection_comp_evt (UINT8 *p); 64 static void btu_hcif_connection_request_evt (UINT8 *p); 65 static void btu_hcif_disconnection_comp_evt (UINT8 *p); 66 static void btu_hcif_authentication_comp_evt (UINT8 *p); 67 static void btu_hcif_rmt_name_request_comp_evt (UINT8 *p, UINT16 evt_len); [all …]
|
/system/sepolicy/tools/sepolicy-analyze/ |
D | neverallow.c | 25 char *p = *ptr; in read_typeset() local 35 while (p < end && isspace(*p)) in read_typeset() 36 p++; in read_typeset() 38 if (p == end) in read_typeset() 41 if (*p == '~') { in read_typeset() 45 p++; in read_typeset() 46 while (p < end && isspace(*p)) in read_typeset() 47 p++; in read_typeset() 48 if (p == end) in read_typeset() 52 if (*p == '{') { in read_typeset() [all …]
|
/system/bt/stack/hcic/ |
D | hcicmds.c | 40 BT_HDR *p = (BT_HDR *)osi_malloc(HCI_CMD_BUF_SIZE); in btsnd_hcic_inquiry() local 41 UINT8 *pp = (UINT8 *)(p + 1); in btsnd_hcic_inquiry() 43 p->len = HCIC_PREAMBLE_SIZE + HCIC_PARAM_SIZE_INQUIRY; in btsnd_hcic_inquiry() 44 p->offset = 0; in btsnd_hcic_inquiry() 53 btu_hcif_send_cmd (LOCAL_BR_EDR_CONTROLLER_ID, p); in btsnd_hcic_inquiry() 59 BT_HDR *p = (BT_HDR *)osi_malloc(HCI_CMD_BUF_SIZE); in btsnd_hcic_inq_cancel() local 60 UINT8 *pp = (UINT8 *)(p + 1); in btsnd_hcic_inq_cancel() 62 p->len = HCIC_PREAMBLE_SIZE + HCIC_PARAM_SIZE_INQ_CANCEL; in btsnd_hcic_inq_cancel() 63 p->offset = 0; in btsnd_hcic_inq_cancel() 67 btu_hcif_send_cmd (LOCAL_BR_EDR_CONTROLLER_ID, p); in btsnd_hcic_inq_cancel() [all …]
|
D | hciblecmds.c | 40 BT_HDR *p = (BT_HDR *)osi_malloc(HCI_CMD_BUF_SIZE); in btsnd_hcic_ble_set_local_used_feat() local 41 UINT8 *pp = (UINT8 *)(p + 1); in btsnd_hcic_ble_set_local_used_feat() 43 p->len = HCIC_PREAMBLE_SIZE + HCIC_PARAM_SIZE_SET_USED_FEAT_CMD; in btsnd_hcic_ble_set_local_used_feat() 44 p->offset = 0; in btsnd_hcic_ble_set_local_used_feat() 49 btu_hcif_send_cmd (LOCAL_BR_EDR_CONTROLLER_ID, p); in btsnd_hcic_ble_set_local_used_feat() 55 BT_HDR *p = (BT_HDR *)osi_malloc(HCI_CMD_BUF_SIZE); in btsnd_hcic_ble_set_random_addr() local 56 UINT8 *pp = (UINT8 *)(p + 1); in btsnd_hcic_ble_set_random_addr() 58 p->len = HCIC_PREAMBLE_SIZE + HCIC_PARAM_SIZE_WRITE_RANDOM_ADDR_CMD; in btsnd_hcic_ble_set_random_addr() 59 p->offset = 0; in btsnd_hcic_ble_set_random_addr() 66 btu_hcif_send_cmd (LOCAL_BR_EDR_CONTROLLER_ID, p); in btsnd_hcic_ble_set_random_addr() [all …]
|
/system/bt/stack/include/ |
D | bt_types.h | 224 #define HCI_GET_CMD_HDR_OPCODE(p) (UINT16)((*((UINT8 *)((p) + 1) + p->offset) + \ argument 225 (*((UINT8 *)((p) + 1) + p->offset + 1) << 8))) 226 #define HCI_GET_CMD_HDR_PARAM_LEN(p) (UINT8) (*((UINT8 *)((p) + 1) + p->offset + 2)) argument 228 #define HCI_GET_EVT_HDR_OPCODE(p) (UINT8)(*((UINT8 *)((p) + 1) + p->offset)) argument 229 #define HCI_GET_EVT_HDR_PARAM_LEN(p) (UINT8) (*((UINT8 *)((p) + 1) + p->offset + 1)) argument 235 …ne UINT64_TO_BE_STREAM(p, u64) {*(p)++ = (UINT8)((u64) >> 56); *(p)++ = (UINT8)((u64) >> 48); *(p… argument 236 …*(p)++ = (UINT8)((u64) >> 24); *(p)++ = (UINT8)((u64) >> 16); *(p)++ = (UINT8)((u64) >> 8); *(p)+… 237 #define UINT32_TO_STREAM(p, u32) {*(p)++ = (UINT8)(u32); *(p)++ = (UINT8)((u32) >> 8); *(p)++ = (UI… argument 238 #define UINT24_TO_STREAM(p, u24) {*(p)++ = (UINT8)(u24); *(p)++ = (UINT8)((u24) >> 8); *(p)++ = (UI… argument 239 #define UINT16_TO_STREAM(p, u16) {*(p)++ = (UINT8)(u16); *(p)++ = (UINT8)((u16) >> 8);} argument [all …]
|
/system/bt/stack/avdt/ |
D | avdt_defs.h | 145 #define AVDT_MSG_PRS_HDR(p, lbl, pkt, msg) \ argument 146 lbl = *(p) >> 4; \ 147 pkt = (*(p) >> 2) & 0x03; \ 148 msg = *(p)++ & 0x03; 150 #define AVDT_MSG_PRS_DISC(p, seid, in_use, type, tsep) \ argument 151 seid = *(p) >> 2; \ 152 in_use = (*(p)++ >> 1) & 0x01; \ 153 type = *(p) >> 4; \ 154 tsep = (*(p)++ >> 3) & 0x01; 156 #define AVDT_MSG_PRS_SIG(p, sig) \ argument [all …]
|
D | avdt_msg.c | 57 typedef void (*tAVDT_MSG_BLD)(UINT8 **p, tAVDT_MSG *p_msg); 60 typedef UINT8 (*tAVDT_MSG_PRS)(tAVDT_MSG *p_msg, UINT8 *p, UINT16 len); 67 static void avdt_msg_bld_none(UINT8 **p, tAVDT_MSG *p_msg); 68 static void avdt_msg_bld_single(UINT8 **p, tAVDT_MSG *p_msg); 69 static void avdt_msg_bld_setconfig_cmd(UINT8 **p, tAVDT_MSG *p_msg); 70 static void avdt_msg_bld_reconfig_cmd(UINT8 **p, tAVDT_MSG *p_msg); 71 static void avdt_msg_bld_multi(UINT8 **p, tAVDT_MSG *p_msg); 72 static void avdt_msg_bld_security_cmd(UINT8 **p, tAVDT_MSG *p_msg); 73 static void avdt_msg_bld_discover_rsp(UINT8 **p, tAVDT_MSG *p_msg); 74 static void avdt_msg_bld_svccap(UINT8 **p, tAVDT_MSG *p_msg); [all …]
|
/system/core/run-as/ |
D | package.c | 288 skip_spaces(const char* p, const char* end) in skip_spaces() argument 290 while (p < end && is_space(*p)) in skip_spaces() 291 p++; in skip_spaces() 293 return p; in skip_spaces() 300 skip_non_spaces(const char* p, const char* end) in skip_non_spaces() argument 302 while (p < end && !is_space(*p)) in skip_non_spaces() 303 p++; in skip_non_spaces() 305 return p; in skip_non_spaces() 312 find_first(const char* p, const char* end, char ch) in find_first() argument 314 while (p < end && *p != ch) in find_first() [all …]
|
/system/bt/stack/sdp/ |
D | sdp_discovery.c | 51 static UINT8 *save_attr_seq (tCONN_CB *p_ccb, UINT8 *p, UINT8 *p_msg_end); 53 static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec, 122 UINT8 *p, *p_start, *p_param_len; in sdp_snd_service_search_req() local 128 p = p_start = (UINT8 *)(p_cmd + 1) + L2CAP_MIN_OFFSET; in sdp_snd_service_search_req() 131 UINT8_TO_BE_STREAM (p, SDP_PDU_SERVICE_SEARCH_REQ); in sdp_snd_service_search_req() 132 UINT16_TO_BE_STREAM (p, p_ccb->transaction_id); in sdp_snd_service_search_req() 136 p_param_len = p; in sdp_snd_service_search_req() 137 p += 2; in sdp_snd_service_search_req() 141 p = sdpu_build_uuid_seq (p, 1, &p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx]); in sdp_snd_service_search_req() 143 p = sdpu_build_uuid_seq (p, p_ccb->p_db->num_uuid_filters, p_ccb->p_db->uuid_filters); in sdp_snd_service_search_req() [all …]
|
D | sdp_db.c | 44 static BOOLEAN find_uuid_in_seq (UINT8 *p , UINT32 seq_len, UINT8 *p_his_uuid, 118 static BOOLEAN find_uuid_in_seq (UINT8 *p , UINT32 seq_len, UINT8 *p_uuid, in find_uuid_in_seq() argument 121 UINT8 *p_end = p + seq_len; in find_uuid_in_seq() 129 while (p < p_end) in find_uuid_in_seq() 131 type = *p++; in find_uuid_in_seq() 132 p = sdpu_get_len_from_type (p, type, &len); in find_uuid_in_seq() 136 if (sdpu_compare_uuid_arrays (p, len, p_uuid, uuid_len)) in find_uuid_in_seq() 141 if (find_uuid_in_seq (p, len, p_uuid, uuid_len, nest_level + 1)) in find_uuid_in_seq() 144 p = p + len; in find_uuid_in_seq() 218 static int sdp_compose_proto_list( UINT8 *p, UINT16 num_elem, in sdp_compose_proto_list() argument [all …]
|
/system/extras/showslab/ |
D | showslab.c | 62 struct slab_info *head = NULL, *p = NULL, *prev = NULL; in get_slabinfo() local 97 p = malloc(sizeof (struct slab_info)); in get_slabinfo() 98 if (!p) { in get_slabinfo() 104 head = prev = p; in get_slabinfo() 108 slabdata %lu %lu %*d", p->name, in get_slabinfo() 109 &p->nr_active_objs, &p->nr_objs, in get_slabinfo() 110 &p->obj_size, &p->objs_per_slab, in get_slabinfo() 113 &p->nr_slabs); in get_slabinfo() 121 if (p->obj_size < stats->min_obj_size) in get_slabinfo() 122 stats->min_obj_size = p->obj_size; in get_slabinfo() [all …]
|
/system/bt/stack/btm/ |
D | btm_sco.c | 86 tSCO_CONN *p ; in btm_sco_flush_sco_data() local 91 p = &btm_cb.sco_cb.sco_db[sco_inx]; in btm_sco_flush_sco_data() 92 while ((p_buf = (BT_HDR *)fixed_queue_try_dequeue(p->xmit_data_q)) != NULL) in btm_sco_flush_sco_data() 277 UINT8 *p = (UINT8 *)(p_msg + 1) + p_msg->offset; 282 STREAM_TO_UINT16 (handle, p); 286 STREAM_TO_UINT8 (pkt_size, p); 333 UINT8 *p; 351 p = (UINT8 *)(p_buf + 1) + p_buf->offset; 353 UINT16_TO_STREAM (p, p_ccb->hci_handle); 362 UINT8_TO_STREAM (p, (UINT8)p_buf->len); [all …]
|
D | btm_acl.c | 100 tACL_CONN *p = &btm_cb.acl_db[0]; in btm_bda_to_acl() local 104 for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p++) in btm_bda_to_acl() 106 if ((p->in_use) && (!memcmp (p->remote_addr, bda, BD_ADDR_LEN)) in btm_bda_to_acl() 108 && p->transport == transport in btm_bda_to_acl() 113 return(p); in btm_bda_to_acl() 133 tACL_CONN *p = &btm_cb.acl_db[0]; in btm_handle_to_acl_index() local 136 for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p++) in btm_handle_to_acl_index() 138 if ((p->in_use) && (p->hci_handle == hci_handle)) in btm_handle_to_acl_index() 217 tACL_CONN *p; in btm_acl_created() local 223 p = btm_bda_to_acl(bda, transport); in btm_acl_created() [all …]
|
/system/core/adb/ |
D | adb_auth.cpp | 36 apacket *p; in send_auth_request() local 45 p = get_apacket(); in send_auth_request() 46 memcpy(p->data, t->token, ret); in send_auth_request() 47 p->msg.command = A_AUTH; in send_auth_request() 48 p->msg.arg0 = ADB_AUTH_TOKEN; in send_auth_request() 49 p->msg.data_length = ret; in send_auth_request() 50 send_packet(p, t); in send_auth_request() 56 apacket *p = get_apacket(); in send_auth_response() local 59 ret = adb_auth_sign(t->key, token, token_size, p->data); in send_auth_response() 62 put_apacket(p); in send_auth_response() [all …]
|
D | sockets.cpp | 125 static int local_socket_enqueue(asocket* s, apacket* p) { in local_socket_enqueue() argument 126 D("LS(%d): enqueue %d", s->id, p->len); in local_socket_enqueue() 128 p->ptr = p->data; in local_socket_enqueue() 141 while (p->len > 0) { in local_socket_enqueue() 142 int r = adb_write(s->fd, p->ptr, p->len); in local_socket_enqueue() 144 p->len -= r; in local_socket_enqueue() 145 p->ptr += r; in local_socket_enqueue() 150 put_apacket(p); in local_socket_enqueue() 159 if (p->len == 0) { in local_socket_enqueue() 160 put_apacket(p); in local_socket_enqueue() [all …]
|
D | transport.cpp | 51 static std::string dump_packet(const char* name, const char* func, apacket* p) { in dump_packet() argument 52 unsigned command = p->msg.command; in dump_packet() 53 int len = p->msg.data_length; in dump_packet() 72 if (p->msg.arg0 < 256U) in dump_packet() 73 snprintf(arg0, sizeof arg0, "%d", p->msg.arg0); in dump_packet() 75 snprintf(arg0, sizeof arg0, "0x%x", p->msg.arg0); in dump_packet() 77 if (p->msg.arg1 < 256U) in dump_packet() 78 snprintf(arg1, sizeof arg1, "%d", p->msg.arg1); in dump_packet() 80 snprintf(arg1, sizeof arg1, "0x%x", p->msg.arg1); in dump_packet() 84 result += dump_hex(p->data, len); in dump_packet() [all …]
|
/system/extras/simpleperf/ |
D | record.cpp | 48 void MoveFromBinaryFormat(T* data_p, size_t n, const char*& p) { in MoveFromBinaryFormat() argument 50 memcpy(data_p, p, size); in MoveFromBinaryFormat() 51 p += size; in MoveFromBinaryFormat() 55 void MoveToBinaryFormat(const T& data, char*& p) { in MoveToBinaryFormat() argument 56 *reinterpret_cast<T*>(p) = data; in MoveToBinaryFormat() 57 p += sizeof(T); in MoveToBinaryFormat() 61 void MoveToBinaryFormat(const T* data_p, size_t n, char*& p) { in MoveToBinaryFormat() argument 63 memcpy(p, data_p, size); in MoveToBinaryFormat() 64 p += size; in MoveToBinaryFormat() 79 void SampleId::ReadFromBinaryFormat(const perf_event_attr& attr, const char* p, const char* end) { in ReadFromBinaryFormat() argument [all …]
|
/system/bt/stack/l2cap/ |
D | l2c_main.c | 48 static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len); 69 UINT8 *p = (UINT8 *)(p_msg + 1) + p_msg->offset; in l2c_rcv_acl_data() local 78 STREAM_TO_UINT16 (handle, p); in l2c_rcv_acl_data() 94 STREAM_TO_UINT16 (hci_len, p); in l2c_rcv_acl_data() 95 STREAM_TO_UINT16 (l2cap_len, p); in l2c_rcv_acl_data() 96 STREAM_TO_UINT16 (rcv_cid, p); in l2c_rcv_acl_data() 97 STREAM_TO_UINT8 (cmd_code, p); in l2c_rcv_acl_data() 132 STREAM_TO_UINT16 (hci_len, p); in l2c_rcv_acl_data() 136 STREAM_TO_UINT16 (l2cap_len, p); in l2c_rcv_acl_data() 137 STREAM_TO_UINT16 (rcv_cid, p); in l2c_rcv_acl_data() [all …]
|
/system/core/libmemtrack/ |
D | memtrack.c | 71 void memtrack_proc_destroy(struct memtrack_proc *p) in memtrack_proc_destroy() argument 75 if (p) { in memtrack_proc_destroy() 77 free(p->types[i].records); in memtrack_proc_destroy() 80 free(p); in memtrack_proc_destroy() 117 static int memtrack_proc_sanity_check(struct memtrack_proc *p) in memtrack_proc_sanity_check() argument 119 (void)p; in memtrack_proc_sanity_check() 123 int memtrack_proc_get(struct memtrack_proc *p, pid_t pid) in memtrack_proc_get() argument 131 if (!p) { in memtrack_proc_get() 135 p->pid = pid; in memtrack_proc_get() 137 memtrack_proc_get_type(&p->types[i], pid, i); in memtrack_proc_get() [all …]
|
/system/bt/stack/smp/ |
D | smp_keys.c | 45 static void smp_rand_back(tBTM_RAND_ENC *p); 48 static void smp_generate_y(tSMP_CB *p_cb, tSMP_INT_DATA *p); 49 static void smp_generate_rand_vector (tSMP_CB *p_cb, tSMP_INT_DATA *p); 50 static void smp_process_stk(tSMP_CB *p_cb, tSMP_ENC *p); 51 static void smp_calculate_comfirm_cont(tSMP_CB *p_cb, tSMP_ENC *p); 52 static void smp_process_confirm(tSMP_CB *p_cb, tSMP_ENC *p); 53 static void smp_process_compare(tSMP_CB *p_cb, tSMP_ENC *p); 54 static void smp_process_ediv(tSMP_CB *p_cb, tSMP_ENC *p); 56 static void smp_continue_private_key_creation(tSMP_CB *p_cb, tBTM_RAND_ENC *p); 63 void smp_debug_print_nbyte_little_endian(UINT8 *p, const UINT8 *key_name, UINT8 len) in smp_debug_print_nbyte_little_endian() argument [all …]
|
/system/extras/libfec/ |
D | fec_process.cpp | 33 process_info *p = static_cast<process_info *>(cookie); in __process() local 35 debug("thread %d: [%" PRIu64 ", %" PRIu64 ")", p->id, p->offset, in __process() 36 p->offset + p->count); in __process() 38 p->rc = p->func(p->f, p->buf, p->count, p->offset, &p->errors); in __process() 39 return p; in __process() 118 process_info *p = NULL; in process() local 120 if (pthread_join(thread, (void **)&p) != 0) { in process() 123 } else if (!p || p->rc == -1) { in process() 126 nread += p->rc; in process() 127 f->errors += p->errors; in process()
|
/system/bt/stack/gatt/ |
D | att_protocol.c | 50 UINT8 *p; in attp_build_mtu_cmd() local 54 p = (UINT8 *)(p_buf + 1) + L2CAP_MIN_OFFSET; in attp_build_mtu_cmd() 55 UINT8_TO_STREAM(p, op_code); in attp_build_mtu_cmd() 56 UINT16_TO_STREAM(p, rx_mtu); in attp_build_mtu_cmd() 75 UINT8 *p; in attp_build_exec_write_cmd() local 77 p = (UINT8 *)(p_buf + 1) + L2CAP_MIN_OFFSET; in attp_build_exec_write_cmd() 82 UINT8_TO_STREAM(p, op_code); in attp_build_exec_write_cmd() 86 UINT8_TO_STREAM (p, flag); in attp_build_exec_write_cmd() 104 UINT8 *p; in attp_build_err_cmd() local 107 p = (UINT8 *)(p_buf + 1) + L2CAP_MIN_OFFSET; in attp_build_err_cmd() [all …]
|
/system/bt/stack/bnep/ |
D | bnep_utils.c | 181 UINT8 *p, *p_start; in bnep_send_conn_req() local 187 p = p_start = (UINT8 *)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnep_send_conn_req() 190 UINT8_TO_BE_STREAM (p, BNEP_FRAME_CONTROL); in bnep_send_conn_req() 193 UINT8_TO_BE_STREAM (p, BNEP_SETUP_CONNECTION_REQUEST_MSG); in bnep_send_conn_req() 195 UINT8_TO_BE_STREAM (p, p_bcb->dst_uuid.len); in bnep_send_conn_req() 199 UINT16_TO_BE_STREAM (p, p_bcb->dst_uuid.uu.uuid16); in bnep_send_conn_req() 200 UINT16_TO_BE_STREAM (p, p_bcb->src_uuid.uu.uuid16); in bnep_send_conn_req() 204 UINT32_TO_BE_STREAM (p, p_bcb->dst_uuid.uu.uuid32); in bnep_send_conn_req() 205 UINT32_TO_BE_STREAM (p, p_bcb->src_uuid.uu.uuid32); in bnep_send_conn_req() 209 memcpy (p, p_bcb->dst_uuid.uu.uuid128, p_bcb->dst_uuid.len); in bnep_send_conn_req() [all …]
|
/system/keymaster/ |
D | integrity_assured_key_blob.cpp | 94 uint8_t* p = key_blob->writable_data(); in SerializeIntegrityAssuredBlob() local 95 *p++ = BLOB_VERSION; in SerializeIntegrityAssuredBlob() 96 p = key_material.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob() 97 p = hw_enforced.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob() 98 p = sw_enforced.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob() 100 return ComputeHmac(key_blob->key_material, p - key_blob->key_material, hidden, p); in SerializeIntegrityAssuredBlob() 108 const uint8_t* p = key_blob.begin(); in DeserializeIntegrityAssuredBlob() local 111 if (p > end || p + HMAC_SIZE > end) in DeserializeIntegrityAssuredBlob() 131 const uint8_t* p = key_blob.begin(); in DeserializeIntegrityAssuredBlob_NoHmacCheck() local 134 if (p > end) in DeserializeIntegrityAssuredBlob_NoHmacCheck() [all …]
|
/system/bt/stack/avrc/ |
D | avrc_pars_ct.c | 46 UINT8 *p; in avrc_pars_vendor_rsp() local 58 p = p_msg->p_vendor_data; in avrc_pars_vendor_rsp() 59 BE_STREAM_TO_UINT8 (p_result->pdu, p); in avrc_pars_vendor_rsp() 60 p++; /* skip the reserved/packe_type byte */ in avrc_pars_vendor_rsp() 61 BE_STREAM_TO_UINT16 (len, p); in avrc_pars_vendor_rsp() 66 p_result->rsp.status = *p; in avrc_pars_vendor_rsp() 81 BE_STREAM_TO_UINT8 (p_result->volume.volume, p); in avrc_pars_vendor_rsp() 88 BE_STREAM_TO_UINT8 (eventid, p); in avrc_pars_vendor_rsp() 95 BE_STREAM_TO_UINT8 (p_result->reg_notif.param.volume, p); in avrc_pars_vendor_rsp() 168 UINT8 *p = p_msg->p_vendor_data; in avrc_ctrl_pars_vendor_rsp() local [all …]
|