Home
last modified time | relevance | path

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

123

/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/keymaster/android_keymaster/
Dserializable.cpp38 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len) { in append_to_buf() argument
39 if (buffer_bound_check(buf, end, data_len)) { in append_to_buf()
40 memcpy(buf, data, data_len); in append_to_buf()
41 return buf + data_len; in append_to_buf()
105 bool Buffer::Reinitialize(const void* data, size_t data_len) { in Reinitialize() argument
107 if (__pval(data) + data_len < __pval(data)) // Pointer wrap check in Reinitialize()
109 buffer_.reset(new (std::nothrow) uint8_t[data_len]); in Reinitialize()
112 buffer_size_ = data_len; in Reinitialize()
113 memcpy(buffer_.get(), data, data_len); in Reinitialize()
/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.h123 static void HalDeviceContextDataCallback(uint16_t data_len, uint8_t* p_data);
130 static void HalCoreInitialized(uint16_t data_len,
132 static void HalWrite(uint16_t data_len, uint8_t* p_data);
139 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()
1478 if (data_len >= NFA_HCI_SESSION_ID_LEN && in nfa_hci_handle_admin_gate_rsp()
[all …]
Dnfa_hci_utils.cc307 uint16_t data_len; in nfa_hciu_send_msg() local
335 data_len = in nfa_hciu_send_msg()
341 if (msg_len > data_len) { in nfa_hciu_send_msg()
344 data_len = msg_len; in nfa_hciu_send_msg()
357 if (data_len != 0) { in nfa_hciu_send_msg()
358 memcpy(p_data, p_msg, data_len); in nfa_hciu_send_msg()
360 p_buf->len += data_len; in nfa_hciu_send_msg()
361 if (msg_len >= data_len) { in nfa_hciu_send_msg()
362 msg_len -= data_len; in nfa_hciu_send_msg()
363 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);
990 evt_data.registry.data_len = 0; in nfa_hci_rsp_timeout()
1004 evt_data.registry.data_len = 0; in nfa_hci_rsp_timeout()
1108 static void nfa_hci_assemble_msg(uint8_t* p_data, uint16_t data_len) { in nfa_hci_assemble_msg() argument
1109 if ((nfa_hci_cb.msg_len + data_len) > nfa_hci_cb.max_msg_len) { in nfa_hci_assemble_msg()
1119 ((nfa_hci_cb.msg_len + data_len) - nfa_hci_cb.max_msg_len)); in nfa_hci_assemble_msg()
1121 memcpy(&nfa_hci_cb.p_msg_data[nfa_hci_cb.msg_len], p_data, data_len); in nfa_hci_assemble_msg()
1122 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.cc626 void NfcAdaptation::HalDeviceContextDataCallback(uint16_t data_len, in HalDeviceContextDataCallback() argument
630 << StringPrintf("%s: len=%u", func, data_len); in HalDeviceContextDataCallback()
631 if (mHalDataCallback) mHalDataCallback(data_len, p_data); in HalDeviceContextDataCallback()
643 void NfcAdaptation::HalWrite(uint16_t data_len, uint8_t* p_data) { in HalWrite() argument
647 data.setToExternal(p_data, data_len); in HalWrite()
660 void NfcAdaptation::HalCoreInitialized(uint16_t data_len, in HalCoreInitialized() argument
665 data.setToExternal(p_core_init_rsp_params, data_len); in HalCoreInitialized()
812 uint16_t data_len, in HalDownloadFirmwareDataCallback() argument
/system/bt/gd/dumpsys/bundler/
Dbundler.cc123 void WriteHeaderFile(FILE* fp, const uint8_t* data, size_t data_len) { in WriteHeaderFile() argument
167 for (auto i = 0; i < data_len; i++) { in WriteHeaderFile()
169 if (i != data_len - 1) { in WriteHeaderFile()
186 fprintf(fp, "const size_t %s::data_size = %zu;\n", opts.ns_name, data_len); in WriteHeaderFile()
/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/include/
Dce_api.h194 extern tNFC_STATUS CE_SendRawFrame(uint8_t* p_raw_data, uint16_t data_len);
/system/nfc/src/nfc/nfc/
Dnfc_ncif.cc1164 uint8_t data_len, ulen, tag, *p_data; in nfc_ncif_proc_ee_action() local
1172 data_len = *p++; in nfc_ncif_proc_ee_action()
1174 if (data_len > plen) data_len = (uint8_t)plen; in nfc_ncif_proc_ee_action()
1178 if (data_len > NFC_MAX_AID_LEN) data_len = NFC_MAX_AID_LEN; in nfc_ncif_proc_ee_action()
1179 evt_data.act_data.param.aid.len_aid = data_len; in nfc_ncif_proc_ee_action()
1180 STREAM_TO_ARRAY(evt_data.act_data.param.aid.aid, p, data_len); in nfc_ncif_proc_ee_action()
1189 while (data_len > NFC_TL_SIZE) { in nfc_ncif_proc_ee_action()
1190 data_len -= NFC_TL_SIZE; in nfc_ncif_proc_ee_action()
1193 if (ulen > data_len) ulen = data_len; in nfc_ncif_proc_ee_action()
1212 data_len -= ulen; in nfc_ncif_proc_ee_action()

123