Home
last modified time | relevance | path

Searched refs:data_len (Results 1 – 25 of 48) sorted by relevance

12

/system/keymaster/android_keymaster/
Dserializable.cpp27 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len) { in append_to_buf() argument
28 if (__pval(buf) + data_len < __pval(buf)) // Pointer wrap check in append_to_buf()
31 if (buf + data_len <= end) { in append_to_buf()
32 memcpy(buf, data, data_len); in append_to_buf()
33 return buf + data_len; in append_to_buf()
97 bool Buffer::Reinitialize(const void* data, size_t data_len) { in Reinitialize() argument
99 if (__pval(data) + data_len < __pval(data)) // Pointer wrap check in Reinitialize()
101 buffer_.reset(new (std::nothrow) uint8_t[data_len]); in Reinitialize()
104 buffer_size_ = data_len; in Reinitialize()
105 memcpy(buffer_.get(), data, data_len); in Reinitialize()
/system/connectivity/wifilogd/
Dbyte_buffer.h48 size_t data_len) { in AppendOrDie() argument
49 CHECK(data_len <= raw_buffer_.size() - write_pos_); in AppendOrDie()
50 std::memcpy(raw_buffer_.data() + write_pos_, data, data_len); in AppendOrDie()
51 write_pos_ += data_len; in AppendOrDie()
Dmessage_buffer.cpp88 void MessageBuffer::AppendRawBytes(const void* data_start, size_t data_len) { in AppendRawBytes() argument
89 std::memcpy(data_.get() + write_pos_, data_start, data_len); in AppendRawBytes()
90 write_pos_ += data_len; in AppendRawBytes()
Dprotocol.h77 data_len = new_data_len; in set_data_len()
91 uint16_t data_len; member
Dmessage_buffer.h52 bool Append(NONNULL const uint8_t* data, uint16_t data_len);
95 void AppendRawBytes(NONNULL const void* data_start, size_t data_len);
/system/nfc/src/nfc/tags/
Dce_main.cc61 tNFC_STATUS CE_SendRawFrame(uint8_t* p_raw_data, uint16_t data_len) { in CE_SendRawFrame() argument
72 memcpy(p, p_raw_data, data_len); in CE_SendRawFrame()
73 p_data->len = data_len; in CE_SendRawFrame()
75 << StringPrintf("CE SENT raw frame (0x%x)", data_len); in CE_SendRawFrame()
Drw_main.cc170 tNFC_STATUS RW_SendRawFrame(uint8_t* p_raw_data, uint16_t data_len) { in RW_SendRawFrame() argument
181 memcpy(p, p_raw_data, data_len); in RW_SendRawFrame()
182 p_data->len = data_len; in RW_SendRawFrame()
185 << StringPrintf("RW SENT raw frame (0x%x)", data_len); in RW_SendRawFrame()
Dce_t4t.cc338 uint8_t data_len; in ce_t4t_process_select_file_cmd() local
346 BE_STREAM_TO_UINT8(data_len, p_cmd); in ce_t4t_process_select_file_cmd()
348 if (data_len == T4T_FILE_ID_SIZE) { in ce_t4t_process_select_file_cmd()
381 uint8_t data_len; in ce_t4t_process_select_app_cmd() local
391 BE_STREAM_TO_UINT8(data_len, p_cmd); in ce_t4t_process_select_app_cmd()
394 if (data_len > (p_c_apdu->len - T4T_CMD_MAX_HDR_SIZE)) { in ce_t4t_process_select_app_cmd()
403 if ((data_len == T4T_V20_NDEF_TAG_AID_LEN) && in ce_t4t_process_select_app_cmd()
404 (!memcmp(p_cmd, ce_test_tag_app_id, data_len)) && in ce_t4t_process_select_app_cmd()
421 (ce_cb.mem.t4t.reg_aid[xx].aid_len == data_len) && in ce_t4t_process_select_app_cmd()
422 (!(memcmp(ce_cb.mem.t4t.reg_aid[xx].aid, p_cmd, data_len)))) { in ce_t4t_process_select_app_cmd()
[all …]
/system/nfc/src/include/
Dnfc_hal_api.h33 typedef void(tHAL_NFC_DATA_CBACK)(uint16_t data_len, uint8_t* p_data);
44 typedef void(tHAL_API_CORE_INITIALIZED)(uint16_t data_len,
46 typedef void(tHAL_API_WRITE)(uint16_t data_len, uint8_t* p_data);
DNfcAdaptation.h118 static void HalDeviceContextDataCallback(uint16_t data_len, uint8_t* p_data);
125 static void HalCoreInitialized(uint16_t data_len,
127 static void HalWrite(uint16_t data_len, uint8_t* p_data);
134 static void HalDownloadFirmwareDataCallback(uint16_t data_len,
/system/keymaster/km_openssl/
Dhmac.cpp54 bool HmacSha256::Sign(const uint8_t* data, size_t data_len, uint8_t* out_digest, in Sign() argument
63 if (nullptr == ::HMAC(EVP_sha256(), key_.get(), key_len_, data, data_len, digest, nullptr)) { in Sign()
77 bool HmacSha256::Verify(const uint8_t* data, size_t data_len, const uint8_t* digest, in Verify() argument
83 if (!Sign(data, data_len, computed_digest, sizeof(computed_digest))) in Verify()
/system/nfc/src/nfa/hci/
Dnfa_hci_act.cc57 static void nfa_hci_handle_loopback_gate_pkt(uint8_t* p_data, uint16_t data_len,
60 uint16_t data_len,
62 static void nfa_hci_handle_generic_gate_cmd(uint8_t* p_data, uint8_t data_len,
64 static void nfa_hci_handle_generic_gate_rsp(uint8_t* p_data, uint8_t data_len,
66 static void nfa_hci_handle_generic_gate_evt(uint8_t* p_data, uint16_t data_len,
1316 void nfa_hci_handle_admin_gate_rsp(uint8_t* p_data, uint8_t data_len) { in nfa_hci_handle_admin_gate_rsp() argument
1381 while ((host_count < data_len) && in nfa_hci_handle_admin_gate_rsp()
1405 if (data_len >= NFA_HCI_SESSION_ID_LEN && in nfa_hci_handle_admin_gate_rsp()
1417 if (data_len < NFA_HCI_SESSION_ID_LEN) { in nfa_hci_handle_admin_gate_rsp()
1472 if (data_len >= NFA_HCI_SESSION_ID_LEN && in nfa_hci_handle_admin_gate_rsp()
[all …]
Dnfa_hci_utils.cc306 uint16_t data_len; in nfa_hciu_send_msg() local
326 data_len = in nfa_hciu_send_msg()
332 if (msg_len > data_len) { in nfa_hciu_send_msg()
335 data_len = msg_len; in nfa_hciu_send_msg()
348 if (data_len != 0) { in nfa_hciu_send_msg()
349 memcpy(p_data, p_msg, data_len); in nfa_hciu_send_msg()
351 p_buf->len += data_len; in nfa_hciu_send_msg()
352 msg_len -= data_len; in nfa_hciu_send_msg()
353 if (msg_len > 0) p_msg += data_len; in nfa_hciu_send_msg()
Dnfa_hci_main.cc68 static void nfa_hci_assemble_msg(uint8_t* p_data, uint16_t data_len);
974 evt_data.registry.data_len = 0; in nfa_hci_rsp_timeout()
988 evt_data.registry.data_len = 0; in nfa_hci_rsp_timeout()
1092 static void nfa_hci_assemble_msg(uint8_t* p_data, uint16_t data_len) { in nfa_hci_assemble_msg() argument
1093 if ((nfa_hci_cb.msg_len + data_len) > nfa_hci_cb.max_msg_len) { in nfa_hci_assemble_msg()
1103 ((nfa_hci_cb.msg_len + data_len) - nfa_hci_cb.max_msg_len)); in nfa_hci_assemble_msg()
1105 memcpy(&nfa_hci_cb.p_msg_data[nfa_hci_cb.msg_len], p_data, data_len); in nfa_hci_assemble_msg()
1106 nfa_hci_cb.msg_len += data_len; in nfa_hci_assemble_msg()
/system/core/libdiskconfig/
Dwrite_lst.c30 alloc_wl(uint32_t data_len) in alloc_wl() argument
34 if (!(item = malloc(sizeof(struct write_list) + data_len))) { in alloc_wl()
39 item->len = data_len; in alloc_wl()
/system/connectivity/wifilogd/tests/
Dprotocol_unittest.cpp43 EXPECT_EQ(dataLen, ascii_message_header.data_len); in TEST()
54 EXPECT_EQ(dataLen, ascii_message_header.data_len); in TEST()
61 EXPECT_EQ(0U, offsetof(AsciiMessage, data_len)); in TEST()
62 EXPECT_EQ(2U, sizeof(AsciiMessage::data_len)); in TEST()
/system/keymaster/include/keymaster/km_openssl/
Dhmac.h41 bool Sign(const uint8_t* data, size_t data_len, uint8_t* digest, size_t digest_len) const;
50 bool Verify(const uint8_t* data, size_t data_len, const uint8_t* digest,
/system/keymaster/include/keymaster/
Dserializable.h83 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len);
111 size_t data_len) { in append_size_and_data_to_buf() argument
112 buf = append_uint32_to_buf(buf, end, data_len); in append_size_and_data_to_buf()
113 return append_to_buf(buf, end, data, data_len); in append_size_and_data_to_buf()
/system/bt/stack/hcic/
Dhciblecmds.cc103 void btsnd_hcic_ble_set_adv_data(uint8_t data_len, uint8_t* p_data) { in btsnd_hcic_ble_set_adv_data() argument
115 if (p_data != NULL && data_len > 0) { in btsnd_hcic_ble_set_adv_data()
116 if (data_len > HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA) in btsnd_hcic_ble_set_adv_data()
117 data_len = HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA; in btsnd_hcic_ble_set_adv_data()
119 UINT8_TO_STREAM(pp, data_len); in btsnd_hcic_ble_set_adv_data()
121 ARRAY_TO_STREAM(pp, p_data, data_len); in btsnd_hcic_ble_set_adv_data()
125 void btsnd_hcic_ble_set_scan_rsp_data(uint8_t data_len, uint8_t* p_scan_rsp) { in btsnd_hcic_ble_set_scan_rsp_data() argument
137 if (p_scan_rsp != NULL && data_len > 0) { in btsnd_hcic_ble_set_scan_rsp_data()
138 if (data_len > HCIC_PARAM_SIZE_BLE_WRITE_SCAN_RSP) in btsnd_hcic_ble_set_scan_rsp_data()
139 data_len = HCIC_PARAM_SIZE_BLE_WRITE_SCAN_RSP; in btsnd_hcic_ble_set_scan_rsp_data()
[all …]
/system/nfc/src/adaptation/
DNfcAdaptation.cc597 void NfcAdaptation::HalDeviceContextDataCallback(uint16_t data_len, in HalDeviceContextDataCallback() argument
601 << StringPrintf("%s: len=%u", func, data_len); in HalDeviceContextDataCallback()
602 if (mHalDataCallback) mHalDataCallback(data_len, p_data); in HalDeviceContextDataCallback()
614 void NfcAdaptation::HalWrite(uint16_t data_len, uint8_t* p_data) { in HalWrite() argument
618 data.setToExternal(p_data, data_len); in HalWrite()
631 void NfcAdaptation::HalCoreInitialized(uint16_t data_len, in HalCoreInitialized() argument
636 data.setToExternal(p_core_init_rsp_params, data_len); in HalCoreInitialized()
783 uint16_t data_len, in HalDownloadFirmwareDataCallback() argument
/system/nfc/src/nfa/dm/
Dnfa_dm_api.cc930 tNFA_STATUS NFA_SendRawFrame(uint8_t* p_raw_data, uint16_t data_len, in NFA_SendRawFrame() argument
936 DLOG_IF(INFO, nfc_debug_enabled) << StringPrintf("data_len:%d", data_len); in NFA_SendRawFrame()
939 if ((data_len == 0) || (p_raw_data == nullptr)) in NFA_SendRawFrame()
942 size = NFC_HDR_SIZE + NCI_MSG_OFFSET_SIZE + NCI_DATA_HDR_SIZE + data_len; in NFA_SendRawFrame()
944 if (size < data_len) { in NFA_SendRawFrame()
953 p_msg->len = data_len; in NFA_SendRawFrame()
956 memcpy(p, p_raw_data, data_len); in NFA_SendRawFrame()
/system/libufdt/
Dufdt_convert.c330 int data_len = 0; in _ufdt_output_property_to_fdt() local
331 void *data = ufdt_node_get_fdt_prop_data(&prop_node->parent, &data_len); in _ufdt_output_property_to_fdt()
332 int aligned_data_len = (data_len + (FDT_TAGSIZE - 1)) & ~(FDT_TAGSIZE - 1); in _ufdt_output_property_to_fdt()
348 new_prop->len = cpu_to_fdt32(data_len); in _ufdt_output_property_to_fdt()
349 dto_memcpy(new_prop->data, data, data_len); in _ufdt_output_property_to_fdt()
/system/nfc/src/nfc/nfc/
Dnfc_ncif.cc1165 uint8_t data_len, ulen, tag, *p_data; in nfc_ncif_proc_ee_action() local
1173 data_len = *p++; in nfc_ncif_proc_ee_action()
1175 if (data_len > plen) data_len = (uint8_t)plen; in nfc_ncif_proc_ee_action()
1179 if (data_len > NFC_MAX_AID_LEN) data_len = NFC_MAX_AID_LEN; in nfc_ncif_proc_ee_action()
1180 evt_data.act_data.param.aid.len_aid = data_len; in nfc_ncif_proc_ee_action()
1181 STREAM_TO_ARRAY(evt_data.act_data.param.aid.aid, p, data_len); in nfc_ncif_proc_ee_action()
1190 while (data_len > NFC_TL_SIZE) { in nfc_ncif_proc_ee_action()
1191 data_len -= NFC_TL_SIZE; in nfc_ncif_proc_ee_action()
1194 if (ulen > data_len) ulen = data_len; in nfc_ncif_proc_ee_action()
1213 data_len -= ulen; in nfc_ncif_proc_ee_action()
/system/nfc/src/nfc/include/
Dce_api.h194 extern tNFC_STATUS CE_SendRawFrame(uint8_t* p_raw_data, uint16_t data_len);
/system/bt/stack/btm/
Dbtm_ble_gap.cc153 int8_t tx_power, int8_t rssi, uint16_t periodic_adv_int, uint8_t data_len,
1464 uint8_t data_len; in btm_ble_is_discoverable() local
1480 adv_data, BTM_BLE_AD_TYPE_FLAG, &data_len); in btm_ble_is_discoverable()
1481 if (p_flag != NULL && data_len != 0) { in btm_ble_is_discoverable()
1769 void btm_ble_process_ext_adv_pkt(uint8_t data_len, uint8_t* data) { in btm_ble_process_ext_adv_pkt() argument
1784 if (p > data + data_len) { in btm_ble_process_ext_adv_pkt()
1808 if (p > data + data_len) { in btm_ble_process_ext_adv_pkt()
1833 void btm_ble_process_adv_pkt(uint8_t data_len, uint8_t* data) { in btm_ble_process_adv_pkt() argument
1846 if (p > data + data_len) { in btm_ble_process_adv_pkt()
1860 if (p > data + data_len - sizeof(rssi)) { in btm_ble_process_adv_pkt()
[all …]

12