<!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: prophet::OfferTLV Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.html"><span>Main 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 List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceprophet.html">prophet</a>::<a class="el" href="classprophet_1_1OfferTLV.html">OfferTLV</a> </div> </div> <div class="contents"> <h1>prophet::OfferTLV Class Reference</h1><!-- doxytag: class="prophet::OfferTLV" --><!-- doxytag: inherits="prophet::BundleTLV" --><code>#include <<a class="el" href="OfferTLV_8h-source.html">OfferTLV.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for prophet::OfferTLV:</div> <div class="dynsection"> <p><center><img src="classprophet_1_1OfferTLV.png" usemap="#prophet::OfferTLV_map" border="0" alt=""></center> <map name="prophet::OfferTLV_map"> <area href="classprophet_1_1BundleTLV.html" alt="prophet::BundleTLV" shape="rect" coords="0,56,123,80"> <area href="classprophet_1_1BaseTLV.html" alt="prophet::BaseTLV" shape="rect" coords="0,0,123,24"> </map> </div> <p> <a href="classprophet_1_1OfferTLV-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> <p>Definition at line <a class="el" href="OfferTLV_8h-source.html#l00027">27</a> of file <a class="el" href="OfferTLV_8h-source.html">OfferTLV.h</a>.</p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classprophet_1_1OfferTLV.html#77d6ff73a03e9ab11c531767c49a3870">OfferTLV</a> (const <a class="el" href="classprophet_1_1BundleOfferList.html">BundleOfferList</a> &list)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#77d6ff73a03e9ab11c531767c49a3870"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classprophet_1_1OfferTLV.html#58f60ddccbe4b95244d8586161534602">~OfferTLV</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#58f60ddccbe4b95244d8586161534602"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classprophet_1_1OfferTLV.html#d010485b4fe6fec79a419fbf977be183">serialize</a> (u_char *bp, size_t len) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual from <a class="el" href="classprophet_1_1BaseTLV.html" title="The Prophet I-D (March 2006) dictates five bytecodes for router state exchange messages...">BaseTLV</a>. <a href="#d010485b4fe6fec79a419fbf977be183"></a><br></td></tr> <tr><td colspan="2"><div class="groupHeader"></div></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classprophet_1_1BundleOfferList.html">BundleOfferList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classprophet_1_1OfferTLV.html#864859ca129d2945ea3b44f73112a34f">list</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Accessors. <a href="#864859ca129d2945ea3b44f73112a34f"></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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classprophet_1_1OfferTLV.html#97065b9dc8825b3c5499a0f8ba7e9902">OfferTLV</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#97065b9dc8825b3c5499a0f8ba7e9902"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classprophet_1_1OfferTLV.html#050f140354ba636ac5b1ed5b0d4dfae6">deserialize</a> (const u_char *bp, size_t len)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual from <a class="el" href="classprophet_1_1BaseTLV.html" title="The Prophet I-D (March 2006) dictates five bytecodes for router state exchange messages...">BaseTLV</a>. <a href="#050f140354ba636ac5b1ed5b0d4dfae6"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classprophet_1_1BundleOfferList.html">BundleOfferList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classprophet_1_1OfferTLV.html#22b1901feadb35e7fdc3d333ef97abb5">list_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Priority sorted list of Bundles to offer to peer. <a href="#22b1901feadb35e7fdc3d333ef97abb5"></a><br></td></tr> <tr><td colspan="2"><br><h2>Friends</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classprophet_1_1OfferTLV.html#22a9da1a903293254796b905ac1b80f6">TLVFactory< OfferTLV ></a></td></tr> </table> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="77d6ff73a03e9ab11c531767c49a3870"></a><!-- doxytag: member="prophet::OfferTLV::OfferTLV" ref="77d6ff73a03e9ab11c531767c49a3870" args="(const BundleOfferList &list)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">prophet::OfferTLV::OfferTLV </td> <td>(</td> <td class="paramtype">const <a class="el" href="classprophet_1_1BundleOfferList.html">BundleOfferList</a> & </td> <td class="paramname"> <em>list</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor. <p> <p>Definition at line <a class="el" href="OfferTLV_8cc-source.html#l00023">23</a> of file <a class="el" href="OfferTLV_8cc-source.html">OfferTLV.cc</a>.</p> </div> </div><p> <a class="anchor" name="58f60ddccbe4b95244d8586161534602"></a><!-- doxytag: member="prophet::OfferTLV::~OfferTLV" ref="58f60ddccbe4b95244d8586161534602" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual prophet::OfferTLV::~OfferTLV </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Destructor. <p> <p>Definition at line <a class="el" href="OfferTLV_8h-source.html#l00038">38</a> of file <a class="el" href="OfferTLV_8h-source.html">OfferTLV.h</a>.</p> </div> </div><p> <a class="anchor" name="97065b9dc8825b3c5499a0f8ba7e9902"></a><!-- doxytag: member="prophet::OfferTLV::OfferTLV" ref="97065b9dc8825b3c5499a0f8ba7e9902" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">prophet::OfferTLV::OfferTLV </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor. <p> Protected to force access through <a class="el" href="structprophet_1_1TLVFactory.html">TLVFactory</a>. <p>Definition at line <a class="el" href="OfferTLV_8cc-source.html#l00027">27</a> of file <a class="el" href="OfferTLV_8cc-source.html">OfferTLV.cc</a>.</p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="d010485b4fe6fec79a419fbf977be183"></a><!-- doxytag: member="prophet::OfferTLV::serialize" ref="d010485b4fe6fec79a419fbf977be183" args="(u_char *bp, size_t len) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t prophet::OfferTLV::serialize </td> <td>(</td> <td class="paramtype">u_char * </td> <td class="paramname"> <em>bp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>len</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual from <a class="el" href="classprophet_1_1BaseTLV.html" title="The Prophet I-D (March 2006) dictates five bytecodes for router state exchange messages...">BaseTLV</a>. <p> <p>Implements <a class="el" href="classprophet_1_1BaseTLV.html#18534e5841ee8447ca2c51cf299becd0">prophet::BaseTLV</a>.</p> <p>Definition at line <a class="el" href="OfferTLV_8cc-source.html#l00031">31</a> of file <a class="el" href="OfferTLV_8cc-source.html">OfferTLV.cc</a>.</p> <p>References <a class="el" href="BundleTLVEntry_8h-source.html#l00139">prophet::BundleTLVEntry::accept()</a>, <a class="el" href="BundleTLVEntry_8h-source.html#l00140">prophet::BundleTLVEntry::ack()</a>, <a class="el" href="BundleTLVEntryList_8h-source.html#l00142">prophet::BundleEntryList< BundleEntryType >::begin()</a>, <a class="el" href="BundleTLV_8h-source.html#l00116">prophet::BundleTLV::BundleEntrySize</a>, <a class="el" href="BundleTLV_8h-source.html#l00114">prophet::BundleTLV::BundleTLVHeaderSize</a>, <a class="el" href="BundleTLVEntry_8h-source.html#l00135">prophet::BundleTLVEntry::creation_ts()</a>, <a class="el" href="BundleTLVEntry_8h-source.html#l00138">prophet::BundleTLVEntry::custody()</a>, <a class="el" href="BundleTLVEntryList_8h-source.html#l00143">prophet::BundleEntryList< BundleEntryType >::end()</a>, <a class="el" href="BundleTLV_8h-source.html#l00051">prophet::BundleTLV::BundleTLVHeader::flags</a>, <a class="el" href="BundleTLVEntryList_8h-source.html#l00161">prophet::BundleEntryList< BundleEntryType >::guess_size()</a>, <a class="el" href="BundleTLV_8h-source.html#l00056">prophet::BundleTLV::BundleTLVHeader::length</a>, <a class="el" href="BaseTLV_8h-source.html#l00127">prophet::BaseTLV::length_</a>, <a class="el" href="OfferTLV_8h-source.html#l00062">list_</a>, <a class="el" href="BundleTLV_8h-source.html#l00060">prophet::BundleTLV::BundleTLVHeader::offer_count</a>, <a class="el" href="BaseTLV_8h-source.html#l00070">prophet::BaseTLV::OFFER_TLV</a>, <a class="el" href="BundleTLVEntry_8h-source.html#l00136">prophet::BundleTLVEntry::seqno()</a>, <a class="el" href="BundleTLVEntry_8h-source.html#l00137">prophet::BundleTLVEntry::sid()</a>, <a class="el" href="BundleTLVEntryList_8h-source.html#l00066">prophet::BundleEntryList< BundleEntryType >::size()</a>, <a class="el" href="BundleTLVEntry_8h-source.html#l00141">prophet::BundleTLVEntry::type()</a>, <a class="el" href="BundleTLV_8h-source.html#l00050">prophet::BundleTLV::BundleTLVHeader::type</a>, <a class="el" href="BaseTLV_8h-source.html#l00125">prophet::BaseTLV::typecode_</a>, and <a class="el" href="BundleTLV_8cc-source.html#l00023">prophet::BundleTLV::write_bundle_entry()</a>.</p> </div> </div><p> <a class="anchor" name="864859ca129d2945ea3b44f73112a34f"></a><!-- doxytag: member="prophet::OfferTLV::list" ref="864859ca129d2945ea3b44f73112a34f" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classprophet_1_1BundleOfferList.html">BundleOfferList</a> prophet::OfferTLV::list </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Accessors. <p> <p>Definition at line <a class="el" href="OfferTLV_8h-source.html#l00046">46</a> of file <a class="el" href="OfferTLV_8h-source.html">OfferTLV.h</a>.</p> <p>References <a class="el" href="OfferTLV_8h-source.html#l00062">list_</a>.</p> </div> </div><p> <a class="anchor" name="050f140354ba636ac5b1ed5b0d4dfae6"></a><!-- doxytag: member="prophet::OfferTLV::deserialize" ref="050f140354ba636ac5b1ed5b0d4dfae6" args="(const u_char *bp, size_t len)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> prophet::OfferTLV::deserialize </td> <td>(</td> <td class="paramtype">const u_char * </td> <td class="paramname"> <em>bp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>len</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual from <a class="el" href="classprophet_1_1BaseTLV.html" title="The Prophet I-D (March 2006) dictates five bytecodes for router state exchange messages...">BaseTLV</a>. <p> <p>Implements <a class="el" href="classprophet_1_1BaseTLV.html#39a29c35a775a408b165921f61beec2d">prophet::BaseTLV</a>.</p> <p>Definition at line <a class="el" href="OfferTLV_8cc-source.html#l00080">80</a> of file <a class="el" href="OfferTLV_8cc-source.html">OfferTLV.cc</a>.</p> <p>References <a class="el" href="BundleTLVEntryList_8h-source.html#l00240">prophet::BundleOfferList::add_offer()</a>, <a class="el" href="BundleTLV_8h-source.html#l00116">prophet::BundleTLV::BundleEntrySize</a>, <a class="el" href="BundleTLV_8h-source.html#l00114">prophet::BundleTLV::BundleTLVHeaderSize</a>, <a class="el" href="dtncat_8c-source.html#l00052">custody</a>, <a class="el" href="BundleTLVEntryList_8h-source.html#l00071">prophet::BundleEntryList< BundleEntryType >::empty()</a>, <a class="el" href="BundleTLV_8h-source.html#l00051">prophet::BundleTLV::BundleTLVHeader::flags</a>, <a class="el" href="BaseTLV_8h-source.html#l00126">prophet::BaseTLV::flags_</a>, <a class="el" href="BundleTLV_8h-source.html#l00056">prophet::BundleTLV::BundleTLVHeader::length</a>, <a class="el" href="BaseTLV_8h-source.html#l00127">prophet::BaseTLV::length_</a>, <a class="el" href="OfferTLV_8h-source.html#l00062">list_</a>, <a class="el" href="BundleTLVEntry_8h-source.html#l00041">prophet::BundleTLVEntry::OFFER</a>, <a class="el" href="BundleTLV_8h-source.html#l00060">prophet::BundleTLV::BundleTLVHeader::offer_count</a>, <a class="el" href="BaseTLV_8h-source.html#l00070">prophet::BaseTLV::OFFER_TLV</a>, <a class="el" href="BundleTLV_8cc-source.html#l00049">prophet::BundleTLV::read_bundle_entry()</a>, <a class="el" href="BundleTLV_8h-source.html#l00050">prophet::BundleTLV::BundleTLVHeader::type</a>, <a class="el" href="BaseTLV_8h-source.html#l00125">prophet::BaseTLV::typecode_</a>, and <a class="el" href="BundleTLVEntry_8h-source.html#l00040">prophet::BundleTLVEntry::UNDEFINED</a>.</p> </div> </div><p> <hr><h2>Friends And Related Function Documentation</h2> <a class="anchor" name="22a9da1a903293254796b905ac1b80f6"></a><!-- doxytag: member="prophet::OfferTLV::TLVFactory< OfferTLV >" ref="22a9da1a903293254796b905ac1b80f6" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">friend class <a class="el" href="structprophet_1_1TLVFactory.html">TLVFactory</a>< <a class="el" href="classprophet_1_1OfferTLV.html">OfferTLV</a> ><code> [friend]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="OfferTLV_8h-source.html#l00050">50</a> of file <a class="el" href="OfferTLV_8h-source.html">OfferTLV.h</a>.</p> </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="22b1901feadb35e7fdc3d333ef97abb5"></a><!-- doxytag: member="prophet::OfferTLV::list_" ref="22b1901feadb35e7fdc3d333ef97abb5" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classprophet_1_1BundleOfferList.html">BundleOfferList</a> <a class="el" href="classprophet_1_1OfferTLV.html#22b1901feadb35e7fdc3d333ef97abb5">prophet::OfferTLV::list_</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> Priority sorted list of Bundles to offer to peer. <p> <p>Definition at line <a class="el" href="OfferTLV_8h-source.html#l00062">62</a> of file <a class="el" href="OfferTLV_8h-source.html">OfferTLV.h</a>.</p> <p>Referenced by <a class="el" href="OfferTLV_8cc-source.html#l00080">deserialize()</a>, <a class="el" href="OfferTLV_8h-source.html#l00046">list()</a>, and <a class="el" href="OfferTLV_8cc-source.html#l00031">serialize()</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="OfferTLV_8h-source.html">OfferTLV.h</a><li><a class="el" href="OfferTLV_8cc-source.html">OfferTLV.cc</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 21 14:09:56 2008 for DTN Reference Implementation by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>