Files
libaaruformat/docs/html/ddt__v2_8c.html

962 lines
69 KiB
HTML
Raw Normal View History

2025-10-11 01:35:43 +01:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.14.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libaaruformat: src/ddt/ddt_v2.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">libaaruformat<span id="projectnumber">&#160;1.0</span>
</div>
<div id="projectbrief">Aaru Data Preservation Suite - Format Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.14.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(function(){initNavTree('ddt__v2_8c.html','',''); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">ddt_v2.c File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;inttypes.h&gt;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &quot;<a class="el" href="aaruformat_8h_source.html">aaruformat.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="internal_8h_source.html">internal.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="log_8h_source.html">log.h</a>&quot;</code><br />
</div>
<p><a href="ddt__v2_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-func-members" class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a1caeae710ee5e1dd356e43b3b659e9c0" id="r_a1caeae710ee5e1dd356e43b3b659e9c0"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1caeae710ee5e1dd356e43b3b659e9c0">process_ddt_v2</a> (<a class="el" href="structaaruformat__context.html">aaruformat_context</a> *ctx, <a class="el" href="structIndexEntry.html">IndexEntry</a> *entry, bool *found_user_data_ddt)</td></tr>
<tr class="memdesc:a1caeae710ee5e1dd356e43b3b659e9c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Processes a DDT v2 block from the image stream. <br /></td></tr>
<tr class="memitem:ab8d599dac0c84517fa72c757d5d753c0" id="r_ab8d599dac0c84517fa72c757d5d753c0"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab8d599dac0c84517fa72c757d5d753c0">decode_ddt_entry_v2</a> (<a class="el" href="structaaruformat__context.html">aaruformat_context</a> *ctx, const uint64_t sector_address, bool negative, uint64_t *offset, uint64_t *block_offset, uint8_t *sector_status)</td></tr>
<tr class="memdesc:ab8d599dac0c84517fa72c757d5d753c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decodes a DDT v2 entry for a given sector address. <br /></td></tr>
<tr class="memitem:a40c571bc4778040f22ac211cea670db1" id="r_a40c571bc4778040f22ac211cea670db1"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a40c571bc4778040f22ac211cea670db1">decode_ddt_single_level_v2</a> (<a class="el" href="structaaruformat__context.html">aaruformat_context</a> *ctx, uint64_t sector_address, bool negative, uint64_t *offset, uint64_t *block_offset, uint8_t *sector_status)</td></tr>
<tr class="memdesc:a40c571bc4778040f22ac211cea670db1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decodes a single-level DDT v2 entry for a given sector address. <br /></td></tr>
<tr class="memitem:a83aff4d408ab17f8f350cb03b0e12ef6" id="r_a83aff4d408ab17f8f350cb03b0e12ef6"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a83aff4d408ab17f8f350cb03b0e12ef6">decode_ddt_multi_level_v2</a> (<a class="el" href="structaaruformat__context.html">aaruformat_context</a> *ctx, uint64_t sector_address, bool negative, uint64_t *offset, uint64_t *block_offset, uint8_t *sector_status)</td></tr>
<tr class="memdesc:a83aff4d408ab17f8f350cb03b0e12ef6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decodes a multi-level DDT v2 entry for a given sector address. <br /></td></tr>
2025-12-12 12:25:02 +00:00
<tr class="memitem:a6d6ee0e6c255449cb9c2528f0f8398ec" id="r_a6d6ee0e6c255449cb9c2528f0f8398ec"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6d6ee0e6c255449cb9c2528f0f8398ec">set_ddt_entry_v2</a> (<a class="el" href="structaaruformat__context.html">aaruformat_context</a> *ctx, const uint64_t sector_address, const bool negative, const uint64_t offset, const uint64_t block_offset, const uint8_t sector_status, uint64_t *ddt_entry)</td></tr>
<tr class="memdesc:a6d6ee0e6c255449cb9c2528f0f8398ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a DDT v2 entry for a given sector address. <br /></td></tr>
2025-10-11 01:35:43 +01:00
<tr class="memitem:a9583b5975c5c0b81902681c07d6f737f" id="r_a9583b5975c5c0b81902681c07d6f737f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9583b5975c5c0b81902681c07d6f737f">set_ddt_single_level_v2</a> (<a class="el" href="structaaruformat__context.html">aaruformat_context</a> *ctx, uint64_t sector_address, const bool negative, const uint64_t offset, const uint64_t block_offset, const uint8_t sector_status, uint64_t *ddt_entry)</td></tr>
<tr class="memdesc:a9583b5975c5c0b81902681c07d6f737f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a single-level DDT v2 entry for a given sector address. <br /></td></tr>
<tr class="memitem:a69ff2e68fe4d92a2d2d469ac69f41d82" id="r_a69ff2e68fe4d92a2d2d469ac69f41d82"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a69ff2e68fe4d92a2d2d469ac69f41d82">set_ddt_multi_level_v2</a> (<a class="el" href="structaaruformat__context.html">aaruformat_context</a> *ctx, uint64_t sector_address, bool negative, uint64_t offset, uint64_t block_offset, uint8_t sector_status, uint64_t *ddt_entry)</td></tr>
<tr class="memdesc:a69ff2e68fe4d92a2d2d469ac69f41d82"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a multi-level DDT v2 entry for a given sector address. <br /></td></tr>
<tr class="memitem:a40a8f87e97248615429d232ca9fb599b" id="r_a40a8f87e97248615429d232ca9fb599b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a40a8f87e97248615429d232ca9fb599b">set_ddt_tape</a> (<a class="el" href="structaaruformat__context.html">aaruformat_context</a> *ctx, uint64_t sector_address, const uint64_t offset, const uint64_t block_offset, const uint8_t sector_status, uint64_t *ddt_entry)</td></tr>
<tr class="memdesc:a40a8f87e97248615429d232ca9fb599b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a DDT entry for tape media using a hash-based lookup table. <br /></td></tr>
</table>
<a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Function Documentation</h2>
<a id="ab8d599dac0c84517fa72c757d5d753c0" name="ab8d599dac0c84517fa72c757d5d753c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8d599dac0c84517fa72c757d5d753c0">&#9670;&#160;</a></span>decode_ddt_entry_v2()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t decode_ddt_entry_v2 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structaaruformat__context.html">aaruformat_context</a> *</td> <td class="paramname"><span class="paramname"><em>ctx</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint64_t</td> <td class="paramname"><span class="paramname"><em>sector_address</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>negative</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t *</td> <td class="paramname"><span class="paramname"><em>offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t *</td> <td class="paramname"><span class="paramname"><em>block_offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *</td> <td class="paramname"><span class="paramname"><em>sector_status</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Decodes a DDT v2 entry for a given sector address. </p>
<p>Determines the offset and block offset for a sector using the DDT v2 table(s). This function acts as a dispatcher that automatically selects between single-level and multi-level DDT decoding based on the tableShift parameter in the DDT header. It provides a unified interface for DDT v2 entry decoding regardless of the underlying table structure complexity.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ctx</td><td>Pointer to the aaruformat context containing the loaded DDT structures. </td></tr>
<tr><td class="paramname">sector_address</td><td>Logical sector address to decode (will be adjusted for negative sectors). </td></tr>
<tr><td class="paramname">negative</td><td>Indicates if the sector address is negative. </td></tr>
<tr><td class="paramname">offset</td><td>Pointer to store the resulting sector offset within the block. </td></tr>
<tr><td class="paramname">block_offset</td><td>Pointer to store the resulting block offset in the image. </td></tr>
<tr><td class="paramname">sector_status</td><td>Pointer to store the sector status (dumped, not dumped, etc.).</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns one of the following status codes: </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">AARUF_STATUS_OK</td><td>(0) Successfully decoded the DDT entry. This is always returned when:<ul>
<li>The context and image stream are valid</li>
<li>The appropriate decoding function (single-level or multi-level) completes successfully</li>
<li>All output parameters are properly populated with decoded values</li>
</ul>
</td></tr>
<tr><td class="paramname">AARUF_ERROR_NOT_AARUFORMAT</td><td>(-1) The context or image stream is invalid (NULL pointers). This is the only error condition that can occur at this dispatcher level.</td></tr>
<tr><td class="paramname">Other</td><td>error codes may be returned by the underlying decoding functions:<ul>
<li>From <a class="el" href="#a40c571bc4778040f22ac211cea670db1" title="Decodes a single-level DDT v2 entry for a given sector address.">decode_ddt_single_level_v2()</a>: AARUF_ERROR_CANNOT_READ_BLOCK (-7)</li>
<li>From <a class="el" href="#a83aff4d408ab17f8f350cb03b0e12ef6" title="Decodes a multi-level DDT v2 entry for a given sector address.">decode_ddt_multi_level_v2()</a>: AARUF_ERROR_CANNOT_READ_BLOCK (-7), AARUF_ERROR_CANNOT_DECOMPRESS_BLOCK (-17), AARUF_ERROR_INVALID_BLOCK_CRC (-18)</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Function Selection:<ul>
<li>If tableShift &gt; 0: Uses multi-level DDT decoding (decode_ddt_multi_level_v2)</li>
<li>If tableShift = 0: Uses single-level DDT decoding (decode_ddt_single_level_v2)</li>
<li>The tableShift parameter is read from ctx-&gt;userDataDdtHeader.tableShift</li>
</ul>
</dd>
<dd>
This function performs minimal validation and primarily acts as a dispatcher. Most error conditions and complex logic are handled by the underlying functions.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>The function assumes the DDT has been properly loaded by <a class="el" href="#a1caeae710ee5e1dd356e43b3b659e9c0" title="Processes a DDT v2 block from the image stream.">process_ddt_v2()</a>. Calling this function with an uninitialized or corrupted DDT will result in undefined behavior from the underlying decoding functions.</dd>
<dd>
All output parameters must be valid pointers. No bounds checking is performed on the sector_address parameter at this level. </dd></dl>
<p class="definition">Definition at line <a class="el" href="ddt__v2_8c_source.html#l00507">507</a> of file <a class="el" href="ddt__v2_8c_source.html">ddt_v2.c</a>.</p>
<p class="reference">References <a class="el" href="errors_8h_source.html#l00040">AARUF_ERROR_NOT_AARUFORMAT</a>, <a class="el" href="ddt__v2_8c_source.html#l00724">decode_ddt_multi_level_v2()</a>, <a class="el" href="ddt__v2_8c_source.html#l00581">decode_ddt_single_level_v2()</a>, <a class="el" href="log_8h_source.html#l00040">FATAL</a>, <a class="el" href="context_8h_source.html#l00176">aaruformat_context::imageStream</a>, <a class="el" href="ddt_8h_source.html#l00156">DdtHeader2::tableShift</a>, <a class="el" href="log_8h_source.html#l00025">TRACE</a>, and <a class="el" href="context_8h_source.html#l00189">aaruformat_context::user_data_ddt_header</a>.</p>
2025-10-11 12:43:39 +01:00
<p class="reference">Referenced by <a class="el" href="read_8c_source.html#l00253">aaruf_read_sector()</a>.</p>
2025-10-11 01:35:43 +01:00
</div>
</div>
<a id="a83aff4d408ab17f8f350cb03b0e12ef6" name="a83aff4d408ab17f8f350cb03b0e12ef6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83aff4d408ab17f8f350cb03b0e12ef6">&#9670;&#160;</a></span>decode_ddt_multi_level_v2()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t decode_ddt_multi_level_v2 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structaaruformat__context.html">aaruformat_context</a> *</td> <td class="paramname"><span class="paramname"><em>ctx</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t</td> <td class="paramname"><span class="paramname"><em>sector_address</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>negative</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t *</td> <td class="paramname"><span class="paramname"><em>offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t *</td> <td class="paramname"><span class="paramname"><em>block_offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *</td> <td class="paramname"><span class="paramname"><em>sector_status</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Decodes a multi-level DDT v2 entry for a given sector address. </p>
<p>Used when the DDT table uses multi-level indirection (tableShift &gt; 0). This function handles the complex process of navigating a hierarchical DDT structure where the primary table points to secondary tables that contain the actual sector mappings. It includes caching mechanisms for secondary tables, supports both compressed and uncompressed secondary tables, and performs comprehensive validation including CRC verification.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ctx</td><td>Pointer to the aaruformat context containing the loaded primary DDT table. </td></tr>
<tr><td class="paramname">sector_address</td><td>Logical sector address to decode (adjusted for negative sectors). </td></tr>
<tr><td class="paramname">negative</td><td>Indicates if the sector address is negative. </td></tr>
<tr><td class="paramname">offset</td><td>Pointer to store the resulting sector offset within the block. </td></tr>
<tr><td class="paramname">block_offset</td><td>Pointer to store the resulting block offset in the image. </td></tr>
<tr><td class="paramname">sector_status</td><td>Pointer to store the sector status (dumped, not dumped, etc.).</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns one of the following status codes: </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">AARUF_STATUS_OK</td><td>(0) Successfully decoded the DDT entry. This is returned when:<ul>
<li>The context and image stream are valid</li>
<li>The tableShift validation passes (must be &gt; 0)</li>
<li>The DDT size type is recognized (SmallDdtSizeType or BigDdtSizeType)</li>
<li>Secondary DDT table is successfully loaded (from cache or file)</li>
<li>Secondary DDT decompression succeeds (if needed)</li>
<li>Secondary DDT CRC validation passes</li>
<li>The DDT entry is successfully extracted and decoded</li>
<li>All output parameters are properly populated with decoded values</li>
<li>Zero DDT entries are handled (indicates sector not dumped)</li>
</ul>
</td></tr>
<tr><td class="paramname">AARUF_ERROR_NOT_AARUFORMAT</td><td>(-1) The context or image stream is invalid (NULL pointers).</td></tr>
<tr><td class="paramname">AARUF_ERROR_CANNOT_READ_BLOCK</td><td>(-7) Configuration, validation, or file access errors. This occurs when:<ul>
<li>The tableShift is zero (should use single-level decoding instead)</li>
<li>The DDT size type is unknown/unsupported (not SmallDdtSizeType or BigDdtSizeType)</li>
<li>Cannot read the secondary DDT header from the image stream</li>
<li>Secondary DDT header validation fails (wrong identifier or type)</li>
<li>Cannot read uncompressed secondary DDT data from the image stream</li>
<li>CRC64 context initialization fails (internal error)</li>
<li>Memory allocation fails for secondary DDT data (critical failure)</li>
<li>Unknown compression type encountered in secondary DDT</li>
</ul>
</td></tr>
<tr><td class="paramname">AARUF_ERROR_CANNOT_DECOMPRESS_BLOCK</td><td>(-17) LZMA decompression failed for secondary DDT. This occurs when:<ul>
<li>Memory allocation fails for compressed data or decompression buffer</li>
<li>Cannot read LZMA properties from the image stream</li>
<li>Cannot read compressed secondary DDT data from the image stream</li>
<li>The LZMA decoder returns a non-zero error code during decompression</li>
<li>The decompressed data size doesn't match the expected secondary DDT length</li>
</ul>
</td></tr>
<tr><td class="paramname">AARUF_ERROR_INVALID_BLOCK_CRC</td><td>(-18) CRC64 validation failed for secondary DDT. This occurs when:<ul>
<li>Calculated CRC64 doesn't match the expected CRC64 in the secondary DDT header</li>
<li>Data corruption is detected in the secondary DDT data</li>
<li>This applies to both compressed and uncompressed secondary DDT blocks</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Multi-level DDT Navigation:<ul>
<li>Uses tableShift to calculate items per DDT entry (2^tableShift)</li>
<li>Calculates DDT position by dividing sector address by items per entry</li>
<li>Retrieves secondary DDT offset from primary table at calculated position</li>
<li>Converts block offset to file offset using blockAlignmentShift</li>
</ul>
</dd>
<dd>
Secondary DDT Caching:<ul>
<li>Maintains a single cached secondary DDT in memory (ctx-&gt;cachedSecondaryDdtSmall/Big)</li>
<li>Compares requested offset with cached offset (ctx-&gt;cachedDdtOffset)</li>
<li>Only loads from disk if the requested secondary DDT is not currently cached</li>
<li>Caching improves performance for sequential sector access patterns</li>
</ul>
</dd>
<dd>
Secondary DDT Processing:<ul>
<li>Supports both LZMA compression and uncompressed formats</li>
<li>Performs full CRC64 validation of secondary DDT data</li>
<li>Same bit manipulation as single-level DDT for final entry decoding</li>
</ul>
</dd>
<dd>
Error Handling Strategy:<ul>
<li>Memory allocation failures for secondary DDT loading are treated as critical errors</li>
<li>File I/O errors and validation failures cause immediate function termination</li>
<li>Unknown compression types are treated as errors (unlike the processing functions)</li>
<li>All allocated memory is cleaned up on error conditions</li>
</ul>
</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>This function should only be called when tableShift &gt; 0. Calling it with tableShift = 0 will result in AARUF_ERROR_CANNOT_READ_BLOCK.</dd>
<dd>
The function assumes the primary DDT table has been properly loaded and is accessible via ctx-&gt;userDataDdtMini or ctx-&gt;userDataDdtBig depending on size type.</dd>
<dd>
Secondary DDT caching means that memory usage can increase during operation. The cached secondary DDT is replaced when a different secondary table is needed.</dd>
<dd>
No bounds checking is performed on sector_address or calculated DDT positions. Accessing beyond table boundaries will result in undefined behavior. </dd></dl>
<p class="definition">Definition at line <a class="el" href="ddt__v2_8c_source.html#l00724">724</a> of file <a class="el" href="ddt__v2_8c_source.html">ddt_v2.c</a>.</p>
2025-12-13 12:00:17 +00:00
<p class="reference">References <a class="el" href="crc64_8c_source.html#l00141">aaruf_crc64_final()</a>, <a class="el" href="crc64_8c_source.html#l00032">aaruf_crc64_init()</a>, <a class="el" href="crc64_8c_source.html#l00055">aaruf_crc64_update()</a>, <a class="el" href="errors_8h_source.html#l00056">AARUF_ERROR_CANNOT_DECOMPRESS_BLOCK</a>, <a class="el" href="errors_8h_source.html#l00046">AARUF_ERROR_CANNOT_READ_BLOCK</a>, <a class="el" href="errors_8h_source.html#l00057">AARUF_ERROR_INVALID_BLOCK_CRC</a>, <a class="el" href="errors_8h_source.html#l00040">AARUF_ERROR_NOT_AARUFORMAT</a>, <a class="el" href="lzma_8c_source.html#l00039">aaruf_lzma_decode_buffer()</a>, <a class="el" href="errors_8h_source.html#l00075">AARUF_STATUS_OK</a>, <a class="el" href="ddt_8h_source.html#l00154">DdtHeader2::blockAlignmentShift</a>, <a class="el" href="context_8h_source.html#l00190">aaruformat_context::cached_ddt_offset</a>, <a class="el" href="context_8h_source.html#l00188">aaruformat_context::cached_secondary_ddt2</a>, <a class="el" href="ddt_8h_source.html#l00159">DdtHeader2::cmpLength</a>, <a class="el" href="ddt_8h_source.html#l00145">DdtHeader2::compression</a>, <a class="el" href="ddt_8h_source.html#l00162">DdtHeader2::crc64</a>, <a class="el" href="ddt_8h_source.html#l00155">DdtHeader2::dataShift</a>, <a class="el" href="enums_8h_source.html#l00145">DeDuplicationTableSecondary</a>, <a class="el" href="log_8h_source.html#l00040">FATAL</a>, <a class="el" href="ddt_8h_source.html#l00143">DdtHeader2::identifier</a>, <a class="el" href="context_8h_source.html#l00176">aaruformat_context::imageStream</a>, <a class="el" href="ddt_8h_source.html#l00160">DdtHeader2::length</a>, <a class="el" href="enums_8h_source.html#l00034">Lzma</a>, <a class="el" href="consts_8h_source.html#l00082">LZMA_PROPERTIES_LENGTH</a>, <a class="el" href="ddt_8h_source.html#l00149">DdtHeader2::negative</a>, <a class="el" href="enums_8h_source.html#l00033">None</a>, <a class="el" href="enums_8h_source.html#l00231">SectorStatusNotDumped</a>, <a class="el" href="ddt_8h_source.html#l00156">DdtHeader2::tableShift</a>, <a class="el" href="log_8h_source.html#l00025">TRACE</a>, <a class="el" href="ddt_8h_source.html#l00144">DdtHeader2::type</a>, <a class="el" href="context_8h_source.html#l00187">aaruformat_context::user_data_ddt2</a>, <a class="el" href="context_8h_source.html#l00189">aaruformat_context::user_data_ddt_header</a>, and <a class="el" href="enums_8h_source.html#l00046">UserData</a>.</p>
2025-10-11 01:35:43 +01:00
<p class="reference">Referenced by <a class="el" href="ddt__v2_8c_source.html#l00507">decode_ddt_entry_v2()</a>.</p>
</div>
</div>
<a id="a40c571bc4778040f22ac211cea670db1" name="a40c571bc4778040f22ac211cea670db1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40c571bc4778040f22ac211cea670db1">&#9670;&#160;</a></span>decode_ddt_single_level_v2()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t decode_ddt_single_level_v2 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structaaruformat__context.html">aaruformat_context</a> *</td> <td class="paramname"><span class="paramname"><em>ctx</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t</td> <td class="paramname"><span class="paramname"><em>sector_address</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>negative</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t *</td> <td class="paramname"><span class="paramname"><em>offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t *</td> <td class="paramname"><span class="paramname"><em>block_offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *</td> <td class="paramname"><span class="paramname"><em>sector_status</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Decodes a single-level DDT v2 entry for a given sector address. </p>
<p>Used when the DDT table does not use multi-level indirection (tableShift = 0). This function performs direct lookup in the primary DDT table to extract sector offset, block offset, and sector status information. It performs bit manipulation to decode the packed DDT entry values.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ctx</td><td>Pointer to the aaruformat context containing the loaded DDT table. </td></tr>
<tr><td class="paramname">sector_address</td><td>Logical sector address to decode (adjusted for negative sectors). </td></tr>
<tr><td class="paramname">negative</td><td>Indicates if the sector address is negative. </td></tr>
<tr><td class="paramname">offset</td><td>Pointer to store the resulting sector offset within the block. </td></tr>
<tr><td class="paramname">block_offset</td><td>Pointer to store the resulting block offset in the image. </td></tr>
<tr><td class="paramname">sector_status</td><td>Pointer to store the sector status (dumped, not dumped, etc.).</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns one of the following status codes: </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">AARUF_STATUS_OK</td><td>(0) Successfully decoded the DDT entry. This is always returned when:<ul>
<li>The context and image stream are valid</li>
<li>The tableShift validation passes (must be 0)</li>
<li>The DDT size type is recognized (SmallDdtSizeType or BigDdtSizeType)</li>
<li>The DDT entry is successfully extracted and decoded</li>
<li>All output parameters are properly populated with decoded values</li>
<li>Zero DDT entries are handled (indicates sector not dumped)</li>
</ul>
</td></tr>
<tr><td class="paramname">AARUF_ERROR_NOT_AARUFORMAT</td><td>(-1) The context or image stream is invalid (NULL pointers).</td></tr>
<tr><td class="paramname">AARUF_ERROR_CANNOT_READ_BLOCK</td><td>(-7) Configuration or validation errors. This occurs when:<ul>
<li>The tableShift is not zero (should use multi-level decoding instead)</li>
<li>The DDT size type is unknown/unsupported (not SmallDdtSizeType or BigDdtSizeType)</li>
<li>Internal consistency checks fail</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>DDT Entry Decoding<ul>
<li>Bits 63-61: Sector status (4 bits)</li>
<li>Bits 60-0: Combined offset and block index (60 bits)</li>
<li>Offset mask: Derived from dataShift parameter</li>
<li>Block offset: Calculated using blockAlignmentShift parameter</li>
</ul>
</dd>
<dd>
Negative Sector Handling:<ul>
<li>Sector address is automatically adjusted by adding ctx-&gt;userDataDdtHeader.negative</li>
<li>This allows proper indexing into the DDT table for negative sector addresses</li>
</ul>
</dd>
<dd>
Zero Entry Handling:<ul>
<li>A zero DDT entry indicates the sector was not dumped</li>
<li>Sets sector_status to SectorStatusNotDumped and zeros offset/block_offset</li>
<li>This is a normal condition and not an error</li>
</ul>
</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>The function assumes the DDT table has been properly loaded and is accessible via ctx-&gt;userDataDdtMini or ctx-&gt;userDataDdtBig depending on size type.</dd>
<dd>
No bounds checking is performed on sector_address. Accessing beyond the DDT table boundaries will result in undefined behavior.</dd>
<dd>
This function should only be called when tableShift is 0. Calling it with tableShift &gt; 0 will result in AARUF_ERROR_CANNOT_READ_BLOCK. </dd></dl>
<p class="definition">Definition at line <a class="el" href="ddt__v2_8c_source.html#l00581">581</a> of file <a class="el" href="ddt__v2_8c_source.html">ddt_v2.c</a>.</p>
2025-12-13 12:00:17 +00:00
<p class="reference">References <a class="el" href="errors_8h_source.html#l00046">AARUF_ERROR_CANNOT_READ_BLOCK</a>, <a class="el" href="errors_8h_source.html#l00040">AARUF_ERROR_NOT_AARUFORMAT</a>, <a class="el" href="errors_8h_source.html#l00075">AARUF_STATUS_OK</a>, <a class="el" href="ddt_8h_source.html#l00154">DdtHeader2::blockAlignmentShift</a>, <a class="el" href="ddt_8h_source.html#l00155">DdtHeader2::dataShift</a>, <a class="el" href="log_8h_source.html#l00040">FATAL</a>, <a class="el" href="context_8h_source.html#l00176">aaruformat_context::imageStream</a>, <a class="el" href="ddt_8h_source.html#l00149">DdtHeader2::negative</a>, <a class="el" href="enums_8h_source.html#l00231">SectorStatusNotDumped</a>, <a class="el" href="ddt_8h_source.html#l00156">DdtHeader2::tableShift</a>, <a class="el" href="log_8h_source.html#l00025">TRACE</a>, <a class="el" href="context_8h_source.html#l00187">aaruformat_context::user_data_ddt2</a>, and <a class="el" href="context_8h_source.html#l00189">aaruformat_context::user_data_ddt_header</a>.</p>
2025-10-11 01:35:43 +01:00
<p class="reference">Referenced by <a class="el" href="ddt__v2_8c_source.html#l00507">decode_ddt_entry_v2()</a>.</p>
</div>
</div>
<a id="a1caeae710ee5e1dd356e43b3b659e9c0" name="a1caeae710ee5e1dd356e43b3b659e9c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1caeae710ee5e1dd356e43b3b659e9c0">&#9670;&#160;</a></span>process_ddt_v2()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t process_ddt_v2 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structaaruformat__context.html">aaruformat_context</a> *</td> <td class="paramname"><span class="paramname"><em>ctx</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structIndexEntry.html">IndexEntry</a> *</td> <td class="paramname"><span class="paramname"><em>entry</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool *</td> <td class="paramname"><span class="paramname"><em>found_user_data_ddt</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Processes a DDT v2 block from the image stream. </p>
<p>Reads and decompresses (if needed) a DDT v2 block, verifies its CRC, and loads it into memory. This function handles both user data DDT blocks and CD sector prefix/suffix corrected DDT blocks, supporting both LZMA compression and uncompressed formats. It performs CRC64 validation and stores the processed DDT data in the appropriate context fields based on size type (small/big).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ctx</td><td>Pointer to the aaruformat context. </td></tr>
<tr><td class="paramname">entry</td><td>Pointer to the index entry describing the DDT block. </td></tr>
<tr><td class="paramname">found_user_data_ddt</td><td>Pointer to a boolean that will be set to true if a user data DDT was found and loaded.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns one of the following status codes: </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">AARUF_STATUS_OK</td><td>(0) Successfully processed the DDT block. This is returned when:<ul>
<li>The DDT block is successfully read, decompressed (if needed), and loaded into memory</li>
<li>CRC64 validation passes for the DDT data</li>
<li>User data DDT blocks are processed and context is properly updated</li>
<li>CD sector prefix/suffix corrected DDT blocks are processed successfully</li>
<li>Memory allocation failures occur for non-critical operations (processing continues)</li>
<li>File reading errors occur for compressed data or LZMA properties (processing continues)</li>
<li>Unknown compression types are encountered (block is skipped)</li>
</ul>
</td></tr>
<tr><td class="paramname">AARUF_ERROR_NOT_AARUFORMAT</td><td>(-1) The context or image stream is invalid (NULL pointers).</td></tr>
<tr><td class="paramname">AARUF_ERROR_CANNOT_READ_BLOCK</td><td>(-7) Failed to access the DDT block in the image stream. This occurs when:<ul>
<li>fseek() fails to position at the DDT block offset</li>
<li>The file position doesn't match the expected offset after seeking</li>
<li>Failed to read the DDT header from the image stream</li>
<li>The number of bytes read for the DDT header is insufficient</li>
<li>CRC64 context initialization fails (internal error)</li>
</ul>
</td></tr>
<tr><td class="paramname">AARUF_ERROR_CANNOT_DECOMPRESS_BLOCK</td><td>(-17) LZMA decompression failed. This can happen when:<ul>
<li>The LZMA decoder returns a non-zero error code during decompression</li>
<li>The decompressed data size doesn't match the expected DDT block length</li>
<li>This error causes immediate function termination and memory cleanup</li>
</ul>
</td></tr>
<tr><td class="paramname">AARUF_ERROR_INVALID_BLOCK_CRC</td><td>(-18) CRC64 validation failed. This occurs when:<ul>
<li>Calculated CRC64 doesn't match the expected CRC64 in the DDT header</li>
<li>Data corruption is detected in the DDT block</li>
<li>This applies to both compressed and uncompressed DDT blocks</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Error Handling Strategy:<ul>
<li>Critical errors (seek failures, header read failures, decompression failures, CRC failures) cause immediate return</li>
<li>Non-critical errors (memory allocation failures, unknown compression types) allow processing to continue</li>
<li>The found_user_data_ddt flag is updated to reflect the success of user data DDT loading</li>
</ul>
</dd>
<dd>
DDT v2 Features:<ul>
<li>Handles multi-level DDT hierarchies with tableShift parameter</li>
<li>Updates context with sector counts, DDT version, and primary DDT offset</li>
<li>Stores DDT data in size-appropriate context fields (userDataDdtMini/Big, sectorPrefixDdt, etc.)</li>
</ul>
</dd>
<dd>
Memory Management:<ul>
<li>Allocated DDT data is stored in the context and becomes part of the context lifecycle</li>
<li>Memory is automatically cleaned up on decompression or CRC validation errors</li>
<li>Buffer memory is reused for the final DDT data storage (no double allocation)</li>
</ul>
</dd>
<dd>
CRC Validation:<ul>
<li>All DDT blocks undergo CRC64 validation regardless of compression type</li>
<li>CRC is calculated on the final decompressed data</li>
<li>Uses standard CRC64 calculation (no version-specific endianness conversion like v1)</li>
</ul>
</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>The function modifies context state including sector count, DDT version, and primary DDT offset. Ensure proper context cleanup when the function completes.</dd>
<dd>
Memory allocated for DDT data becomes part of the context and should not be freed separately. The context cleanup functions will handle DDT memory deallocation. </dd></dl>
<p class="definition">Definition at line <a class="el" href="ddt__v2_8c_source.html#l00096">96</a> of file <a class="el" href="ddt__v2_8c_source.html">ddt_v2.c</a>.</p>
2025-12-12 12:25:02 +00:00
<p class="reference">References <a class="el" href="crc64_8c_source.html#l00141">aaruf_crc64_final()</a>, <a class="el" href="crc64_8c_source.html#l00032">aaruf_crc64_init()</a>, <a class="el" href="crc64_8c_source.html#l00055">aaruf_crc64_update()</a>, <a class="el" href="errors_8h_source.html#l00056">AARUF_ERROR_CANNOT_DECOMPRESS_BLOCK</a>, <a class="el" href="errors_8h_source.html#l00046">AARUF_ERROR_CANNOT_READ_BLOCK</a>, <a class="el" href="errors_8h_source.html#l00057">AARUF_ERROR_INVALID_BLOCK_CRC</a>, <a class="el" href="errors_8h_source.html#l00040">AARUF_ERROR_NOT_AARUFORMAT</a>, <a class="el" href="lzma_8c_source.html#l00039">aaruf_lzma_decode_buffer()</a>, <a class="el" href="errors_8h_source.html#l00075">AARUF_STATUS_OK</a>, <a class="el" href="ddt_8h_source.html#l00150">DdtHeader2::blocks</a>, <a class="el" href="enums_8h_source.html#l00114">CdSectorPrefix</a>, <a class="el" href="enums_8h_source.html#l00115">CdSectorSuffix</a>, <a class="el" href="ddt_8h_source.html#l00159">DdtHeader2::cmpLength</a>, <a class="el" href="ddt_8h_source.html#l00145">DdtHeader2::compression</a>, <a class="el" href="ddt_8h_source.html#l00162">DdtHeader2::crc64</a>, <a class="el" href="index_8h_source.html#l00111">IndexEntry::dataType</a>, <a class="el" href="context_8h_source.html#l00194">aaruformat_context::ddt_version</a>, <a class="el" href="log_8h_source.html#l00040">FATAL</a>, <a class="el" href="context_8h_source.html#l00260">aaruformat_context::image_info</a>, <a class="el" href="aaru_8h_source.html#l00925">ImageInfo::ImageSize</a>, <a class="el" href="context_8h_source.html#l00176">aaruformat_context::imageStream</a>, <a class="el" href="context_8h_source.html#l00196">aaruformat_context::in_memory_ddt</a>, <a class="el" href="ddt_8h_source.html#l00160">DdtHeader2::length</a>, <a class="el" href="enums_8h_source.html#l00034">Lzma</a>, <a class="el" href="consts_8h_source.html#l00082">LZMA_PROPERTIES_LENGTH</a>, <a class="el" href="ddt_8h_source.html#l00149">DdtHeader2::negative</a>, <a class="el" href="enums_8h_source.html#l00033">None</a>, <a class="el" href="index_8h_source.html#l00112">IndexEntry::offset</a>, <a class="el" href="ddt_8h_source.html#l00151">DdtHeader2::overflow</a>, <a class="el" href="context_8h_source.html#l00192">aaruformat_context::primary_ddt_offset</a>, <a class="el" href="context_8h_source.html#l00185">aaruformat_context::sector_prefix_ddt2</a>, <a class="el" href="context_8h_source.html#l00186">aaruformat_context::sector_suffix_ddt2</a>, <a class="el" href="aaru_8h_source.html#l00926">ImageInfo::Sectors</a>, <a class="el" href="log_8h_source.html#l00025">TRACE</a>, <a class="el" href="context_8h_source.html#l00187">aaruformat_context::user_data_ddt2</a>, <a class="el" href="context_8h_source.html#l00189">aaruformat_context::user_data_ddt_header</a>, and <a class="el" href="enums_8h_source.html#l00046">UserData</a>.</p>
2025-10-11 01:35:43 +01:00
2025-10-21 14:23:35 +01:00
<p class="reference">Referenced by <a class="el" href="open_8c_source.html#l00223">aaruf_open()</a>.</p>
2025-10-11 01:35:43 +01:00
</div>
</div>
2025-12-12 12:25:02 +00:00
<a id="a6d6ee0e6c255449cb9c2528f0f8398ec" name="a6d6ee0e6c255449cb9c2528f0f8398ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d6ee0e6c255449cb9c2528f0f8398ec">&#9670;&#160;</a></span>set_ddt_entry_v2()</h2>
2025-10-11 01:35:43 +01:00
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool set_ddt_entry_v2 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structaaruformat__context.html">aaruformat_context</a> *</td> <td class="paramname"><span class="paramname"><em>ctx</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint64_t</td> <td class="paramname"><span class="paramname"><em>sector_address</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
2025-12-12 12:25:02 +00:00
<td class="paramtype">const bool</td> <td class="paramname"><span class="paramname"><em>negative</em></span>, </td>
2025-10-11 01:35:43 +01:00
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint64_t</td> <td class="paramname"><span class="paramname"><em>offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint64_t</td> <td class="paramname"><span class="paramname"><em>block_offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t</td> <td class="paramname"><span class="paramname"><em>sector_status</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t *</td> <td class="paramname"><span class="paramname"><em>ddt_entry</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets a DDT v2 entry for a given sector address. </p>
<p>Updates the DDT v2 table(s) with the specified offset, block offset, and sector status for a sector.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ctx</td><td>Pointer to the aaruformat context. </td></tr>
<tr><td class="paramname">sector_address</td><td>Logical sector address to set. </td></tr>
<tr><td class="paramname">negative</td><td>Indicates if the sector address is negative. </td></tr>
<tr><td class="paramname">offset</td><td>Offset to set for the sector. </td></tr>
<tr><td class="paramname">block_offset</td><td>Block offset to set for the sector. </td></tr>
<tr><td class="paramname">sector_status</td><td>Status to set for the sector. </td></tr>
<tr><td class="paramname">ddt_entry</td><td>Existing DDT entry or 0 to create a new one. If 0, a new entry is returned.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns one of the following status codes: </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">true</td><td>if the entry was set successfully, false otherwise. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="ddt__v2_8c_source.html#l00988">988</a> of file <a class="el" href="ddt__v2_8c_source.html">ddt_v2.c</a>.</p>
2025-12-12 12:25:02 +00:00
<p class="reference">References <a class="el" href="log_8h_source.html#l00040">FATAL</a>, <a class="el" href="context_8h_source.html#l00176">aaruformat_context::imageStream</a>, <a class="el" href="ddt__v2_8c_source.html#l01096">set_ddt_multi_level_v2()</a>, <a class="el" href="ddt__v2_8c_source.html#l01024">set_ddt_single_level_v2()</a>, <a class="el" href="ddt_8h_source.html#l00156">DdtHeader2::tableShift</a>, <a class="el" href="log_8h_source.html#l00025">TRACE</a>, and <a class="el" href="context_8h_source.html#l00189">aaruformat_context::user_data_ddt_header</a>.</p>
2025-10-11 01:35:43 +01:00
<p class="reference">Referenced by <a class="el" href="write_8c_source.html#l00098">aaruf_write_sector()</a>.</p>
</div>
</div>
<a id="a69ff2e68fe4d92a2d2d469ac69f41d82" name="a69ff2e68fe4d92a2d2d469ac69f41d82"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69ff2e68fe4d92a2d2d469ac69f41d82">&#9670;&#160;</a></span>set_ddt_multi_level_v2()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool set_ddt_multi_level_v2 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structaaruformat__context.html">aaruformat_context</a> *</td> <td class="paramname"><span class="paramname"><em>ctx</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t</td> <td class="paramname"><span class="paramname"><em>sector_address</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>negative</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t</td> <td class="paramname"><span class="paramname"><em>offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t</td> <td class="paramname"><span class="paramname"><em>block_offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t</td> <td class="paramname"><span class="paramname"><em>sector_status</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t *</td> <td class="paramname"><span class="paramname"><em>ddt_entry</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets a multi-level DDT v2 entry for a given sector address. </p>
<p>Used when the DDT table uses multi-level indirection (tableShift &gt; 0).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ctx</td><td>Pointer to the aaruformat context. </td></tr>
<tr><td class="paramname">sector_address</td><td>Logical sector address to set. </td></tr>
<tr><td class="paramname">negative</td><td>Indicates if the sector address is negative. </td></tr>
<tr><td class="paramname">offset</td><td>Offset to set for the sector. </td></tr>
<tr><td class="paramname">block_offset</td><td>Block offset to set for the sector. </td></tr>
<tr><td class="paramname">sector_status</td><td>Status to set for the sector. </td></tr>
<tr><td class="paramname">ddt_entry</td><td>Existing DDT entry or 0 to create a new one. If 0, a new entry is returned.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns one of the following status codes: </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">true</td><td>if the entry was set successfully, false otherwise. </td></tr>
</table>
</dd>
</dl>
2025-12-12 12:25:02 +00:00
<p class="definition">Definition at line <a class="el" href="ddt__v2_8c_source.html#l01096">1096</a> of file <a class="el" href="ddt__v2_8c_source.html">ddt_v2.c</a>.</p>
2025-10-11 01:35:43 +01:00
2025-12-13 12:00:17 +00:00
<p class="reference">References <a class="el" href="write_8c_source.html#l01427">aaruf_close_current_block()</a>, <a class="el" href="crc64_8c_source.html#l00160">aaruf_crc64_data()</a>, <a class="el" href="crc64_8c_source.html#l00141">aaruf_crc64_final()</a>, <a class="el" href="crc64_8c_source.html#l00032">aaruf_crc64_init()</a>, <a class="el" href="crc64_8c_source.html#l00055">aaruf_crc64_update()</a>, <a class="el" href="errors_8h_source.html#l00048">AARUF_ERROR_NOT_ENOUGH_MEMORY</a>, <a class="el" href="lzma_8c_source.html#l00065">aaruf_lzma_encode_buffer()</a>, <a class="el" href="ddt_8h_source.html#l00154">DdtHeader2::blockAlignmentShift</a>, <a class="el" href="ddt_8h_source.html#l00150">DdtHeader2::blocks</a>, <a class="el" href="index_8h_source.html#l00110">IndexEntry::blockType</a>, <a class="el" href="context_8h_source.html#l00190">aaruformat_context::cached_ddt_offset</a>, <a class="el" href="context_8h_source.html#l00191">aaruformat_context::cached_ddt_position</a>, <a class="el" href="context_8h_source.html#l00188">aaruformat_context::cached_secondary_ddt2</a>, <a class="el" href="ddt_8h_source.html#l00161">DdtHeader2::cmpCrc64</a>, <a class="el" href="ddt_8h_source.html#l00159">DdtHeader2::cmpLength</a>, <a class="el" href="ddt_8h_source.html#l00145">DdtHeader2::compression</a>, <a class="el" href="context_8h_source.html#l00300">aaruformat_context::compression_enabled</a>, <a class="el" href="ddt_8h_source.html#l00162">DdtHeader2::crc64</a>, <a class="el" href="ddt_8h_source.html#l00155">DdtHeader2::dataShift</a>, <a class="el" href="index_8h_source.html#l00111">IndexEntry::dataType</a>, <a class="el" href="enums_8h_source.html#l00144">DeDuplicationTable2</a>, <a class="el" href="enums_8h_source.html#l00145">DeDuplicationTableSecondary</a>, <a class="el" href="context_8h_source.html#l00330">aaruformat_context::dirty_index_block</a>, <a class="el" href="context_8h_source.html#l00309">aaruformat_context::dirty_primary_ddt</a>, <a class="el" href="context_8h_source.html#l00308">aaruformat_context::dirty_secondary_ddt</a>, <a class="el" href="ddt_8h_source.html#l00158">DdtHeader2::entries</a>, <a class="el" href="log_8h_source.html#l00040">FATAL</a>, <a class="el" href="ddt_8h_source.html#l00143">DdtHeader2::identifier</a>, <a class="el" href="context_8h_source.html#l00176">aaruformat_context::imageStream</a>, <a class="el" href="context_8h_source.html#l00252">aaruformat_context::index_entries</a>, <a class="el" href="ddt_8h_source.html#l00160">DdtHeader2::length</a>, <a class="el" href="ddt_8h_source.html#l00146">DdtHeader2::levels</a>, <a class="el" href="enums_8h_source.html#l00034">Lzma</a>, <a class="el" href="context_8h_source.html#l00298">aaruformat_context::lzma_dict_size</a>, <a class="el" href="consts_8h_source.html#l00082">LZMA_PROPERTIES_LENGTH</a>, <a class="el" href="ddt_8h_source.html#l00149">DdtHeader2::negative</a>, <a class="el" href="context_8h_source.html#l00282">aaruformat_context::next_block_position</a>, <a class="el" href="enums_8h_source.html#l00033">None</a>, <a class="el" href="index_8h_source.html#l00112">IndexEntry::offset</a>, <a class="el" href="ddt_8h_source.html#l00151">DdtHeader2::overflow</a>, <a class="el" href="ddt_8h_source.html#l00148">DdtHeader2::previousLevelOffset</a>, <a class="el" href="context_8h_source.html#l00192">aaruformat_context::primary_ddt_offset</a>, <a class="el" href="ddt_8h_source.html#l00153">DdtHeader2::start</a>, <a class="el" href="ddt_8h_source.html#l00147">DdtHeader2::tableLevel</a>, <a class="el" href="ddt_8h_source.html#l00156">DdtHeader2::tableShift</a>, <a class="el" href="log_8h_source.html#l00025">TRACE</a>, <a class="el" href="ddt_8h_source.html#l00144">DdtHeader2::type</a>, <a class="el" href="context_8h_source.html#l00187">aaruformat_context::user_data_ddt2</a>, <a class="el" href="context_8h_source.html#l00189">aaruformat_context::user_data_ddt_header</a>, <a class="el" href="enums_8h_source.html#l00046">UserData</a>, and <a class="el" href="context_8h_source.html#l00280">aaruformat_context::writing_buffer</a>.</p>
2025-10-11 01:35:43 +01:00
<p class="reference">Referenced by <a class="el" href="ddt__v2_8c_source.html#l00988">set_ddt_entry_v2()</a>.</p>
</div>
</div>
<a id="a9583b5975c5c0b81902681c07d6f737f" name="a9583b5975c5c0b81902681c07d6f737f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9583b5975c5c0b81902681c07d6f737f">&#9670;&#160;</a></span>set_ddt_single_level_v2()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool set_ddt_single_level_v2 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structaaruformat__context.html">aaruformat_context</a> *</td> <td class="paramname"><span class="paramname"><em>ctx</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t</td> <td class="paramname"><span class="paramname"><em>sector_address</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool</td> <td class="paramname"><span class="paramname"><em>negative</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint64_t</td> <td class="paramname"><span class="paramname"><em>offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint64_t</td> <td class="paramname"><span class="paramname"><em>block_offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t</td> <td class="paramname"><span class="paramname"><em>sector_status</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t *</td> <td class="paramname"><span class="paramname"><em>ddt_entry</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets a single-level DDT v2 entry for a given sector address. </p>
<p>Used when the DDT table does not use multi-level indirection.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ctx</td><td>Pointer to the aaruformat context. </td></tr>
<tr><td class="paramname">sector_address</td><td>Logical sector address to set. </td></tr>
<tr><td class="paramname">negative</td><td>Indicates if the sector address is negative. </td></tr>
<tr><td class="paramname">offset</td><td>Offset to set for the sector. </td></tr>
<tr><td class="paramname">block_offset</td><td>Block offset to set for the sector. </td></tr>
<tr><td class="paramname">sector_status</td><td>Status to set for the sector. </td></tr>
<tr><td class="paramname">ddt_entry</td><td>Existing DDT entry or 0 to create a new one. If 0, a new entry is returned.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns one of the following status codes: </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">true</td><td>if the entry was set successfully, false otherwise. </td></tr>
</table>
</dd>
</dl>
2025-12-12 12:25:02 +00:00
<p class="definition">Definition at line <a class="el" href="ddt__v2_8c_source.html#l01024">1024</a> of file <a class="el" href="ddt__v2_8c_source.html">ddt_v2.c</a>.</p>
2025-10-11 01:35:43 +01:00
2025-12-12 12:25:02 +00:00
<p class="reference">References <a class="el" href="ddt_8h_source.html#l00154">DdtHeader2::blockAlignmentShift</a>, <a class="el" href="ddt_8h_source.html#l00155">DdtHeader2::dataShift</a>, <a class="el" href="context_8h_source.html#l00310">aaruformat_context::dirty_single_level_ddt</a>, <a class="el" href="log_8h_source.html#l00040">FATAL</a>, <a class="el" href="context_8h_source.html#l00176">aaruformat_context::imageStream</a>, <a class="el" href="ddt_8h_source.html#l00149">DdtHeader2::negative</a>, <a class="el" href="ddt_8h_source.html#l00156">DdtHeader2::tableShift</a>, <a class="el" href="log_8h_source.html#l00025">TRACE</a>, <a class="el" href="context_8h_source.html#l00187">aaruformat_context::user_data_ddt2</a>, and <a class="el" href="context_8h_source.html#l00189">aaruformat_context::user_data_ddt_header</a>.</p>
2025-10-11 01:35:43 +01:00
<p class="reference">Referenced by <a class="el" href="ddt__v2_8c_source.html#l00988">set_ddt_entry_v2()</a>.</p>
</div>
</div>
<a id="a40a8f87e97248615429d232ca9fb599b" name="a40a8f87e97248615429d232ca9fb599b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40a8f87e97248615429d232ca9fb599b">&#9670;&#160;</a></span>set_ddt_tape()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool set_ddt_tape </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structaaruformat__context.html">aaruformat_context</a> *</td> <td class="paramname"><span class="paramname"><em>ctx</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t</td> <td class="paramname"><span class="paramname"><em>sector_address</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint64_t</td> <td class="paramname"><span class="paramname"><em>offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint64_t</td> <td class="paramname"><span class="paramname"><em>block_offset</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t</td> <td class="paramname"><span class="paramname"><em>sector_status</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t *</td> <td class="paramname"><span class="paramname"><em>ddt_entry</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets a DDT entry for tape media using a hash-based lookup table. </p>
<p>This function is specifically designed for tape media images where sectors are accessed non-sequentially and the traditional DDT array structure is inefficient. Instead of using a large contiguous array, it uses a hash table (UTHASH) to store only the sectors that have been written, providing sparse storage for tape media.</p>
<p>The function performs the following operations:</p><ol type="1">
<li>Validates the context and verifies it's a tape image</li>
<li>Constructs a DDT entry encoding offset, block alignment, and sector status</li>
<li>Creates a hash table entry with the sector address as the key</li>
<li>Inserts or replaces the entry in the tape DDT hash table</li>
</ol>
<p><b>DDT Entry Format:</b> The DDT entry is a 64-bit value with the following bit layout: </p><div class="fragment"><div class="line">Bits 0-(dataShift-1): Sector offset within block (masked by dataShift)</div>
<div class="line">Bits dataShift-27: Block index (block_offset &gt;&gt; blockAlignmentShift)</div>
<div class="line">Bits 28-31: Sector status (4 bits for status flags)</div>
<div class="line">Bits 32-63: Unused (reserved for future use)</div>
</div><!-- fragment --><p><b>Hash Table Management:</b> Uses HASH_REPLACE macro from UTHASH library which:</p><ul>
<li>Adds new entries if the key (sector_address) doesn't exist</li>
<li>Replaces existing entries if the key is found (automatically frees old entry)</li>
<li>Maintains O(1) average lookup time for sector address resolution</li>
</ul>
<p><b>Overflow Detection:</b> The function checks if the constructed DDT entry exceeds 28 bits (0xFFFFFFF). This limit ensures the sector status can fit in the upper 4 bits while leaving room for future extensions in the upper 32 bits.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ctx</td><td>Pointer to the aaruformat context. Must not be NULL. The context must have a valid imageStream and is_tape must be true. The ctx-&gt;tapeDdt hash table will be updated with the new entry. The ctx-&gt;userDataDdtHeader contains alignment and shift parameters.</td></tr>
<tr><td class="paramname">sector_address</td><td>Logical sector address on the tape to set. This serves as the unique key in the hash table. Multiple calls with the same sector_address will replace the previous entry.</td></tr>
<tr><td class="paramname">offset</td><td>Byte offset within the aligned block where the sector data begins. This value is masked by (1 &lt;&lt; dataShift) - 1 to extract only the lower bits representing the offset within the block.</td></tr>
<tr><td class="paramname">block_offset</td><td>Absolute byte offset in the image file where the data block starts. This is right-shifted by blockAlignmentShift to get the block index, which is stored in the DDT entry's middle bits.</td></tr>
<tr><td class="paramname">sector_status</td><td>Status flags for the sector (4 bits). Common values include:<ul>
<li>0x0 (SectorStatusNotDumped): Sector not yet acquired during image dumping</li>
<li>0x1 (SectorStatusDumped): Sector successfully dumped without error</li>
<li>0x2 (SectorStatusErrored): Error during dumping; data may be incomplete or corrupt</li>
<li>0x3 (SectorStatusMode1Correct): Valid MODE 1 data with regenerable suffix/prefix</li>
<li>0x4 (SectorStatusMode2Form1Ok): Suffix verified/regenerable for MODE 2 Form 1</li>
<li>0x5 (SectorStatusMode2Form2Ok): Suffix matches MODE 2 Form 2 with valid CRC</li>
<li>0x6 (SectorStatusMode2Form2NoCrc): Suffix matches MODE 2 Form 2 but CRC empty/missing</li>
<li>0x7 (SectorStatusTwin): Pointer references a twin sector table</li>
<li>0x8 (SectorStatusUnrecorded): Sector physically unrecorded; repeated reads non-deterministic</li>
<li>0x9 (SectorStatusEncrypted): Content encrypted and stored encrypted in image</li>
<li>0xA (SectorStatusUnencrypted): Content originally encrypted but stored decrypted in image See <a class="el" href="enums_8h.html#a74e216af87b18a5fbf0204a52dd1bba0" title="Acquisition / content status for one or more sectors.">SectorStatus</a> enum for complete list of defined values</li>
</ul>
</td></tr>
<tr><td class="paramname">ddt_entry</td><td>Pointer to a 64-bit value that will receive the constructed DDT entry.<ul>
<li>If *ddt_entry is 0: A new entry is constructed from the provided parameters</li>
<li>If *ddt_entry is non-zero: The existing value is used directly The constructed or provided value is stored in the hash table.</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns one of the following status codes: </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">true</td><td>Successfully created and inserted the DDT entry. This occurs when:<ul>
<li>The context and image stream are valid</li>
<li>The image is confirmed to be a tape image (is_tape == true)</li>
<li>The DDT entry fits within the 28-bit limit (&lt; 0xFFFFFFF)</li>
<li>Memory allocation for the hash entry succeeds</li>
<li>The entry is successfully inserted or replaced in the hash table</li>
</ul>
</td></tr>
<tr><td class="paramname">false</td><td>Failed to set the DDT entry. This can happen when:<ul>
<li>ctx is NULL or ctx-&gt;imageStream is NULL (invalid context)</li>
<li>ctx-&gt;is_tape is false (wrong function called for non-tape media)</li>
<li>The DDT entry exceeds 0xFFFFFFF (media too large for big DDT)</li>
<li>Memory allocation fails for the new hash table entry (out of memory)</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function is only for tape images. For disk images, use <a class="el" href="#a9583b5975c5c0b81902681c07d6f737f" title="Sets a single-level DDT v2 entry for a given sector address.">set_ddt_single_level_v2()</a> or <a class="el" href="#a69ff2e68fe4d92a2d2d469ac69f41d82" title="Sets a multi-level DDT v2 entry for a given sector address.">set_ddt_multi_level_v2()</a> instead, which use array-based DDT structures.</dd>
<dd>
Memory Management:<ul>
<li>Allocates a new <a class="el" href="structTapeDdtHashEntry.html">TapeDdtHashEntry</a> for each sector</li>
<li>HASH_REPLACE automatically frees replaced entries</li>
<li>All hash entries remain in context until cleanup</li>
<li>The tapeDdt hash table must be freed during context destruction</li>
</ul>
</dd>
<dd>
Tape Media Characteristics:<ul>
<li>Tape sectors are typically accessed sequentially during streaming</li>
<li>File marks and partition boundaries create sparse address spaces</li>
<li>Hash table provides efficient storage for sparse sector maps</li>
<li>Supports variable block sizes common in tape formats</li>
</ul>
</dd>
<dd>
Error Handling:<ul>
<li>All errors are logged with FATAL level messages</li>
<li>Function returns false immediately on any error condition</li>
<li>TRACE logging marks entry/exit points for debugging</li>
<li>No partial state changes occur on failure</li>
</ul>
</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>The DDT entry overflow check at 0xFFFFFFF (28 bits) is critical. Exceeding this limit indicates the media is too large to fit in the current DDT format, and continuing would cause data corruption.</dd>
<dd>
This function modifies the shared tapeDdt hash table. In multi-threaded environments, external synchronization is required to prevent race conditions.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structTapeDdtHashEntry.html">TapeDdtHashEntry</a> for the hash table entry structure </dd>
<dd>
2025-12-12 12:25:02 +00:00
<a class="el" href="#a6d6ee0e6c255449cb9c2528f0f8398ec" title="Sets a DDT v2 entry for a given sector address.">set_ddt_entry_v2()</a> for the main DDT entry point that dispatches to this function </dd>
2025-10-11 01:35:43 +01:00
<dd>
get_ddt_tape() for retrieving tape DDT entries from the hash table </dd></dl>
2025-12-12 12:25:02 +00:00
<p class="definition">Definition at line <a class="el" href="ddt__v2_8c_source.html#l01782">1782</a> of file <a class="el" href="ddt__v2_8c_source.html">ddt_v2.c</a>.</p>
2025-10-11 01:35:43 +01:00
2025-12-12 12:25:02 +00:00
<p class="reference">References <a class="el" href="ddt_8h_source.html#l00154">DdtHeader2::blockAlignmentShift</a>, <a class="el" href="ddt_8h_source.html#l00155">DdtHeader2::dataShift</a>, <a class="el" href="context_8h_source.html#l00322">aaruformat_context::dirty_tape_ddt</a>, <a class="el" href="log_8h_source.html#l00040">FATAL</a>, <a class="el" href="context_8h_source.html#l00176">aaruformat_context::imageStream</a>, <a class="el" href="context_8h_source.html#l00305">aaruformat_context::is_tape</a>, <a class="el" href="context_8h_source.html#l00142">TapeDdtHashEntry::key</a>, <a class="el" href="context_8h_source.html#l00182">aaruformat_context::tape_ddt</a>, <a class="el" href="log_8h_source.html#l00025">TRACE</a>, <a class="el" href="context_8h_source.html#l00189">aaruformat_context::user_data_ddt_header</a>, and <a class="el" href="context_8h_source.html#l00143">TapeDdtHashEntry::value</a>.</p>
2025-10-11 01:35:43 +01:00
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="page-nav" class="page-nav-panel">
<div id="page-nav-resize-handle"></div>
<div id="page-nav-tree">
<div id="page-nav-contents">
</div><!-- page-nav-contents -->
</div><!-- page-nav-tree -->
</div><!-- page-nav -->
</div><!-- container -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a href="dir_a6e99c46e07b25cfb1b3942f86972439.html">ddt</a></li><li class="navelem"><a href="ddt__v2_8c.html">ddt_v2.c</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0 </li>
</ul>
</div>
</body>
</html>