/system/core/libsparse/ |
D | simg_dump.py | 77 header = struct.unpack("<I4H4I", header_bin) 79 magic = header[0] 80 major_version = header[1] 81 minor_version = header[2] 82 file_hdr_sz = header[3] 83 chunk_hdr_sz = header[4] 84 blk_sz = header[5] 85 total_blks = header[6] 86 total_chunks = header[7] 87 image_checksum = header[8] [all …]
|
/system/chre/platform/shared/ |
D | memory_manager.cc | 24 AllocHeader *header = nullptr; in nanoappAlloc() local 33 header = static_cast<AllocHeader*>( in nanoappAlloc() 36 if (header != nullptr) { in nanoappAlloc() 43 header->data.bytes = bytes; in nanoappAlloc() 44 header->data.instanceId = app->getInstanceId(); in nanoappAlloc() 45 header++; in nanoappAlloc() 49 return header; in nanoappAlloc() 54 AllocHeader *header = static_cast<AllocHeader*>(ptr); in nanoappFree() local 55 header--; in nanoappFree() 60 if (app->getInstanceId() != header->data.instanceId) { in nanoappFree() [all …]
|
/system/core/libappfuse/tests/ |
D | FuseBufferTest.cc | 46 packet->header.len = headerSize; in TestReadInvalidLength() 59 packet->header.len = size; in TestWriteInvalidLength() 70 request.header.len = sizeof(FuseRequest); in TEST() 71 request.header.opcode = 1; in TEST() 72 request.header.unique = 2; in TEST() 73 request.header.nodeid = 3; in TEST() 74 request.header.uid = 4; in TEST() 75 request.header.gid = 5; in TEST() 76 request.header.pid = 6; in TEST() 85 EXPECT_EQ(sizeof(FuseRequest), request.header.len); in TEST() [all …]
|
D | FuseBridgeLoopTest.cc | 68 request_.header.opcode = opcode; in CheckNotImpl() 69 request_.header.len = sizeof(fuse_in_header); in CheckNotImpl() 70 request_.header.unique = 1; in CheckNotImpl() 75 EXPECT_EQ(-ENOSYS, response_.header.error); in CheckNotImpl() 82 request_.header.opcode = opcode; in CheckProxy() 83 request_.header.unique = opcode; // Use opcode as unique. in CheckProxy() 84 request_.header.len = sizeof(fuse_in_header); in CheckProxy() 89 EXPECT_EQ(opcode, request_.header.opcode); in CheckProxy() 90 EXPECT_EQ(opcode, request_.header.unique); in CheckProxy() 93 response_.header.len = sizeof(fuse_out_header); in CheckProxy() [all …]
|
D | FuseAppLoopTest.cc | 103 request_.header.nodeid = 10; in CheckCallback() 110 EXPECT_EQ(kFuseSuccess, response_.header.error); in CheckCallback() 112 response_.header.len); in CheckCallback() 113 EXPECT_EQ(1u, response_.header.unique); in CheckCallback() 137 request_.header.nodeid = FUSE_ROOT_ID; in TEST_F() 143 EXPECT_EQ(kFuseSuccess, response_.header.error); in TEST_F() 145 response_.header.len); in TEST_F() 146 EXPECT_EQ(1u, response_.header.unique); in TEST_F() 175 request_.header.nodeid = FUSE_ROOT_ID; in TEST_F() 181 EXPECT_EQ(sizeof(fuse_out_header), response_.header.len); in TEST_F() [all …]
|
/system/libufdt/utils/src/ |
D | dt_table.c | 25 void dt_table_header_init(struct dt_table_header *header, enum DT_TYPE dt_type) { in dt_table_header_init() argument 29 dto_memset(header, 0, header_size); in dt_table_header_init() 31 header->magic = cpu_to_fdt32(ACPI_TABLE_MAGIC); in dt_table_header_init() 33 header->magic = cpu_to_fdt32(DT_TABLE_MAGIC); in dt_table_header_init() 35 header->total_size = cpu_to_fdt32(header_size); in dt_table_header_init() 36 header->header_size = cpu_to_fdt32(header_size); in dt_table_header_init() 37 header->dt_entry_size = cpu_to_fdt32(entry_size); in dt_table_header_init() 38 header->dt_entries_offset = cpu_to_fdt32(header_size); in dt_table_header_init() 39 header->page_size = cpu_to_fdt32(DT_TABLE_DEFAULT_PAGE_SIZE); in dt_table_header_init() 40 header->version = cpu_to_fdt32(DT_TABLE_DEFAULT_VERSION); in dt_table_header_init()
|
D | mkdtimg_dump.c | 107 static void output_table_header(FILE *out_fp, const struct dt_table_header *header) { in output_table_header() argument 109 output_prop_hex(out_fp, "magic", header->magic); in output_table_header() 110 output_prop_int(out_fp, "total_size", header->total_size); in output_table_header() 111 output_prop_int(out_fp, "header_size", header->header_size); in output_table_header() 112 output_prop_int(out_fp, "dt_entry_size", header->dt_entry_size); in output_table_header() 113 output_prop_int(out_fp, "dt_entry_count", header->dt_entry_count); in output_table_header() 114 output_prop_int(out_fp, "dt_entries_offset", header->dt_entries_offset); in output_table_header() 115 output_prop_int(out_fp, "page_size", header->page_size); in output_table_header() 116 output_prop_int(out_fp, "version", header->version); in output_table_header() 160 struct dt_table_header header; in dump_image_from_fp() local [all …]
|
/system/bt/vendor_libs/test_vendor_lib/scripts/ |
D | link_layer_socket.py | 104 header = self.rx_bytes(17) 105 if not header: 107 payload_length = header[0] 108 payload_length |= header[1] << 8 109 payload_length |= header[2] << 16 110 payload_length |= header[3] << 24 111 print('Rx: type_byte ' + hex(header[4])) 112 …print('Rx: from ' + hex(header[5]) + ':' + hex(header[6]) + ':' + hex(header[7]) + ':' + hex(heade… 113 ':' + hex(header[9]) + ':' + hex(header[10])) 114 …print('Rx: to ' + hex(header[11]) + ':' + hex(header[12]) + ':' + hex(header[13]) + ':' + hex(head… [all …]
|
/system/core/libappfuse/ |
D | FuseBuffer.cc | 41 const auto& header = static_cast<const T*>(self)->header; in CheckHeaderLength() local 42 if (header.len >= sizeof(header) && header.len <= max_size) { in CheckHeaderLength() 45 LOG(ERROR) << "Invalid header length is found in " << name << ": " << header.len; in CheckHeaderLength() 68 const auto& header = static_cast<const T*>(self)->header; in ReadInternal() local 69 if (result < static_cast<ssize_t>(sizeof(header))) { in ReadInternal() 70 LOG(ERROR) << "Read bytes " << result << " are shorter than header size " << sizeof(header); in ReadInternal() 78 if (static_cast<uint32_t>(result) != header.len) { in ReadInternal() 79 LOG(ERROR) << "Read bytes " << result << " are different from header.len " << header.len; in ReadInternal() 94 const auto& header = static_cast<const T*>(self)->header; in WriteInternal() local 100 result = TEMP_FAILURE_RETRY(send(fd, buf, header.len, sockflag)); in WriteInternal() [all …]
|
D | FuseAppLoop.cc | 35 if (buffer->request.header.nodeid != FUSE_ROOT_ID) { in HandleLookUp() 37 return loop->ReplySimple(buffer->request.header.unique, -ENOENT); in HandleLookUp() 41 const size_t filename_length = buffer->request.header.len - sizeof(fuse_in_header); in HandleLookUp() 44 return loop->ReplySimple(buffer->request.header.unique, -ENOENT); in HandleLookUp() 50 return loop->ReplySimple(buffer->request.header.unique, -ENOENT); in HandleLookUp() 53 callback->OnLookup(buffer->request.header.unique, inode); in HandleLookUp() 58 if (buffer->request.header.nodeid == FUSE_ROOT_ID) { in HandleGetAttr() 59 return loop->ReplyGetAttr(buffer->request.header.unique, buffer->request.header.nodeid, 0, in HandleGetAttr() 62 callback->OnGetAttr(buffer->request.header.unique, buffer->request.header.nodeid); in HandleGetAttr() 69 return loop->ReplySimple(buffer->request.header.unique, -EINVAL); in HandleRead() [all …]
|
/system/core/fs_mgr/liblp/ |
D | reader.cpp | 155 static bool ValidateTableBounds(const LpMetadataHeader& header, in ValidateTableBounds() argument 157 if (table.offset > header.tables_size) { in ValidateTableBounds() 161 if (header.tables_size - table.offset < table_size) { in ValidateTableBounds() 169 LpMetadataHeader& header = metadata->header; in ReadMetadataHeader() local 170 memset(&header, 0, sizeof(header)); in ReadMetadataHeader() 172 if (!reader->ReadFully(&header, sizeof(LpMetadataHeaderV1_0))) { in ReadMetadataHeader() 178 if (header.magic != LP_METADATA_HEADER_MAGIC) { in ReadMetadataHeader() 182 if (header.major_version != LP_METADATA_MAJOR_VERSION || in ReadMetadataHeader() 183 header.minor_version > LP_METADATA_MINOR_VERSION_MAX) { in ReadMetadataHeader() 189 uint32_t expected_struct_size = sizeof(header); in ReadMetadataHeader() [all …]
|
/system/connectivity/wificond/net/ |
D | nl80211_attribute.cpp | 45 nlattr* header = reinterpret_cast<nlattr*>(data_.data()); in InitHeaderAndResize() local 46 header->nla_type = attribute_id; in InitHeaderAndResize() 47 header->nla_len = NLA_HDRLEN + payload_length; in InitHeaderAndResize() 51 const nlattr* header = reinterpret_cast<const nlattr*>(data_.data()); in GetAttributeId() local 52 return header->nla_type; in GetAttributeId() 59 const nlattr* header = reinterpret_cast<const nlattr*>(data_.data()); in IsValid() local 60 return NLA_ALIGN(header->nla_len) == data_.size(); in IsValid() 76 const nlattr* header = reinterpret_cast<const nlattr*>(ptr); in GetAttributeImpl() local 77 if (header->nla_type == attr_id) { in GetAttributeImpl() 78 if (ptr + NLA_ALIGN(header->nla_len) > end_ptr) { in GetAttributeImpl() [all …]
|
/system/core/liblog/ |
D | logd_writer.cpp | 92 android_log_header_t header; in LogdWrite() local 113 header.tid = gettid(); in LogdWrite() 114 header.realtime.tv_sec = ts->tv_sec; in LogdWrite() 115 header.realtime.tv_nsec = ts->tv_nsec; in LogdWrite() 117 newVec[0].iov_base = (unsigned char*)&header; in LogdWrite() 118 newVec[0].iov_len = sizeof(header); in LogdWrite() 124 header.id = LOG_ID_SECURITY; in LogdWrite() 125 buffer.header.tag = LIBLOG_LOG_TAG; in LogdWrite() 133 if (ret != (ssize_t)(sizeof(header) + sizeof(buffer))) { in LogdWrite() 142 header.id = LOG_ID_EVENTS; in LogdWrite() [all …]
|
/system/core/qemu_pipe/ |
D | qemu_pipe.cpp | 71 char header[5]; in qemu_pipe_frame_send() local 72 snprintf(header, sizeof(header), "%04zx", len); in qemu_pipe_frame_send() 73 if (!WriteFully(fd, header, 4)) { in qemu_pipe_frame_send() 85 char header[5]; in qemu_pipe_frame_recv() local 86 if (!ReadFully(fd, header, 4)) { in qemu_pipe_frame_recv() 90 header[4] = '\0'; in qemu_pipe_frame_recv() 92 if (sscanf(header, "%04zx", &size) != 1) { in qemu_pipe_frame_recv() 93 QEMU_PIPE_DEBUG("Malformed qemud frame header: [%.*s]", 4, header); in qemu_pipe_frame_recv()
|
/system/netd/server/ |
D | WakeupController.cpp | 56 struct tcphdr header; in extractIpPorts() local 57 if (extract(payload, header) < sizeof(struct tcphdr)) { in extractIpPorts() 60 args.srcPort = ntohs(header.th_sport); in extractIpPorts() 61 args.dstPort = ntohs(header.th_dport); in extractIpPorts() 65 struct udphdr header; in extractIpPorts() local 66 if (extract(payload, header) < sizeof(struct udphdr)) { in extractIpPorts() 69 args.srcPort = ntohs(header.uh_sport); in extractIpPorts() 70 args.dstPort = ntohs(header.uh_dport); in extractIpPorts() 81 struct iphdr header; in extractIpHeader() local 82 if (extract(payload, header) < sizeof(struct iphdr)) { in extractIpHeader() [all …]
|
/system/core/trusty/utils/rpmb_dev/ |
D | rpmb_dev.c | 80 struct rpmb_data_header header; member 126 int pos = addr * RPMB_PACKET_DATA_SIZE + sizeof(s->header); in rpmb_file_seek() 138 if (s->header.key_programmed) { in rpmb_dev_program_key() 142 s->header.key = s->cmd[0].key_mac; in rpmb_dev_program_key() 143 s->header.key_programmed = 1; in rpmb_dev_program_key() 151 ret = write(s->data_fd, &s->header, sizeof(s->header)); in rpmb_dev_program_key() 152 if (ret != sizeof(s->header)) { in rpmb_dev_program_key() 162 s->res[0].write_counter = rpmb_u32(s->header.write_counter); in rpmb_dev_get_counter() 173 if (s->header.write_counter == MAX_WRITE_COUNTER) { in rpmb_dev_data_write() 181 if (s->header.write_counter != write_counter) { in rpmb_dev_data_write() [all …]
|
/system/connectivity/wifilogd/ |
D | message_buffer.cpp | 67 const auto& header = CopyFromBufferOrDie<LengthHeader>( in ConsumeNextMessage() local 69 read_pos_ += sizeof(header); in ConsumeNextMessage() 72 read_pos_ += header.payload_len; in ConsumeNextMessage() 75 return {payload_start, header.payload_len}; in ConsumeNextMessage() 83 LengthHeader header; in AppendHeader() local 84 header.payload_len = message_len; in AppendHeader() 85 AppendRawBytes(&header, sizeof(header)); in AppendHeader()
|
/system/core/fs_mgr/libvbmeta/ |
D | reader.cpp | 28 Result<void> LoadAndVerifySuperVBMetaHeader(const void* buffer, SuperVBMetaHeader* header) { in LoadAndVerifySuperVBMetaHeader() argument 29 memcpy(header, buffer, sizeof(*header)); in LoadAndVerifySuperVBMetaHeader() 32 if (header->magic != SUPER_VBMETA_MAGIC) { in LoadAndVerifySuperVBMetaHeader() 37 if (header->major_version != SUPER_VBMETA_MAJOR_VERSION || in LoadAndVerifySuperVBMetaHeader() 38 header->minor_version > SUPER_VBMETA_MINOR_VERSION) { in LoadAndVerifySuperVBMetaHeader() 66 Result<void> rv_header = LoadAndVerifySuperVBMetaHeader(header_buffer.get(), &table->header); in ReadVBMetaTable() 71 const uint64_t descriptors_offset = offset + table->header.header_size; in ReadVBMetaTable() 73 std::make_unique<uint8_t[]>(table->header.descriptors_size); in ReadVBMetaTable() 75 table->header.descriptors_size, descriptors_offset)) { in ReadVBMetaTable() 80 LoadVBMetaDescriptors(descriptors_buffer.get(), table->header.descriptors_size, in ReadVBMetaTable()
|
/system/chre/apps/sensor_world/ |
D | sensor_world.cc | 313 const auto header = ev->header; in nanoappHandleEvent() local 315 sampleTime = header.baseTimestamp; in nanoappHandleEvent() 318 for (size_t i = 0; i < header.readingCount; i++) { in nanoappHandleEvent() 324 x /= header.readingCount; in nanoappHandleEvent() 325 y /= header.readingCount; in nanoappHandleEvent() 326 z /= header.readingCount; in nanoappHandleEvent() 329 getSensorNameForEventType(eventType), header.readingCount, x, y, z, in nanoappHandleEvent() 330 header.baseTimestamp / kOneMillisecondInNanoseconds); in nanoappHandleEvent() 335 header.baseTimestamp, sampleTime, chreTime, in nanoappHandleEvent() 336 static_cast<int64_t>(header.baseTimestamp - chreTime) in nanoappHandleEvent() [all …]
|
/system/core/adb/pairing_connection/ |
D | pairing_connection.cpp | 102 bool WriteHeader(const PairingPacketHeader* header, std::string_view payload); 106 bool ReadHeader(PairingPacketHeader* header); 108 void CreateHeader(PairingPacketHeader* header, adb::proto::PairingPacket::Type type, 204 bool PairingConnectionCtx::WriteHeader(const PairingPacketHeader* header, in WriteHeader() argument 206 PairingPacketHeader network_header = *header; in WriteHeader() 218 bool PairingConnectionCtx::ReadHeader(PairingPacketHeader* header) { in ReadHeader() argument 226 header->version = *p; in ReadHeader() 228 if (header->version < kMinSupportedKeyHeaderVersion || in ReadHeader() 229 header->version > kMaxSupportedKeyHeaderVersion) { in ReadHeader() 231 << " them=" << header->version << ")"; in ReadHeader() [all …]
|
/system/core/libprocinfo/ |
D | process.cpp | 97 std::string header = std::string(line, header_len); in GetProcessInfoFromProcPidFd() local 98 if (header == "Name:") { in GetProcessInfoFromProcPidFd() 106 } else if (header == "Pid:") { in GetProcessInfoFromProcPidFd() 109 } else if (header == "Tgid:") { in GetProcessInfoFromProcPidFd() 112 } else if (header == "PPid:") { in GetProcessInfoFromProcPidFd() 115 } else if (header == "TracerPid:") { in GetProcessInfoFromProcPidFd() 118 } else if (header == "Uid:") { in GetProcessInfoFromProcPidFd() 121 } else if (header == "Gid:") { in GetProcessInfoFromProcPidFd() 124 } else if (header == "State:") { in GetProcessInfoFromProcPidFd()
|
/system/core/trusty/confirmationui/ |
D | TrustyApp.cpp | 60 PacketHeader header = { in TrustyRpc() local 64 uint32_t body_size = std::min(kPayloadSize, header.remaining); in TrustyRpc() 67 .iov_base = &header, in TrustyRpc() 83 rc = read(handle, &header, kHeaderSize); in TrustyRpc() 89 if (header.type != PacketType::ACK || header.remaining != oend - obegin) { in TrustyRpc() 98 PacketHeader header = { in TrustyRpc() local 105 .iov_base = &header, in TrustyRpc() 126 uint32_t body_size = std::min(kPayloadSize, header.remaining); in TrustyRpc() 132 remaining = header.remaining - body_size; in TrustyRpc()
|
/system/chre/apps/chqts/src/busy_startup/ |
D | busy_startup.cc | 106 const chreSensorDataHeader* header = in checkSensorEvent() local 108 if (header == nullptr) { in checkSensorEvent() 111 if (header->sensorHandle != gSensorHandle) { in checkSensorEvent() 113 &header->sensorHandle); in checkSensorEvent() 115 if (header->readingCount == 0) { in checkSensorEvent() 118 if (header->reserved != 0) { in checkSensorEvent() 123 if (header->accuracy != 0) { in checkSensorEvent() 126 } else if (header->accuracy > CHRE_SENSOR_ACCURACY_HIGH) { in checkSensorEvent() 128 header->accuracy); in checkSensorEvent()
|
/system/extras/libfec/ |
D | fec_verity.cpp | 485 memcpy(metadata.get(), &v->header, sizeof(v->header)); in rewrite_metadata() 490 check(sizeof(v->header) + len <= VERITY_METADATA_SIZE); in rewrite_metadata() 491 memcpy(metadata.get() + sizeof(v->header), v->table.data(), len); in rewrite_metadata() 496 static int validate_header(const fec_handle *f, const verity_header *header, in validate_header() argument 500 check(header); in validate_header() 502 if (header->magic != VERITY_MAGIC && in validate_header() 503 header->magic != VERITY_MAGIC_DISABLE) { in validate_header() 507 if (header->version != VERITY_VERSION) { in validate_header() 508 error("unsupported verity version %u", header->version); in validate_header() 512 if (header->length < VERITY_MIN_TABLE_SIZE || in validate_header() [all …]
|
/system/timezone/debug_tools/host/main/java/ |
D | TzFileDumper.java | 155 private List<Transition> read32BitTransitions(MappedByteBuffer mappedTzFile, Header header) in read32BitTransitions() argument 159 int[] transitionTimes = new int[header.tzh_timecnt]; in read32BitTransitions() 162 byte[] typeIndexes = new byte[header.tzh_timecnt]; in read32BitTransitions() 166 long[] transitionTimesLong = new long[header.tzh_timecnt]; in read32BitTransitions() 167 for (int i = 0; i < header.tzh_timecnt; ++i) { in read32BitTransitions() 171 return createTransitions(header, transitionTimesLong, typeIndexes); in read32BitTransitions() 174 private List<Transition> createTransitions(Header header, in createTransitions() argument 177 for (int i = 0; i < header.tzh_timecnt; ++i) { in createTransitions() 185 if (typeIndex >= header.tzh_typecnt) { in createTransitions() 187 + header.tzh_typecnt + ", is " + typeIndex); in createTransitions() [all …]
|