Home
last modified time | relevance | path

Searched refs:header (Results 1 – 25 of 273) sorted by relevance

1234567891011

/system/core/libsparse/
Dsimg_dump.py76 header = struct.unpack("<I4H4I", header_bin)
78 magic = header[0]
79 major_version = header[1]
80 minor_version = header[2]
81 file_hdr_sz = header[3]
82 chunk_hdr_sz = header[4]
83 blk_sz = header[5]
84 total_blks = header[6]
85 total_chunks = header[7]
86 image_checksum = header[8]
[all …]
/system/chre/platform/shared/
Dmemory_manager.cc25 HeapBlockHeader *header = nullptr; in nanoappAlloc() local
37 header = static_cast<HeapBlockHeader *>( in nanoappAlloc()
40 if (header != nullptr) { in nanoappAlloc()
47 app->linkHeapBlock(header); in nanoappAlloc()
48 header->data.bytes = bytes; in nanoappAlloc()
49 header->data.instanceId = app->getInstanceId(); in nanoappAlloc()
50 header++; in nanoappAlloc()
54 return header; in nanoappAlloc()
59 HeapBlockHeader *header = static_cast<HeapBlockHeader *>(ptr); in nanoappFree() local
60 header--; in nanoappFree()
[all …]
/system/core/libappfuse/tests/
DFuseBufferTest.cc46 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 …]
DFuseBridgeLoopTest.cc68 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 …]
/system/core/libappfuse/
DFuseBuffer.cc41 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 …]
DFuseAppLoop.cc35 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/libufdt/utils/src/
Ddt_table.c25 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()
Dmkdtimg_dump.c110 static void output_table_header(FILE *out_fp, const struct dt_table_header *header) { in output_table_header() argument
112 output_prop_hex(out_fp, "magic", header->magic); in output_table_header()
113 output_prop_int(out_fp, "total_size", header->total_size); in output_table_header()
114 output_prop_int(out_fp, "header_size", header->header_size); in output_table_header()
115 output_prop_int(out_fp, "dt_entry_size", header->dt_entry_size); in output_table_header()
116 output_prop_int(out_fp, "dt_entry_count", header->dt_entry_count); in output_table_header()
117 output_prop_int(out_fp, "dt_entries_offset", header->dt_entries_offset); in output_table_header()
118 output_prop_int(out_fp, "page_size", header->page_size); in output_table_header()
119 output_prop_int(out_fp, "version", header->version); in output_table_header()
163 struct dt_table_header header; in dump_image_from_fp() local
[all …]
/system/core/fs_mgr/liblp/
Dreader.cpp155 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/core/fs_mgr/libsnapshot/snapuserd/
Ddm_user_block_server.cpp34 struct dm_user_header* header = buffer_.GetHeaderPtr(); in ProcessRequests() local
35 if (!android::base::ReadFully(ctrl_fd_, header, sizeof(*header))) { in ProcessRequests()
44 SNAP_LOG(DEBUG) << "Daemon: msg->seq: " << std::dec << header->seq; in ProcessRequests()
45 SNAP_LOG(DEBUG) << "Daemon: msg->len: " << std::dec << header->len; in ProcessRequests()
46 SNAP_LOG(DEBUG) << "Daemon: msg->sector: " << std::dec << header->sector; in ProcessRequests()
47 SNAP_LOG(DEBUG) << "Daemon: msg->type: " << std::dec << header->type; in ProcessRequests()
48 SNAP_LOG(DEBUG) << "Daemon: msg->flags: " << std::dec << header->flags; in ProcessRequests()
50 if (!ProcessRequest(header)) { in ProcessRequests()
51 if (header->type != DM_USER_RESP_ERROR) { in ProcessRequests()
59 bool DmUserBlockServer::ProcessRequest(dm_user_header* header) { in ProcessRequest() argument
[all …]
/system/connectivity/wificond/net/
Dnl80211_attribute.cpp45 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/chre/apps/sensor_world/
Dsensor_world.cc338 const auto header = ev->header; in handleThreeAxisEvent() local
340 const auto accuracy = header.accuracy; in handleThreeAxisEvent()
341 uint64_t sampleTime = header.baseTimestamp; in handleThreeAxisEvent()
345 for (size_t i = 0; i < header.readingCount; i++) { in handleThreeAxisEvent()
351 x /= header.readingCount; in handleThreeAxisEvent()
352 y /= header.readingCount; in handleThreeAxisEvent()
353 z /= header.readingCount; in handleThreeAxisEvent()
356 getSensorName(header.sensorHandle), header.readingCount, in handleThreeAxisEvent()
358 accuracy, header.baseTimestamp / kOneMillisecondInNanoseconds); in handleThreeAxisEvent()
363 header.baseTimestamp, sampleTime, chreTime, in handleThreeAxisEvent()
[all …]
/system/chre/apps/nearby/location/lbs/contexthub/nanoapps/nearby/
Dpresence_service_data.cc40 PresenceFieldHeader header(data[p], data[p + 1]); in Parse() local
41 switch (header.type) { in Parse()
47 if (header.length == kFpModelIdLength) { in Parse()
52 LOGE("Fast Pair model ID length %d not equal to %d", header.length, in Parse()
57 if (header.length == kFpAccountKeyDataLength) { in Parse()
65 header.length, kFpAccountKeyDataLength); in Parse()
69 if (header.length == kFpBatteryStatusLength) { in Parse()
74 LOGE("Battery status length %d not equal to %d", header.length, in Parse()
84 p = header.type == PresenceFieldHeader::kExtensionType ? p + 2 : p + 1; in Parse()
86 p += header.length; in Parse()
/system/netd/server/
DWakeupController.cpp56 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/chre/chpp/platform/linux/
Dmemory.c42 struct ChppAllocHeader *header = (struct ChppAllocHeader *)ptr; in chppMalloc() local
43 header->bytes = size; in chppMalloc()
44 header++; in chppMalloc()
45 ptr = header; in chppMalloc()
61 struct ChppAllocHeader *header = (struct ChppAllocHeader *)ptr; in chppFree() local
62 header--; in chppFree()
63 size_t size = header->bytes; in chppFree()
71 free(header); in chppFree()
/system/core/trusty/utils/rpmb_dev/
Drpmb_dev.c73 struct rpmb_data_header header; member
119 int pos = addr * RPMB_PACKET_DATA_SIZE + sizeof(s->header); in rpmb_file_seek()
131 if (s->header.key_programmed) { in rpmb_dev_program_key()
135 s->header.key = s->cmd[0].key_mac; in rpmb_dev_program_key()
136 s->header.key_programmed = 1; in rpmb_dev_program_key()
144 ret = write(s->data_fd, &s->header, sizeof(s->header)); in rpmb_dev_program_key()
145 if (ret != sizeof(s->header)) { in rpmb_dev_program_key()
155 s->res[0].write_counter = rpmb_u32(s->header.write_counter); in rpmb_dev_get_counter()
166 if (s->header.write_counter == MAX_WRITE_COUNTER) { in rpmb_dev_data_write()
174 if (s->header.write_counter != write_counter) { in rpmb_dev_data_write()
[all …]
/system/core/fs_mgr/libsnapshot/snapuserd/user-space-merge/
Dsnapuserd_core.cpp109 const auto& header = reader_->GetHeader(); in CommitMerge() local
116 if (!android::base::WriteFully(cow_fd_, &header, header.prefix.header_size)) { in CommitMerge()
173 const auto& header = reader_->GetHeader(); in ReadMetadata() local
174 if (!(header.block_size == BLOCK_SZ)) { in ReadMetadata()
175 SNAP_LOG(ERROR) << "Invalid header block size found: " << header.block_size; in ReadMetadata()
179 SNAP_LOG(INFO) << "Merge-ops: " << header.num_merge_ops; in ReadMetadata()
180 if (header.num_merge_ops) { in ReadMetadata()
243 SNAP_LOG(INFO) << "Merged-ops: " << header.num_merge_ops in ReadMetadata()
253 const auto& header = reader_->GetHeader(); in MmapMetadata() local
255 total_mapped_addr_length_ = header.prefix.header_size + BUFFER_REGION_DEFAULT_SIZE; in MmapMetadata()
[all …]
/system/chre/chpp/test/
Dpacket_util.cpp30 .header = { in generateEmptyPacket()
49 .header = { in generateResetPacket()
78 pkt.header.packetCode = in generateResetAckPacket()
227 dumpHeader(os, pkt.header); in dumpEmptyPacket()
233 dumpHeader(os, pkt.header); in dumpResetPacket()
240 dumpHeader(os, pkt.header); in dumpPacket()
242 dumpRaw(os, pkt.payload, pkt.header.length); in dumpPacket()
246 &pkt.payload[pkt.header.length]); in dumpPacket()
247 uint32_t crc = chppCrc32(0, reinterpret_cast<const uint8_t *>(&pkt.header), in dumpPacket()
248 sizeof(pkt.header) + pkt.header.length); in dumpPacket()
[all …]
/system/core/fs_mgr/libvbmeta/
Dreader.cpp28 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/logging/liblog/
Dlogd_writer.cpp123 android_log_header_t header; in LogdWrite() local
144 header.tid = gettid(); in LogdWrite()
145 header.realtime.tv_sec = ts->tv_sec; in LogdWrite()
146 header.realtime.tv_nsec = ts->tv_nsec; in LogdWrite()
148 newVec[0].iov_base = (unsigned char*)&header; in LogdWrite()
149 newVec[0].iov_len = sizeof(header); in LogdWrite()
156 header.id = LOG_ID_EVENTS; in LogdWrite()
157 buffer.header.tag = LIBLOG_LOG_TAG; in LogdWrite()
165 if (ret != (ssize_t)(sizeof(header) + sizeof(buffer))) { in LogdWrite()
170 header.id = logId; in LogdWrite()
[all …]
/system/update_engine/payload_generator/
Dsquashfs_filesystem.cc55 SquashfsFilesystem::SquashfsHeader* header) { in ReadSquashfsHeader() argument
60 memcpy(&header->magic, blob.data(), 4); in ReadSquashfsHeader()
61 memcpy(&header->block_size, blob.data() + 12, 4); in ReadSquashfsHeader()
62 memcpy(&header->compression_type, blob.data() + 20, 2); in ReadSquashfsHeader()
63 memcpy(&header->major_version, blob.data() + 28, 2); in ReadSquashfsHeader()
67 bool CheckHeader(const SquashfsFilesystem::SquashfsHeader& header) { in CheckHeader() argument
68 return header.magic == 0x73717368 && header.major_version == 4; in CheckHeader()
97 const SquashfsHeader& header, in Init() argument
101 bool is_zlib = header.compression_type == kSquashfsZlibCompression; in Init()
130 TEST_AND_RETURN_FALSE(new_blk_size <= header.block_size); in Init()
[all …]
/system/incremental_delivery/incfs/incfsdump/
Ddump.cpp246 auto header = read<incfs_file_header>(); in run() local
247 out() << "header: " << hex(header.fh_magic) << ", " << header.fh_version << ", " in run()
248 << hex(header.fh_data_block_size) << ", " << header.fh_header_size << ", " in run()
249 << header.fh_file_size; in run()
250 if (header.fh_magic != INCFS_MAGIC_NUMBER) { in run()
253 if (header.fh_version != INCFS_FORMAT_CURRENT_VER) { in run()
256 if (header.fh_data_block_size != INCFS_DATA_FILE_BLOCK_SIZE) { in run()
259 if (header.fh_header_size != sizeof(header)) { in run()
260 err() << "bad header size, expected: " << sizeof(header); in run()
263 auto ostream = out() << "flags: " << hex(header.fh_flags); in run()
[all …]
/system/extras/libfec/
Dfec_verity.cpp485 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/chre/chpp/include/chpp/common/
Dwifi.h48 struct ChppAppHeader header; member
64 struct ChppAppHeader header; member
81 struct ChppAppHeader header; member
98 struct ChppAppHeader header; member
108 struct ChppAppHeader header; member
118 struct ChppAppHeader header; member
129 struct ChppAppHeader header; member
/system/chre/platform/tinysys/
Dauthentication.cc147 bool loadSignature(const ImageHeader *header) { in loadSignature() argument
150 int result = mbedtls_mpi_read_binary(&mR, header->signature, kRSigSize); in loadSignature()
156 mbedtls_mpi_read_binary(&mS, header->signature + kRSigSize, kSSigSize); in loadSignature()
245 auto *header = static_cast<const ImageHeader *>(binary); in authenticateBinary() local
246 const uint8_t *imageHash = header->headerInfo.binarySha256; in authenticateBinary()
247 const uint8_t *publicKey = header->publicKey; in authenticateBinary()
249 header->headerInfo.binaryLength + kHeaderSize; in authenticateBinary()
251 if (header->headerInfo.magic != kChreMagicNumber) { in authenticateBinary()
253 } else if (header->headerInfo.headerVersion != 1) { in authenticateBinary()
255 header->headerInfo.headerVersion); in authenticateBinary()
[all …]

1234567891011