Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 29c369053a983cc5d8c880dc6e0a2237 > files > 854

libdtn-devel-2.6.0-2mdv2009.1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>DTN Reference Implementation: dtn::BlockProcessor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespacedtn.html">dtn</a>::<a class="el" href="classdtn_1_1BlockProcessor.html">BlockProcessor</a>
  </div>
</div>
<div class="contents">
<h1>dtn::BlockProcessor Class Reference</h1><!-- doxytag: class="dtn::BlockProcessor" -->Base class for the protocol handling of bundle blocks, including the core primary and payload handling, security, and other extension blocks.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="BlockProcessor_8h-source.html">BlockProcessor.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for dtn::BlockProcessor:</div>
<div class="dynsection">

<p><center><img src="classdtn_1_1BlockProcessor.png" usemap="#dtn::BlockProcessor_map" border="0" alt=""></center>
<map name="dtn::BlockProcessor_map">
<area href="classdtn_1_1APIBlockProcessor.html" alt="dtn::APIBlockProcessor" shape="rect" coords="207,56,404,80">
<area href="classdtn_1_1MetadataBlockProcessor.html" alt="dtn::MetadataBlockProcessor" shape="rect" coords="207,112,404,136">
<area href="classdtn_1_1PayloadBlockProcessor.html" alt="dtn::PayloadBlockProcessor" shape="rect" coords="207,168,404,192">
<area href="classdtn_1_1PreviousHopBlockProcessor.html" alt="dtn::PreviousHopBlockProcessor" shape="rect" coords="207,224,404,248">
<area href="classdtn_1_1PrimaryBlockProcessor.html" alt="dtn::PrimaryBlockProcessor" shape="rect" coords="207,280,404,304">
<area href="classdtn_1_1SequenceIDBlockProcessor.html" alt="dtn::SequenceIDBlockProcessor" shape="rect" coords="207,336,404,360">
<area href="classdtn_1_1SessionBlockProcessor.html" alt="dtn::SessionBlockProcessor" shape="rect" coords="207,392,404,416">
<area href="classdtn_1_1UnknownBlockProcessor.html" alt="dtn::UnknownBlockProcessor" shape="rect" coords="207,448,404,472">
</map>
</div>

<p>
<a href="classdtn_1_1BlockProcessor-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c">BlockInfo::list_owner_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#149ead667d3a4181d58c5eece00b648d">list_owner_t</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Import some typedefs from other classes.  <a href="#149ead667d3a4181d58c5eece00b648d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <br class="typebreak">
<a class="el" href="classdtn_1_1BundleProtocol.html#37b000d94172c06970bb8af32889f917">BundleProtocol::status_report_reason_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#524564f90433756eb2bcfd815e70c0e1">status_report_reason_t</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Import some typedefs from other classes.  <a href="#524564f90433756eb2bcfd815e70c0e1"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void()&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#65e98938e66022edf2971fa59721a782">process_func</a> (const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *caller_block, const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *target_block, const void *<a class="el" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>, size_t len, OpaqueContext *r)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef for a process function pointer.  <a href="#65e98938e66022edf2971fa59721a782"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>()&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#17f2dd5627da39aab829ef8dfc37b252">mutate_func</a> (const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *caller_block, <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *target_block, void *<a class="el" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>, size_t len, OpaqueContext *context)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef for a mutate function pointer.  <a href="#17f2dd5627da39aab829ef8dfc37b252"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#b1578b54c23dee910a62937b5c4f9484">BlockProcessor</a> (int block_type)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor that takes the block typecode.  <a href="#b1578b54c23dee910a62937b5c4f9484"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#bee24525fc2b941b4849985b1397f699">~BlockProcessor</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual destructor.  <a href="#bee24525fc2b941b4849985b1397f699"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#1f73d119593ef13da9c5ee845fd5ec00">consume</a> (<a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *block, u_char *<a class="el" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>, size_t len)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">First callback for parsing blocks that is expected to append a chunk of the given data to the given block.  <a href="#1f73d119593ef13da9c5ee845fd5ec00"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#95caddbca046da1a05538359c351f644">reload_post_process</a> (<a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, <a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *block_list, <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *block)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Perform any needed action in the case where a block/bundle has been reloaded from store.  <a href="#95caddbca046da1a05538359c351f644"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#14242dcdb094a179f718a5eaee23cabd">validate</a> (const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, <a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *block_list, <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *block, <a class="el" href="classdtn_1_1BundleProtocol.html#37b000d94172c06970bb8af32889f917">status_report_reason_t</a> *reception_reason, <a class="el" href="classdtn_1_1BundleProtocol.html#37b000d94172c06970bb8af32889f917">status_report_reason_t</a> *deletion_reason)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Validate the block.  <a href="#14242dcdb094a179f718a5eaee23cabd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#f7c21ecdcbbb4f2060c7f5f865415c48">prepare</a> (const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, <a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *xmit_blocks, const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *source, const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> &amp;link, <a class="el" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c">list_owner_t</a> list)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">First callback to generate blocks for the output pass.  <a href="#f7c21ecdcbbb4f2060c7f5f865415c48"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#93079be0f3f307ae9a800106a9518f3e">generate</a> (const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, <a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *xmit_blocks, <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *block, const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> &amp;link, <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> last)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Second callback for transmitting a bundle.  <a href="#93079be0f3f307ae9a800106a9518f3e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#0256b44d0f9f42b1f36054c68444de6c">finalize</a> (const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, <a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *xmit_blocks, <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *block, const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> &amp;link)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Third callback for transmitting a bundle.  <a href="#0256b44d0f9f42b1f36054c68444de6c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#4e9295a532828f2cc6a20fb9f95a69c9">process</a> (process_func *func, const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *caller_block, const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *target_block, size_t offset, size_t len, OpaqueContext *context)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Accessor to virtualize read-only processing contents of the block in various ways.  <a href="#4e9295a532828f2cc6a20fb9f95a69c9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#05bcb879796314ae4a2c0d909277c008">mutate</a> (mutate_func *func, <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *caller_block, <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *target_block, size_t offset, size_t len, OpaqueContext *context)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Similar to <a class="el" href="classdtn_1_1BlockProcessor.html#4e9295a532828f2cc6a20fb9f95a69c9" title="Accessor to virtualize read-only processing contents of the block in various ways...">process()</a> but for potentially mutating processing functions.  <a href="#05bcb879796314ae4a2c0d909277c008"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#f7307eeed9add202cbaa215e48c3d5da">produce</a> (const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *bundle, const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *block, u_char *<a class="el" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>, size_t offset, size_t len)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Accessor to virtualize copying contents out from the block info.  <a href="#f7307eeed9add202cbaa215e48c3d5da"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#e0866915affada343af6b8d8b16bf354">init_block</a> (<a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *block, <a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *block_list, u_int8_t type, u_int8_t flags, const u_char *bp, size_t len)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">General hook to set up a block with the given contents.  <a href="#e0866915affada343af6b8d8b16bf354"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#5a5794eea1bd61dfbef1a691ef9f8d97">block_type</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Accessors.  <a href="#5a5794eea1bd61dfbef1a691ef9f8d97"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#16d1b8a2805b0888536bd001ce5e9e5b">consume_preamble</a> (<a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *recv_blocks, <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *block, u_char *<a class="el" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>, size_t len, u_int64_t *flagp=NULL)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Consume a block preamble consisting of type, flags(SDNV), EID-list (composite field of SDNVs) and length(SDNV).  <a href="#16d1b8a2805b0888536bd001ce5e9e5b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#c08f7b82f6049f30710a5dcdebb61ce7">generate_preamble</a> (<a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *xmit_blocks, <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *block, u_int8_t type, u_int64_t flags, u_int64_t data_length)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generate the standard preamble for the given block type, flags, EID-list and content length.  <a href="#c08f7b82f6049f30710a5dcdebb61ce7"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#4487fbc9a5a8270f1e3018d79dc25b4c">block_type_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The block typecode for this handler.  <a href="#4487fbc9a5a8270f1e3018d79dc25b4c"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#226a2c8d06ec75da24a71e730275802b">BundleProtocol</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#f60b1c05e77bb387f21aaff2c8ac532b">BlockInfo</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1BlockProcessor.html#59e06d8d4aeedf6e845673edd9a295e3">Ciphersuite</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Base class for the protocol handling of bundle blocks, including the core primary and payload handling, security, and other extension blocks. 
<p>Definition at line <a class="el" href="BlockProcessor_8h-source.html#l00042">42</a> of file <a class="el" href="BlockProcessor_8h-source.html">BlockProcessor.h</a>.</p>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="149ead667d3a4181d58c5eece00b648d"></a><!-- doxytag: member="dtn::BlockProcessor::list_owner_t" ref="149ead667d3a4181d58c5eece00b648d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c">BlockInfo::list_owner_t</a> <a class="el" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c">dtn::BlockProcessor::list_owner_t</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Import some typedefs from other classes. 
<p>

<p>Definition at line <a class="el" href="BlockProcessor_8h-source.html#l00064">64</a> of file <a class="el" href="BlockProcessor_8h-source.html">BlockProcessor.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="524564f90433756eb2bcfd815e70c0e1"></a><!-- doxytag: member="dtn::BlockProcessor::status_report_reason_t" ref="524564f90433756eb2bcfd815e70c0e1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classdtn_1_1BundleProtocol.html#37b000d94172c06970bb8af32889f917">BundleProtocol::status_report_reason_t</a> <a class="el" href="classdtn_1_1BundleProtocol.html#37b000d94172c06970bb8af32889f917">dtn::BlockProcessor::status_report_reason_t</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Import some typedefs from other classes. 
<p>

<p>Definition at line <a class="el" href="BlockProcessor_8h-source.html#l00065">65</a> of file <a class="el" href="BlockProcessor_8h-source.html">BlockProcessor.h</a>.</p>

</div>
</div><p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="b1578b54c23dee910a62937b5c4f9484"></a><!-- doxytag: member="dtn::BlockProcessor::BlockProcessor" ref="b1578b54c23dee910a62937b5c4f9484" args="(int block_type)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dtn::BlockProcessor::BlockProcessor           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>block_type</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor that takes the block typecode. 
<p>
Generally, typecodes should be defined in <a class="el" href="classdtn_1_1BundleProtocol.html#54a44c247b3c20b4ed11e29494284ca7" title="Valid type codes for bundle blocks.">BundleProtocol::bundle_block_type_t</a>, but the field is defined as an int so that handlers for non-specified blocks can be defined. 
<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00033">33</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

<p>References <a class="el" href="BlockProcessor_8cc-source.html#l00030">dtn::log</a>.</p>

</div>
</div><p>
<a class="anchor" name="bee24525fc2b941b4849985b1397f699"></a><!-- doxytag: member="dtn::BlockProcessor::~BlockProcessor" ref="bee24525fc2b941b4849985b1397f699" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dtn::BlockProcessor::~BlockProcessor           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Virtual destructor. 
<p>

<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00041">41</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="5a5794eea1bd61dfbef1a691ef9f8d97"></a><!-- doxytag: member="dtn::BlockProcessor::block_type" ref="5a5794eea1bd61dfbef1a691ef9f8d97" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int dtn::BlockProcessor::block_type           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Accessors. 
<p>

<p>Definition at line <a class="el" href="BlockProcessor_8h-source.html#l00082">82</a> of file <a class="el" href="BlockProcessor_8h-source.html">BlockProcessor.h</a>.</p>

<p>References <a class="el" href="BlockProcessor_8h-source.html#l00268">block_type_</a>.</p>

<p>Referenced by <a class="el" href="SequenceIDBlockProcessor_8cc-source.html#l00142">dtn::SequenceIDBlockProcessor::consume()</a>, <a class="el" href="BundleProtocol_8cc-source.html#l00374">dtn::BundleProtocol::consume()</a>, <a class="el" href="BlockProcessor_8cc-source.html#l00284">consume()</a>, <a class="el" href="BlockProcessor_8cc-source.html#l00047">consume_preamble()</a>, <a class="el" href="BundleProtocol_8cc-source.html#l00249">dtn::BundleProtocol::delete_blocks()</a>, <a class="el" href="SequenceIDBlockProcessor_8cc-source.html#l00061">dtn::SequenceIDBlockProcessor::generate()</a>, <a class="el" href="MetadataBlockProcessor_8cc-source.html#l00210">dtn::MetadataBlockProcessor::generate()</a>, <a class="el" href="BlockProcessor_8cc-source.html#l00206">generate_preamble()</a>, <a class="el" href="SequenceIDBlockProcessor_8cc-source.html#l00040">dtn::SequenceIDBlockProcessor::prepare()</a>, <a class="el" href="BundleProtocol_8cc-source.html#l00105">dtn::BundleProtocol::prepare_blocks()</a>, <a class="el" href="BundleProtocol_8cc-source.html#l00053">dtn::BundleProtocol::register_processor()</a>, and <a class="el" href="BlockInfo_8cc-source.html#l00094">dtn::BlockInfo::type()</a>.</p>

</div>
</div><p>
<a class="anchor" name="1f73d119593ef13da9c5ee845fd5ec00"></a><!-- doxytag: member="dtn::BlockProcessor::consume" ref="1f73d119593ef13da9c5ee845fd5ec00" args="(Bundle *bundle, BlockInfo *block, u_char *buf, size_t len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int dtn::BlockProcessor::consume           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
First callback for parsing blocks that is expected to append a chunk of the given data to the given block. 
<p>
When the block is completely received, this should also parse the block into any fields in the bundle class.<p>
The base class implementation parses the block preamble fields to find the length of the block and copies the preamble and the data in the block's contents buffer.<p>
This and all derived implementations must be able to handle a block that is received in chunks, including cases where the preamble is split into multiple chunks.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the amount of data consumed or -1 on error </dd></dl>

<p>Reimplemented in <a class="el" href="classdtn_1_1APIBlockProcessor.html#f1f1e31555a6065383178d8f2b009a39">dtn::APIBlockProcessor</a>, <a class="el" href="classdtn_1_1MetadataBlockProcessor.html#92e1b37e43c0bbd92f328d3ede10b78e">dtn::MetadataBlockProcessor</a>, <a class="el" href="classdtn_1_1PayloadBlockProcessor.html#ac4a81f447e0ae6b4ef471d5a1810809">dtn::PayloadBlockProcessor</a>, <a class="el" href="classdtn_1_1PreviousHopBlockProcessor.html#26519a10c6876ead92bdd5e5a0fc745b">dtn::PreviousHopBlockProcessor</a>, <a class="el" href="classdtn_1_1PrimaryBlockProcessor.html#6e5c41fd30e22ae3d0e1f9f4ce3dec22">dtn::PrimaryBlockProcessor</a>, <a class="el" href="classdtn_1_1SequenceIDBlockProcessor.html#2d740ccdc95ad2a1ff6cde373d30cb08">dtn::SequenceIDBlockProcessor</a>, and <a class="el" href="classdtn_1_1SessionBlockProcessor.html#5a0b9377c4f3339154f92ed9bc27e4c7">dtn::SessionBlockProcessor</a>.</p>

<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00284">284</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

<p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="BlockProcessor_8h-source.html#l00082">block_type()</a>, <a class="el" href="BlockInfo_8h-source.html#l00083">dtn::BlockInfo::complete()</a>, <a class="el" href="BlockProcessor_8cc-source.html#l00047">consume_preamble()</a>, <a class="el" href="BlockInfo_8h-source.html#l00075">dtn::BlockInfo::contents()</a>, <a class="el" href="BlockInfo_8h-source.html#l00077">dtn::BlockInfo::data_length()</a>, <a class="el" href="BlockInfo_8h-source.html#l00078">dtn::BlockInfo::data_offset()</a>, <a class="el" href="BlockInfo_8h-source.html#l00079">dtn::BlockInfo::full_length()</a>, <a class="el" href="BlockProcessor_8cc-source.html#l00030">dtn::log</a>, <a class="el" href="bundling_2Bundle_8h-source.html#l00278">dtn::Bundle::mutable_recv_blocks()</a>, <a class="el" href="BlockInfo_8h-source.html#l00091">dtn::BlockInfo::set_complete()</a>, <a class="el" href="BlockInfo_8cc-source.html#l00094">dtn::BlockInfo::type()</a>, and <a class="el" href="BlockInfo_8h-source.html#l00094">dtn::BlockInfo::writable_contents()</a>.</p>

<p>Referenced by <a class="el" href="BundleProtocol_8cc-source.html#l00374">dtn::BundleProtocol::consume()</a>.</p>

</div>
</div><p>
<a class="anchor" name="16d1b8a2805b0888536bd001ce5e9e5b"></a><!-- doxytag: member="dtn::BlockProcessor::consume_preamble" ref="16d1b8a2805b0888536bd001ce5e9e5b" args="(BlockInfoVec *recv_blocks, BlockInfo *block, u_char *buf, size_t len, u_int64_t *flagp=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int dtn::BlockProcessor::consume_preamble           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *&nbsp;</td>
          <td class="paramname"> <em>recv_blocks</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_int64_t *&nbsp;</td>
          <td class="paramname"> <em>flagp</em> = <code>NULL</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Consume a block preamble consisting of type, flags(SDNV), EID-list (composite field of SDNVs) and length(SDNV). 
<p>
This method does not apply to the primary block, but is suitable for payload and all extensions. 
<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00047">47</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

<p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="BundleProtocol_8h-source.html#l00202">dtn::BundleProtocol::BLOCK_FLAG_EID_REFS</a>, <a class="el" href="BlockProcessor_8h-source.html#l00082">block_type()</a>, <a class="el" href="BlockInfo_8h-source.html#l00083">dtn::BlockInfo::complete()</a>, <a class="el" href="BlockInfo_8h-source.html#l00075">dtn::BlockInfo::contents()</a>, <a class="el" href="BlockInfo_8h-source.html#l00077">dtn::BlockInfo::data_length()</a>, <a class="el" href="BlockInfo_8h-source.html#l00078">dtn::BlockInfo::data_offset()</a>, <a class="el" href="SDNV_8cc-source.html#l00117">decode()</a>, <a class="el" href="BlockInfo_8h-source.html#l00161">dtn::BlockInfoVec::dict()</a>, <a class="el" href="BlockInfo_8h-source.html#l00074">dtn::BlockInfo::eid_list()</a>, <a class="el" href="bundling_2Dictionary_8cc-source.html#l00131">dtn::Dictionary::extract_eid()</a>, <a class="el" href="BlockInfo_8h-source.html#l00079">dtn::BlockInfo::full_length()</a>, <a class="el" href="BlockProcessor_8cc-source.html#l00030">dtn::log</a>, <a class="el" href="SDNV_8cc-source.html#l00054">log_err_p</a>, <a class="el" href="BundleProtocol_8h-source.html#l00170">dtn::BundleProtocol::PREAMBLE_FIXED_LENGTH</a>, <a class="el" href="BlockInfo_8h-source.html#l00092">dtn::BlockInfo::set_data_length()</a>, <a class="el" href="BlockInfo_8h-source.html#l00093">dtn::BlockInfo::set_data_offset()</a>, <a class="el" href="BlockInfo_8h-source.html#l00090">dtn::BlockInfo::set_eid_list()</a>, and <a class="el" href="BlockInfo_8h-source.html#l00094">dtn::BlockInfo::writable_contents()</a>.</p>

<p>Referenced by <a class="el" href="PayloadBlockProcessor_8cc-source.html#l00035">dtn::PayloadBlockProcessor::consume()</a>, and <a class="el" href="BlockProcessor_8cc-source.html#l00284">consume()</a>.</p>

</div>
</div><p>
<a class="anchor" name="0256b44d0f9f42b1f36054c68444de6c"></a><!-- doxytag: member="dtn::BlockProcessor::finalize" ref="0256b44d0f9f42b1f36054c68444de6c" args="(const Bundle *bundle, BlockInfoVec *xmit_blocks, BlockInfo *block, const LinkRef &amp;link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int dtn::BlockProcessor::finalize           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *&nbsp;</td>
          <td class="paramname"> <em>xmit_blocks</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>link</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Third callback for transmitting a bundle. 
<p>
This pass should generate any data (such as security signatures) for the block that may depend on other blocks' contents.<p>
The base class implementation does nothing.<p>
We pass xmit_blocks explicitly to indicate that ALL blocks might be changed by finalize, typically by being encrypted. Parameters such as length might also change due to padding and encapsulation. 
<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00433">433</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

<p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="BundleProtocol_8h-source.html#l00197">dtn::BundleProtocol::BLOCK_FLAG_REPORT_ONERROR</a>, <a class="el" href="BlockProcessor_8h-source.html#l00034">BP_SUCCESS</a>, <a class="el" href="BlockInfo_8cc-source.html#l00118">dtn::BlockInfo::flags()</a>, <a class="el" href="bundling_2Bundle_8h-source.html#l00210">dtn::Bundle::is_admin()</a>, <a class="el" href="BundleProtocol_8h-source.html#l00177">dtn::BundleProtocol::PRIMARY_BLOCK</a>, and <a class="el" href="BlockInfo_8cc-source.html#l00094">dtn::BlockInfo::type()</a>.</p>

</div>
</div><p>
<a class="anchor" name="93079be0f3f307ae9a800106a9518f3e"></a><!-- doxytag: member="dtn::BlockProcessor::generate" ref="93079be0f3f307ae9a800106a9518f3e" args="(const Bundle *bundle, BlockInfoVec *xmit_blocks, BlockInfo *block, const LinkRef &amp;link, bool last)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int dtn::BlockProcessor::generate           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *&nbsp;</td>
          <td class="paramname"> <em>xmit_blocks</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>&nbsp;</td>
          <td class="paramname"> <em>last</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Second callback for transmitting a bundle. 
<p>
This pass should generate any data for the block that does not depend on other blocks' contents. It MUST add any EID references it needs by calling block-&gt;add_eid(), then call <a class="el" href="classdtn_1_1BlockProcessor.html#c08f7b82f6049f30710a5dcdebb61ce7" title="Generate the standard preamble for the given block type, flags, EID-list and content...">generate_preamble()</a>, which will add the EIDs to the primary block's dictionary and write their offsets to this block's preamble. 
<p>Implemented in <a class="el" href="classdtn_1_1APIBlockProcessor.html#b0b0e9cd6ba6360ecf479a4d0ced218f">dtn::APIBlockProcessor</a>, <a class="el" href="classdtn_1_1MetadataBlockProcessor.html#3bb5baa33e5a4ab2883ce70907d9934c">dtn::MetadataBlockProcessor</a>, <a class="el" href="classdtn_1_1PayloadBlockProcessor.html#89d655b936e37b55f3b080d23f2a2e7c">dtn::PayloadBlockProcessor</a>, <a class="el" href="classdtn_1_1PreviousHopBlockProcessor.html#b22318bae2a6c191334c3ddf9837aee2">dtn::PreviousHopBlockProcessor</a>, <a class="el" href="classdtn_1_1PrimaryBlockProcessor.html#75c9dac1627305cebd6401dd1e86e95a">dtn::PrimaryBlockProcessor</a>, <a class="el" href="classdtn_1_1SequenceIDBlockProcessor.html#3cc0be9fc3991ac7adba940b143d24f2">dtn::SequenceIDBlockProcessor</a>, <a class="el" href="classdtn_1_1SessionBlockProcessor.html#7c1a00550f5109a7dd09a6f018bed4eb">dtn::SessionBlockProcessor</a>, and <a class="el" href="classdtn_1_1UnknownBlockProcessor.html#d79d87faec3e2573635ff08f1185dea6">dtn::UnknownBlockProcessor</a>.</p>

</div>
</div><p>
<a class="anchor" name="c08f7b82f6049f30710a5dcdebb61ce7"></a><!-- doxytag: member="dtn::BlockProcessor::generate_preamble" ref="c08f7b82f6049f30710a5dcdebb61ce7" args="(BlockInfoVec *xmit_blocks, BlockInfo *block, u_int8_t type, u_int64_t flags, u_int64_t data_length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dtn::BlockProcessor::generate_preamble           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *&nbsp;</td>
          <td class="paramname"> <em>xmit_blocks</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_int8_t&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_int64_t&nbsp;</td>
          <td class="paramname"> <em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_int64_t&nbsp;</td>
          <td class="paramname"> <em>data_length</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Generate the standard preamble for the given block type, flags, EID-list and content length. 
<p>

<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00206">206</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

<p>References <a class="el" href="bundling_2Dictionary_8h-source.html#l00052">dtn::Dictionary::add_eid()</a>, <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="BundleProtocol_8h-source.html#l00202">dtn::BundleProtocol::BLOCK_FLAG_EID_REFS</a>, <a class="el" href="BlockProcessor_8h-source.html#l00082">block_type()</a>, <a class="el" href="BlockInfo_8h-source.html#l00075">dtn::BlockInfo::contents()</a>, <a class="el" href="BlockInfo_8h-source.html#l00077">dtn::BlockInfo::data_length()</a>, <a class="el" href="BlockInfo_8h-source.html#l00078">dtn::BlockInfo::data_offset()</a>, <a class="el" href="BlockInfo_8h-source.html#l00161">dtn::BlockInfoVec::dict()</a>, <a class="el" href="BlockInfo_8h-source.html#l00074">dtn::BlockInfo::eid_list()</a>, <a class="el" href="SDNV_8cc-source.html#l00062">encode()</a>, <a class="el" href="SDNV_8cc-source.html#l00107">encoding_len()</a>, <a class="el" href="BlockInfo_8cc-source.html#l00118">dtn::BlockInfo::flags()</a>, <a class="el" href="bundling_2Dictionary_8h-source.html#l00070">dtn::Dictionary::get_offsets()</a>, <a class="el" href="num2sdnv_8c-source.html#l00034">len</a>, <a class="el" href="BlockProcessor_8cc-source.html#l00030">dtn::log</a>, <a class="el" href="BundleProtocol_8h-source.html#l00170">dtn::BundleProtocol::PREAMBLE_FIXED_LENGTH</a>, <a class="el" href="BlockInfo_8h-source.html#l00092">dtn::BlockInfo::set_data_length()</a>, <a class="el" href="BlockInfo_8h-source.html#l00093">dtn::BlockInfo::set_data_offset()</a>, <a class="el" href="BlockInfo_8cc-source.html#l00094">dtn::BlockInfo::type()</a>, and <a class="el" href="BlockInfo_8h-source.html#l00094">dtn::BlockInfo::writable_contents()</a>.</p>

<p>Referenced by <a class="el" href="UnknownBlockProcessor_8cc-source.html#l00068">dtn::UnknownBlockProcessor::generate()</a>, <a class="el" href="SessionBlockProcessor_8cc-source.html#l00054">dtn::SessionBlockProcessor::generate()</a>, <a class="el" href="SequenceIDBlockProcessor_8cc-source.html#l00061">dtn::SequenceIDBlockProcessor::generate()</a>, <a class="el" href="PreviousHopBlockProcessor_8cc-source.html#l00052">dtn::PreviousHopBlockProcessor::generate()</a>, <a class="el" href="PayloadBlockProcessor_8cc-source.html#l00158">dtn::PayloadBlockProcessor::generate()</a>, <a class="el" href="MetadataBlockProcessor_8cc-source.html#l00210">dtn::MetadataBlockProcessor::generate()</a>, <a class="el" href="APIBlockProcessor_8cc-source.html#l00054">dtn::APIBlockProcessor::generate()</a>, and <a class="el" href="BlockProcessor_8cc-source.html#l00510">init_block()</a>.</p>

</div>
</div><p>
<a class="anchor" name="e0866915affada343af6b8d8b16bf354"></a><!-- doxytag: member="dtn::BlockProcessor::init_block" ref="e0866915affada343af6b8d8b16bf354" args="(BlockInfo *block, BlockInfoVec *block_list, u_int8_t type, u_int8_t flags, const u_char *bp, size_t len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dtn::BlockProcessor::init_block           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *&nbsp;</td>
          <td class="paramname"> <em>block_list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_int8_t&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_int8_t&nbsp;</td>
          <td class="paramname"> <em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const u_char *&nbsp;</td>
          <td class="paramname"> <em>bp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
General hook to set up a block with the given contents. 
<p>
Used for testing generic extension blocks. 
<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00510">510</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

<p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="BlockInfo_8h-source.html#l00078">dtn::BlockInfo::data_offset()</a>, <a class="el" href="BlockInfo_8h-source.html#l00079">dtn::BlockInfo::full_length()</a>, <a class="el" href="BlockProcessor_8cc-source.html#l00206">generate_preamble()</a>, <a class="el" href="BlockInfo_8h-source.html#l00072">dtn::BlockInfo::owner()</a>, and <a class="el" href="BlockInfo_8h-source.html#l00094">dtn::BlockInfo::writable_contents()</a>.</p>

</div>
</div><p>
<a class="anchor" name="05bcb879796314ae4a2c0d909277c008"></a><!-- doxytag: member="dtn::BlockProcessor::mutate" ref="05bcb879796314ae4a2c0d909277c008" args="(mutate_func *func, Bundle *bundle, const BlockInfo *caller_block, BlockInfo *target_block, size_t offset, size_t len, OpaqueContext *context)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::BlockProcessor::mutate           </td>
          <td>(</td>
          <td class="paramtype">mutate_func *&nbsp;</td>
          <td class="paramname"> <em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>caller_block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>target_block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">OpaqueContext *&nbsp;</td>
          <td class="paramname"> <em>context</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Similar to <a class="el" href="classdtn_1_1BlockProcessor.html#4e9295a532828f2cc6a20fb9f95a69c9" title="Accessor to virtualize read-only processing contents of the block in various ways...">process()</a> but for potentially mutating processing functions. 
<p>
The function returns true iff it modified the target_block. 
<p>Reimplemented in <a class="el" href="classdtn_1_1PayloadBlockProcessor.html#70cec440e670c7380531344e7cccd272">dtn::PayloadBlockProcessor</a>.</p>

<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00472">472</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

<p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="num2sdnv_8c-source.html#l00035">buf</a>, <a class="el" href="BlockInfo_8h-source.html#l00075">dtn::BlockInfo::contents()</a>, and <a class="el" href="num2sdnv_8c-source.html#l00034">len</a>.</p>

</div>
</div><p>
<a class="anchor" name="17f2dd5627da39aab829ef8dfc37b252"></a><!-- doxytag: member="dtn::BlockProcessor::mutate_func" ref="17f2dd5627da39aab829ef8dfc37b252" args="(const Bundle *bundle, const BlockInfo *caller_block, BlockInfo *target_block, void *buf, size_t len, OpaqueContext *context)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a>() dtn::BlockProcessor::mutate_func           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>caller_block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>target_block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">OpaqueContext *&nbsp;</td>
          <td class="paramname"> <em>context</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Typedef for a mutate function pointer. 
<p>

</div>
</div><p>
<a class="anchor" name="f7c21ecdcbbb4f2060c7f5f865415c48"></a><!-- doxytag: member="dtn::BlockProcessor::prepare" ref="f7c21ecdcbbb4f2060c7f5f865415c48" args="(const Bundle *bundle, BlockInfoVec *xmit_blocks, const BlockInfo *source, const LinkRef &amp;link, list_owner_t list)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int dtn::BlockProcessor::prepare           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *&nbsp;</td>
          <td class="paramname"> <em>xmit_blocks</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e">LinkRef</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfo.html#3d0bc8cd207912ac5406fde3fc2c8d1c">list_owner_t</a>&nbsp;</td>
          <td class="paramname"> <em>list</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
First callback to generate blocks for the output pass. 
<p>
The function is expected to initialize an appropriate <a class="el" href="classdtn_1_1BlockInfo.html" title="Class used to store unparsed bundle blocks and associated metadata about them.">BlockInfo</a> structure in the given <a class="el" href="classdtn_1_1BlockInfoVec.html" title="Class for a vector of BlockInfo structures.">BlockInfoVec</a>.<p>
The base class simply initializes an empty <a class="el" href="classdtn_1_1BlockInfo.html" title="Class used to store unparsed bundle blocks and associated metadata about them.">BlockInfo</a> with the appropriate owner_ pointer. 
<p>Reimplemented in <a class="el" href="classdtn_1_1MetadataBlockProcessor.html#63f5d0f32404210cd68b6601d7abc748">dtn::MetadataBlockProcessor</a>, <a class="el" href="classdtn_1_1PreviousHopBlockProcessor.html#cad5cdc3eb71ae43f9c0dfbea80383bb">dtn::PreviousHopBlockProcessor</a>, <a class="el" href="classdtn_1_1PrimaryBlockProcessor.html#a3a1005ed5dedac560fa0e694504fa24">dtn::PrimaryBlockProcessor</a>, <a class="el" href="classdtn_1_1SequenceIDBlockProcessor.html#f9c84add162d4cbd291efbe3b4b29691">dtn::SequenceIDBlockProcessor</a>, <a class="el" href="classdtn_1_1SessionBlockProcessor.html#11e5c11d9bf92e47f70b9a4798b82b01">dtn::SessionBlockProcessor</a>, and <a class="el" href="classdtn_1_1UnknownBlockProcessor.html#1c7169065341410fe4c23c6b6d48dccb">dtn::UnknownBlockProcessor</a>.</p>

<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00406">406</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

<p>References <a class="el" href="BlockInfo_8cc-source.html#l00195">dtn::BlockInfoVec::append_block()</a>, <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="BlockProcessor_8h-source.html#l00241">BlockInfo</a>, <a class="el" href="BlockProcessor_8h-source.html#l00034">BP_SUCCESS</a>, <a class="el" href="BlockInfo_8h-source.html#l00065">dtn::BlockInfo::LIST_RECEIVED</a>, and <a class="el" href="BundleProtocol_8h-source.html#l00177">dtn::BundleProtocol::PRIMARY_BLOCK</a>.</p>

<p>Referenced by <a class="el" href="BundleProtocol_8cc-source.html#l00105">dtn::BundleProtocol::prepare_blocks()</a>.</p>

</div>
</div><p>
<a class="anchor" name="4e9295a532828f2cc6a20fb9f95a69c9"></a><!-- doxytag: member="dtn::BlockProcessor::process" ref="4e9295a532828f2cc6a20fb9f95a69c9" args="(process_func *func, const Bundle *bundle, const BlockInfo *caller_block, const BlockInfo *target_block, size_t offset, size_t len, OpaqueContext *context)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dtn::BlockProcessor::process           </td>
          <td>(</td>
          <td class="paramtype">process_func *&nbsp;</td>
          <td class="paramname"> <em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>caller_block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>target_block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">OpaqueContext *&nbsp;</td>
          <td class="paramname"> <em>context</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Accessor to virtualize read-only processing contents of the block in various ways. 
<p>
This is overloaded by the payload since the contents are not actually stored in the <a class="el" href="classdtn_1_1BlockInfo.html" title="Class used to store unparsed bundle blocks and associated metadata about them.">BlockInfo</a> contents_ buffer but rather are on-disk.<p>
Processing can be anything the calling routine wishes, such as digest of the block, encryption, decryption etc. This routine is permitted to process the data in several calls to the target "func" routine as long as the data is processed in order and exactly once.<p>
Note that the supplied offset + length must be less than or equal to the total length of the block. 
<p>Reimplemented in <a class="el" href="classdtn_1_1PayloadBlockProcessor.html#2f698522931b3cc8704e607aa567c01c">dtn::PayloadBlockProcessor</a>.</p>

<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00450">450</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

<p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="num2sdnv_8c-source.html#l00035">buf</a>, <a class="el" href="BlockInfo_8h-source.html#l00075">dtn::BlockInfo::contents()</a>, and <a class="el" href="num2sdnv_8c-source.html#l00034">len</a>.</p>

</div>
</div><p>
<a class="anchor" name="65e98938e66022edf2971fa59721a782"></a><!-- doxytag: member="dtn::BlockProcessor::process_func" ref="65e98938e66022edf2971fa59721a782" args="(const Bundle *bundle, const BlockInfo *caller_block, const BlockInfo *target_block, const void *buf, size_t len, OpaqueContext *r)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void() dtn::BlockProcessor::process_func           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>caller_block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>target_block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">OpaqueContext *&nbsp;</td>
          <td class="paramname"> <em>r</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Typedef for a process function pointer. 
<p>

</div>
</div><p>
<a class="anchor" name="f7307eeed9add202cbaa215e48c3d5da"></a><!-- doxytag: member="dtn::BlockProcessor::produce" ref="f7307eeed9add202cbaa215e48c3d5da" args="(const Bundle *bundle, const BlockInfo *block, u_char *buf, size_t offset, size_t len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dtn::BlockProcessor::produce           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Accessor to virtualize copying contents out from the block info. 
<p>
This is overloaded by the payload since the contents are not actually stored in the <a class="el" href="classdtn_1_1BlockInfo.html" title="Class used to store unparsed bundle blocks and associated metadata about them.">BlockInfo</a> contents_ buffer but rather are on-disk.<p>
The base class implementation simply does a memcpy from the contents into the supplied buffer.<p>
Note that the supplied offset + length must be less than or equal to the total length of the block. 
<p>Reimplemented in <a class="el" href="classdtn_1_1PayloadBlockProcessor.html#4a0313f82c40de4dc6198ac6edba1523">dtn::PayloadBlockProcessor</a>.</p>

<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00496">496</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

<p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>, <a class="el" href="BlockInfo_8h-source.html#l00075">dtn::BlockInfo::contents()</a>, and <a class="el" href="num2sdnv_8c-source.html#l00034">len</a>.</p>

</div>
</div><p>
<a class="anchor" name="95caddbca046da1a05538359c351f644"></a><!-- doxytag: member="dtn::BlockProcessor::reload_post_process" ref="95caddbca046da1a05538359c351f644" args="(Bundle *bundle, BlockInfoVec *block_list, BlockInfo *block)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int dtn::BlockProcessor::reload_post_process           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *&nbsp;</td>
          <td class="paramname"> <em>block_list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>block</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Perform any needed action in the case where a block/bundle has been reloaded from store. 
<p>

<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00392">392</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

<p>References <a class="el" href="BlockInfo_8h-source.html#l00097">dtn::BlockInfo::set_reloaded()</a>.</p>

</div>
</div><p>
<a class="anchor" name="14242dcdb094a179f718a5eaee23cabd"></a><!-- doxytag: member="dtn::BlockProcessor::validate" ref="14242dcdb094a179f718a5eaee23cabd" args="(const Bundle *bundle, BlockInfoVec *block_list, BlockInfo *block, status_report_reason_t *reception_reason, status_report_reason_t *deletion_reason)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::BlockProcessor::validate           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classdtn_1_1Bundle.html">Bundle</a> *&nbsp;</td>
          <td class="paramname"> <em>bundle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfoVec.html">BlockInfoVec</a> *&nbsp;</td>
          <td class="paramname"> <em>block_list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a> *&nbsp;</td>
          <td class="paramname"> <em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BundleProtocol.html#37b000d94172c06970bb8af32889f917">status_report_reason_t</a> *&nbsp;</td>
          <td class="paramname"> <em>reception_reason</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdtn_1_1BundleProtocol.html#37b000d94172c06970bb8af32889f917">status_report_reason_t</a> *&nbsp;</td>
          <td class="paramname"> <em>deletion_reason</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Validate the block. 
<p>
This is called after all blocks in the bundle have been fully received.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if the block passes validation </dd></dl>

<p>Reimplemented in <a class="el" href="classdtn_1_1MetadataBlockProcessor.html#679fdea0736757a843cc9075d22ff515">dtn::MetadataBlockProcessor</a>, <a class="el" href="classdtn_1_1PayloadBlockProcessor.html#27c437be9873cec504bc8d54f6e1fd3c">dtn::PayloadBlockProcessor</a>, <a class="el" href="classdtn_1_1PrimaryBlockProcessor.html#2fbc1715b03d51dddd4517414335502c">dtn::PrimaryBlockProcessor</a>, and <a class="el" href="classdtn_1_1UnknownBlockProcessor.html#446c8a648957e850d53dd1e78f5e4ea0">dtn::UnknownBlockProcessor</a>.</p>

<p>Definition at line <a class="el" href="BlockProcessor_8cc-source.html#l00365">365</a> of file <a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a>.</p>

<p>References <a class="el" href="BundleProtocol_8h-source.html#l00197">dtn::BundleProtocol::BLOCK_FLAG_REPORT_ONERROR</a>, <a class="el" href="BlockInfo_8cc-source.html#l00118">dtn::BlockInfo::flags()</a>, <a class="el" href="bundling_2Bundle_8h-source.html#l00210">dtn::Bundle::is_admin()</a>, <a class="el" href="BlockProcessor_8cc-source.html#l00030">dtn::log</a>, <a class="el" href="SDNV_8cc-source.html#l00054">log_err_p</a>, <a class="el" href="BundleProtocol_8h-source.html#l00177">dtn::BundleProtocol::PRIMARY_BLOCK</a>, <a class="el" href="BundleProtocol_8h-source.html#l00132">dtn::BundleProtocol::REASON_BLOCK_UNINTELLIGIBLE</a>, and <a class="el" href="BlockInfo_8cc-source.html#l00094">dtn::BlockInfo::type()</a>.</p>

<p>Referenced by <a class="el" href="UnknownBlockProcessor_8cc-source.html#l00121">dtn::UnknownBlockProcessor::validate()</a>, <a class="el" href="PayloadBlockProcessor_8cc-source.html#l00118">dtn::PayloadBlockProcessor::validate()</a>, and <a class="el" href="MetadataBlockProcessor_8cc-source.html#l00067">dtn::MetadataBlockProcessor::validate()</a>.</p>

</div>
</div><p>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="f60b1c05e77bb387f21aaff2c8ac532b"></a><!-- doxytag: member="dtn::BlockProcessor::BlockInfo" ref="f60b1c05e77bb387f21aaff2c8ac532b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classdtn_1_1BlockInfo.html">BlockInfo</a><code> [friend]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="BlockProcessor_8h-source.html#l00241">241</a> of file <a class="el" href="BlockProcessor_8h-source.html">BlockProcessor.h</a>.</p>

<p>Referenced by <a class="el" href="PrimaryBlockProcessor_8cc-source.html#l00274">dtn::PrimaryBlockProcessor::prepare()</a>, <a class="el" href="BlockProcessor_8cc-source.html#l00406">prepare()</a>, and <a class="el" href="MetadataBlockProcessor_8cc-source.html#l00155">dtn::MetadataBlockProcessor::prepare_generated_metadata()</a>.</p>

</div>
</div><p>
<a class="anchor" name="226a2c8d06ec75da24a71e730275802b"></a><!-- doxytag: member="dtn::BlockProcessor::BundleProtocol" ref="226a2c8d06ec75da24a71e730275802b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classdtn_1_1BundleProtocol.html">BundleProtocol</a><code> [friend]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Reimplemented in <a class="el" href="classdtn_1_1PrimaryBlockProcessor.html#226a2c8d06ec75da24a71e730275802b">dtn::PrimaryBlockProcessor</a>.</p>

<p>Definition at line <a class="el" href="BlockProcessor_8h-source.html#l00240">240</a> of file <a class="el" href="BlockProcessor_8h-source.html">BlockProcessor.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="59e06d8d4aeedf6e845673edd9a295e3"></a><!-- doxytag: member="dtn::BlockProcessor::Ciphersuite" ref="59e06d8d4aeedf6e845673edd9a295e3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class Ciphersuite<code> [friend]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="BlockProcessor_8h-source.html#l00242">242</a> of file <a class="el" href="BlockProcessor_8h-source.html">BlockProcessor.h</a>.</p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="4487fbc9a5a8270f1e3018d79dc25b4c"></a><!-- doxytag: member="dtn::BlockProcessor::block_type_" ref="4487fbc9a5a8270f1e3018d79dc25b4c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classdtn_1_1BlockProcessor.html#4487fbc9a5a8270f1e3018d79dc25b4c">dtn::BlockProcessor::block_type_</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The block typecode for this handler. 
<p>

<p>Definition at line <a class="el" href="BlockProcessor_8h-source.html#l00268">268</a> of file <a class="el" href="BlockProcessor_8h-source.html">BlockProcessor.h</a>.</p>

<p>Referenced by <a class="el" href="BlockProcessor_8h-source.html#l00082">block_type()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="BlockProcessor_8h-source.html">BlockProcessor.h</a><li><a class="el" href="BlockProcessor_8cc-source.html">BlockProcessor.cc</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 30 09:27:02 2009 for DTN Reference Implementation by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>