<ahref="internal_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aid="l00001"name="l00001"></a><spanclass="lineno"> 1</span><spanclass="comment">/*</span></div>
<divclass="line"><aid="l00002"name="l00002"></a><spanclass="lineno"> 2</span><spanclass="comment"> * This file is part of the Aaru Data Preservation Suite.</span></div>
<divclass="line"><aid="l00005"name="l00005"></a><spanclass="lineno"> 5</span><spanclass="comment"> * This library is free software; you can redistribute it and/or modify</span></div>
<divclass="line"><aid="l00006"name="l00006"></a><spanclass="lineno"> 6</span><spanclass="comment"> * it under the terms of the GNU Lesser General Public License as</span></div>
<divclass="line"><aid="l00007"name="l00007"></a><spanclass="lineno"> 7</span><spanclass="comment"> * published by the Free Software Foundation; either version 2.1 of the</span></div>
<divclass="line"><aid="l00008"name="l00008"></a><spanclass="lineno"> 8</span><spanclass="comment"> * License, or (at your option) any later version.</span></div>
<divclass="line"><aid="l00010"name="l00010"></a><spanclass="lineno"> 10</span><spanclass="comment"> * This library is distributed in the hope that it will be useful, but</span></div>
<divclass="line"><aid="l00011"name="l00011"></a><spanclass="lineno"> 11</span><spanclass="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<divclass="line"><aid="l00012"name="l00012"></a><spanclass="lineno"> 12</span><spanclass="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></div>
<divclass="line"><aid="l00013"name="l00013"></a><spanclass="lineno"> 13</span><spanclass="comment"> * Lesser General Public License for more details.</span></div>
<divclass="line"><aid="l00015"name="l00015"></a><spanclass="lineno"> 15</span><spanclass="comment"> * You should have received a copy of the GNU Lesser General Public</span></div>
<divclass="line"><aid="l00016"name="l00016"></a><spanclass="lineno"> 16</span><spanclass="comment"> * License along with this library; if not, see <http://www.gnu.org/licenses/>.</span></div>
<divclass="line"><aid="l00044"name="l00044"></a><spanclass="lineno"> 44</span><spanclass="comment">/* Seek using a 64-bit offset. Returns 0 on success, non-zero on failure, just</span></div>
<divclass="line"><aid="l00045"name="l00045"></a><spanclass="lineno"> 45</span><spanclass="comment"> * like fseek()/_fseeki64(). Use aaruf_ftell() to retrieve the current offset. */</span></div>
<divclass="line"><aid="l00051"name="l00051"></a><spanclass="lineno"> 51</span><spanclass="comment">/* Return the current file offset as a signed 64-bit value. */</span></div>
<divclass="ttc"id="ainternal_8h_html_a0e2cfc858c0551bc9bef11d5bdb85aac"><divclass="ttname"><ahref="internal_8h.html#a0e2cfc858c0551bc9bef11d5bdb85aac">process_dumphw_block</a></div><divclass="ttdeci">void process_dumphw_block(aaruformat_context *ctx, const IndexEntry *entry)</div><divclass="ttdoc">Processes a dump hardware block from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="blocks_2dump_8c_source.html#l00107">dump.c:107</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a1906cbcaef9f44b8ac4360beb70a0120"><divclass="ttname"><ahref="internal_8h.html#a1906cbcaef9f44b8ac4360beb70a0120">set_ddt_entry_v2</a></div><divclass="ttdeci">bool set_ddt_entry_v2(aaruformat_context *ctx, uint64_t sector_address, bool negative, uint64_t offset, uint64_t block_offset, uint8_t sector_status, uint64_t *ddt_entry)</div><divclass="ttdoc">Sets a DDT v2 entry for a given sector address.</div><divclass="ttdef"><b>Definition</b><ahref="ddt__v2_8c_source.html#l01232">ddt_v2.c:1232</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a1baad6508d1cde5a712794e956fb3d3c"><divclass="ttname"><ahref="internal_8h.html#a1baad6508d1cde5a712794e956fb3d3c">process_index_v2</a></div><divclass="ttdeci">UT_array * process_index_v2(aaruformat_context *ctx)</div><divclass="ttdoc">Processes an index block (version 2) from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="index__v2_8c_source.html#l00082">index_v2.c:82</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a1caeae710ee5e1dd356e43b3b659e9c0"><divclass="ttname"><ahref="internal_8h.html#a1caeae710ee5e1dd356e43b3b659e9c0">process_ddt_v2</a></div><divclass="ttdeci">int32_t process_ddt_v2(aaruformat_context *ctx, IndexEntry *entry, bool *found_user_data_ddt)</div><divclass="ttdoc">Processes a DDT v2 block from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="ddt__v2_8c_source.html#l00096">ddt_v2.c:96</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a2402812f5e04ba16765208c0b70fa6c5"><divclass="ttname"><ahref="internal_8h.html#a2402812f5e04ba16765208c0b70fa6c5">aaruf_close_current_block</a></div><divclass="ttdeci">int32_t aaruf_close_current_block(aaruformat_context *ctx)</div><divclass="ttdoc">Finalizes and writes the current data block to the AaruFormat image file.</div><divclass="ttdef"><b>Definition</b><ahref="write_8c_source.html#l01536">write.c:1536</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a26e5fd58cdfd39948f1b724fafffcdc2"><divclass="ttname"><ahref="internal_8h.html#a26e5fd58cdfd39948f1b724fafffcdc2">decode_ddt_entry_v1</a></div><divclass="ttdeci">int32_t decode_ddt_entry_v1(aaruformat_context *ctx, uint64_t sector_address, uint64_t *offset, uint64_t *block_offset, uint8_t *sector_status)</div><divclass="ttdoc">Decodes a DDT v1 entry for a given sector address.</div><divclass="ttdef"><b>Definition</b><ahref="ddt__v1_8c_source.html#l00496">ddt_v1.c:496</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a28d844a06cecbbf436d825a3c99ff0eb"><divclass="ttname"><ahref="internal_8h.html#a28d844a06cecbbf436d825a3c99ff0eb">process_data_block</a></div><divclass="ttdeci">int32_t process_data_block(aaruformat_context *ctx, IndexEntry *entry)</div><divclass="ttdoc">Processes a data block from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="data_8c_source.html#l00072">data.c:72</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a36c1cca0e4cea9c2e0dffb582b836f6f"><divclass="ttname"><ahref="internal_8h.html#a36c1cca0e4cea9c2e0dffb582b836f6f">get_filetime_uint64</a></div><divclass="ttdeci">uint64_t get_filetime_uint64()</div><divclass="ttdoc">Gets the current time as a 64-bit FILETIME value.</div><divclass="ttdef"><b>Definition</b><ahref="time_8c_source.html#l00045">time.c:45</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a375a516fdf6f81e997365d93b21f6708"><divclass="ttname"><ahref="internal_8h.html#a375a516fdf6f81e997365d93b21f6708">process_tracks_block</a></div><divclass="ttdeci">void process_tracks_block(aaruformat_context *ctx, const IndexEntry *entry)</div><divclass="ttdoc">Parse and integrate a Tracks block from the image stream into the context.</div><divclass="ttdef"><b>Definition</b><ahref="optical_8c_source.html#l00112">optical.c:112</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a40c571bc4778040f22ac211cea670db1"><divclass="ttname"><ahref="internal_8h.html#a40c571bc4778040f22ac211cea670db1">decode_ddt_single_level_v2</a></div><divclass="ttdeci">int32_t decode_ddt_single_level_v2(aaruformat_context *ctx, uint64_t sector_address, bool negative, uint64_t *offset, uint64_t *block_offset, uint8_t *sector_status)</div><divclass="ttdoc">Decodes a single-level DDT v2 entry for a given sector address.</div><divclass="ttdef"><b>Definition</b><ahref="ddt__v2_8c_source.html#l00736">ddt_v2.c:736</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a43974d4c183240be30d49ff09ef7b8c2"><divclass="ttname"><ahref="internal_8h.html#a43974d4c183240be30d49ff09ef7b8c2">process_metadata_block</a></div><divclass="ttdeci">void process_metadata_block(aaruformat_context *ctx, const IndexEntry *entry)</div><divclass="ttdoc">Processes a metadata block from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="blocks_2metadata_8c_source.html#l00036">metadata.c:36</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a565eace88f86c500249be1f2a89a1c60"><divclass="ttname"><ahref="internal_8h.html#a565eace88f86c500249be1f2a89a1c60">process_checksum_block</a></div><divclass="ttdeci">void process_checksum_block(aaruformat_context *ctx, const IndexEntry *entry)</div><divclass="ttdoc">Processes a checksum block from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="checksum_8c_source.html#l00040">checksum.c:40</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a5d3b1092abc36a27a441a01a8a0b3b48"><divclass="ttname"><ahref="internal_8h.html#a5d3b1092abc36a27a441a01a8a0b3b48">process_index_v1</a></div><divclass="ttdeci">UT_array * process_index_v1(aaruformat_context *ctx)</div><divclass="ttdoc">Processes an index block (version 1) from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="index__v1_8c_source.html#l00080">index_v1.c:80</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a5e0397faed8aea27c5a6a3881875de54"><divclass="ttname"><ahref="internal_8h.html#a5e0397faed8aea27c5a6a3881875de54">process_cicm_block</a></div><divclass="ttdeci">void process_cicm_block(aaruformat_context *ctx, const IndexEntry *entry)</div><divclass="ttdoc">Processes a CICM XML metadata block from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="blocks_2metadata_8c_source.html#l00312">metadata.c:312</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a60c57e3b2e8e233d0be91f3690bf077c"><divclass="ttname"><ahref="internal_8h.html#a60c57e3b2e8e233d0be91f3690bf077c">aaruf_fseek</a></div><divclass="ttdeci">static int aaruf_fseek(FILE *stream, aaru_off_t offset, int origin)</div><divclass="ttdef"><b>Definition</b><ahref="#l00046">internal.h:46</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a69ff2e68fe4d92a2d2d469ac69f41d82"><divclass="ttname"><ahref="internal_8h.html#a69ff2e68fe4d92a2d2d469ac69f41d82">set_ddt_multi_level_v2</a></div><divclass="ttdeci">bool set_ddt_multi_level_v2(aaruformat_context *ctx, uint64_t sector_address, bool negative, uint64_t offset, uint64_t block_offset, uint8_t sector_status, uint64_t *ddt_entry)</div><divclass="ttdoc">Sets a multi-level DDT v2 entry for a given sector address.</div><divclass="ttdef"><b>Definition</b><ahref="ddt__v2_8c_source.html#l01340">ddt_v2.c:1340</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a7471ae33a70bae7e3aa93a52f8e519ca"><divclass="ttname"><ahref="internal_8h.html#a7471ae33a70bae7e3aa93a52f8e519ca">set_ddt_single_level_v2</a></div><divclass="ttdeci">bool set_ddt_single_level_v2(aaruformat_context *ctx, uint64_t sector_address, bool negative, uint64_t offset, uint64_t block_offset, uint8_t sector_status, uint64_t *ddt_entry)</div><divclass="ttdoc">Sets a single-level DDT v2 entry for a given sector address.</div><divclass="ttdef"><b>Definition</b><ahref="ddt__v2_8c_source.html#l01268">ddt_v2.c:1268</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a750c966846027990bb0914760758c84c"><divclass="ttname"><ahref="internal_8h.html#a750c966846027990bb0914760758c84c">aaruf_finalize_write</a></div><divclass="ttdeci">int32_t aaruf_finalize_write(aaruformat_context *ctx)</div><divclass="ttdoc">Finalize a write-mode image: flush all pending blocks, DDTs, and the index.</div><divclass="ttdef"><b>Definition</b><ahref="close__write_8c_source.html#l05257">close_write.c:5257</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a7db9f44b931877b306de9cf7cd1deed2"><divclass="ttname"><ahref="internal_8h.html#a7db9f44b931877b306de9cf7cd1deed2">generate_random_bytes</a></div><divclass="ttdeci">void generate_random_bytes(uint8_t *buffer, size_t length)</div><divclass="ttdoc">Generates cryptographically strong random bytes.</div><divclass="ttdef"><b>Definition</b><ahref="helpers_8c_source.html#l00532">helpers.c:532</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a805d607b45bb8ad8a3e6b0bcfabe3265"><divclass="ttname"><ahref="internal_8h.html#a805d607b45bb8ad8a3e6b0bcfabe3265">decode_ddt_entry_v2</a></div><divclass="ttdeci">int32_t decode_ddt_entry_v2(aaruformat_context *ctx, uint64_t sector_address, bool negative, uint64_t *offset, uint64_t *block_offset, uint8_t *sector_status)</div><divclass="ttdoc">Decodes a DDT v2 entry for a given sector address.</div><divclass="ttdef"><b>Definition</b><ahref="ddt__v2_8c_source.html#l00662">ddt_v2.c:662</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a81d410de6727d95a85b827067e1a8bc6"><divclass="ttname"><ahref="internal_8h.html#a81d410de6727d95a85b827067e1a8bc6">process_geometry_block</a></div><divclass="ttdeci">void process_geometry_block(aaruformat_context *ctx, const IndexEntry *entry)</div><divclass="ttdoc">Processes a logical geometry block from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="blocks_2metadata_8c_source.html#l00252">metadata.c:252</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a8241636367dc185ee88d1dc5af9caf59"><divclass="ttname"><ahref="internal_8h.html#a8241636367dc185ee88d1dc5af9caf59">set_ddt_tape</a></div><divclass="ttdeci">bool set_ddt_tape(aaruformat_context *ctx, uint64_t sector_address, uint64_t offset, uint64_t block_offset, uint8_t sector_status, uint64_t *ddt_entry)</div><divclass="ttdoc">Sets a DDT entry for tape media using a hash-based lookup table.</div><divclass="ttdef"><b>Definition</b><ahref="ddt__v2_8c_source.html#l02066">ddt_v2.c:2066</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a829bbac3c17b60efd8f93188a8de8278"><divclass="ttname"><ahref="internal_8h.html#a829bbac3c17b60efd8f93188a8de8278">process_tape_files_block</a></div><divclass="ttdeci">void process_tape_files_block(aaruformat_context *ctx, const IndexEntry *entry)</div><divclass="ttdoc">Processes a tape file metadata block from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="tape_8c_source.html#l00127">tape.c:127</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a83aff4d408ab17f8f350cb03b0e12ef6"><divclass="ttname"><ahref="internal_8h.html#a83aff4d408ab17f8f350cb03b0e12ef6">decode_ddt_multi_level_v2</a></div><divclass="ttdeci">int32_t decode_ddt_multi_level_v2(aaruformat_context *ctx, uint64_t sector_address, bool negative, uint64_t *offset, uint64_t *block_offset, uint8_t *sector_status)</div><divclass="ttdoc">Decodes a multi-level DDT v2 entry for a given sector address.</div><divclass="ttdef"><b>Definition</b><ahref="ddt__v2_8c_source.html#l00879">ddt_v2.c:879</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a84003ec881425a7b28ec24cb48d19f02"><divclass="ttname"><ahref="internal_8h.html#a84003ec881425a7b28ec24cb48d19f02">process_aaru_metadata_json_block</a></div><divclass="ttdeci">void process_aaru_metadata_json_block(aaruformat_context *ctx, const IndexEntry *entry)</div><divclass="ttdoc">Processes an Aaru metadata JSON block from the image stream during image opening.</div><divclass="ttdef"><b>Definition</b><ahref="blocks_2metadata_8c_source.html#l00476">metadata.c:476</a></div></div>
<divclass="ttc"id="ainternal_8h_html_a89ed93d216c4dce0ae5e2acccf8cc2b4"><divclass="ttname"><ahref="internal_8h.html#a89ed93d216c4dce0ae5e2acccf8cc2b4">verify_index_v1</a></div><divclass="ttdeci">int32_t verify_index_v1(aaruformat_context *ctx)</div><divclass="ttdoc">Verifies the integrity of an index block (version 1) in the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="index__v1_8c_source.html#l00226">index_v1.c:226</a></div></div>
<divclass="ttc"id="ainternal_8h_html_aa76718b0402b1a28be3d563d5e62028e"><divclass="ttname"><ahref="internal_8h.html#aa76718b0402b1a28be3d563d5e62028e">process_tape_partitions_block</a></div><divclass="ttdeci">void process_tape_partitions_block(aaruformat_context *ctx, const IndexEntry *entry)</div><divclass="ttdoc">Processes a tape partition metadata block from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="tape_8c_source.html#l00348">tape.c:348</a></div></div>
<divclass="ttc"id="ainternal_8h_html_aac6f1ed284f46388319d99bff2a1f409"><divclass="ttname"><ahref="internal_8h.html#aac6f1ed284f46388319d99bff2a1f409">process_flux_data_block</a></div><divclass="ttdeci">void process_flux_data_block(aaruformat_context *ctx, const IndexEntry *entry)</div><divclass="ttdoc">Parse and integrate a Flux Data block from the image stream into the context.</div><divclass="ttdef"><b>Definition</b><ahref="flux_8c_source.html#l00308">flux.c:308</a></div></div>
<divclass="ttc"id="ainternal_8h_html_abaf38090f967423898b99e0455751c07"><divclass="ttname"><ahref="internal_8h.html#abaf38090f967423898b99e0455751c07">process_ddt_v1</a></div><divclass="ttdeci">int32_t process_ddt_v1(aaruformat_context *ctx, IndexEntry *entry, bool *found_user_data_ddt)</div><divclass="ttdoc">Processes a DDT v1 block from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="ddt__v1_8c_source.html#l00086">ddt_v1.c:86</a></div></div>
<divclass="ttc"id="ainternal_8h_html_ac93ebc6d918745be56b680e19bf7e8d5"><divclass="ttname"><ahref="internal_8h.html#ac93ebc6d918745be56b680e19bf7e8d5">compare_extents</a></div><divclass="ttdeci">int compare_extents(const void *a, const void *b)</div><divclass="ttdoc">Comparison function for sorting DumpExtent arrays by start sector.</div><divclass="ttdef"><b>Definition</b><ahref="helpers_8c_source.html#l00511">helpers.c:511</a></div></div>
<divclass="ttc"id="ainternal_8h_html_ad7ed9250463c320c7bc8d83689bcfefb"><divclass="ttname"><ahref="internal_8h.html#ad7ed9250463c320c7bc8d83689bcfefb">verify_index_v3</a></div><divclass="ttdeci">int32_t verify_index_v3(aaruformat_context *ctx)</div><divclass="ttdoc">Verifies the integrity of an index block (version 3) in the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="index__v3_8c_source.html#l00408">index_v3.c:408</a></div></div>
<divclass="ttc"id="ainternal_8h_html_addf13857b7c9f36eb32cfd3c7efab10b"><divclass="ttname"><ahref="internal_8h.html#addf13857b7c9f36eb32cfd3c7efab10b">parse_options</a></div><divclass="ttdeci">aaru_options parse_options(const char *options, bool *table_shift_found)</div><divclass="ttdoc">Parses the options string for AaruFormat image creation/opening.</div><divclass="ttdef"><b>Definition</b><ahref="options_8c_source.html#l00047">options.c:47</a></div></div>
<divclass="ttc"id="ainternal_8h_html_ae234e22b16b085d18614110630034db5"><divclass="ttname"><ahref="internal_8h.html#ae234e22b16b085d18614110630034db5">verify_index_v2</a></div><divclass="ttdeci">int32_t verify_index_v2(aaruformat_context *ctx)</div><divclass="ttdoc">Verifies the integrity of an index block (version 2) in the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="index__v2_8c_source.html#l00228">index_v2.c:228</a></div></div>
<divclass="ttc"id="ainternal_8h_html_ae840a46bdea143ad49be3ba037376320"><divclass="ttname"><ahref="internal_8h.html#ae840a46bdea143ad49be3ba037376320">flux_map_rebuild_from_entries</a></div><divclass="ttdeci">int32_t flux_map_rebuild_from_entries(aaruformat_context *ctx)</div><divclass="ttdoc">Rebuild the flux capture lookup map from the flux_entries array.</div><divclass="ttdef"><b>Definition</b><ahref="flux_8c_source.html#l00172">flux.c:172</a></div></div>
<divclass="ttc"id="ainternal_8h_html_aff88fae9938d5f56318bfd7a455d5e94"><divclass="ttname"><ahref="internal_8h.html#aff88fae9938d5f56318bfd7a455d5e94">process_index_v3</a></div><divclass="ttdeci">UT_array * process_index_v3(aaruformat_context *ctx)</div><divclass="ttdoc">Processes an index block (version 3) from the image stream.</div><divclass="ttdef"><b>Definition</b><ahref="index__v3_8c_source.html#l00098">index_v3.c:98</a></div></div>
<divclass="ttc"id="astructIndexEntry_html"><divclass="ttname"><ahref="structIndexEntry.html">IndexEntry</a></div><divclass="ttdoc">Single index entry describing a block's type, (optional) data classification, and file offset.</div><divclass="ttdef"><b>Definition</b><ahref="index_8h_source.html#l00108">index.h:109</a></div></div>
<divclass="ttc"id="astructaaruformat__context_html"><divclass="ttname"><ahref="structaaruformat__context.html">aaruformat_context</a></div><divclass="ttdoc">Master context representing an open or in‑creation Aaru image.</div><divclass="ttdef"><b>Definition</b><ahref="context_8h_source.html#l00174">context.h:175</a></div></div>
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.16.1 </li>