<!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: Bundle.cc Source File</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><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <h1>Bundle.cc</h1><a href="Bundle_8cc.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> * Copyright 2004-2006 Intel Corporation</span> <a name="l00003"></a>00003 <span class="comment"> * </span> <a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> <a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span> <a name="l00006"></a>00006 <span class="comment"> * You may obtain a copy of the License at</span> <a name="l00007"></a>00007 <span class="comment"> * </span> <a name="l00008"></a>00008 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> <a name="l00009"></a>00009 <span class="comment"> * </span> <a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> <a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> <a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> <a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span> <a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span> <a name="l00015"></a>00015 <span class="comment"> */</span> <a name="l00016"></a>00016 <a name="l00017"></a>00017 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor"># include <<a class="code" href="dtn-config_8h.html">dtn-config.h</a>></span> <a name="l00019"></a>00019 <span class="preprocessor">#endif</span> <a name="l00020"></a>00020 <span class="preprocessor"></span> <a name="l00021"></a>00021 <span class="preprocessor">#include <oasys/debug/DebugUtils.h></span> <a name="l00022"></a>00022 <span class="preprocessor">#include <oasys/thread/SpinLock.h></span> <a name="l00023"></a>00023 <a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="bundling_2Bundle_8h.html">Bundle.h</a>"</span> <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="BundleDaemon_8h.html">BundleDaemon.h</a>"</span> <a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="bundling_2BundleList_8h.html">BundleList.h</a>"</span> <a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="ExpirationTimer_8h.html">ExpirationTimer.h</a>"</span> <a name="l00028"></a>00028 <a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="GlobalStore_8h.html">storage/GlobalStore.h</a>"</span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="keyword">namespace </span>dtn { <a name="l00032"></a>00032 <a name="l00033"></a>00033 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00034"></a>00034 <span class="keywordtype">void</span> <a name="l00035"></a><a class="code" href="classdtn_1_1Bundle.html#d103ff9538eedf4aced9d5da90cfdf0b">00035</a> <a class="code" href="classdtn_1_1Bundle.html#d103ff9538eedf4aced9d5da90cfdf0b" title="Initialization helper function.">Bundle::init</a>(u_int32_t <span class="keywordtype">id</span>) <a name="l00036"></a>00036 { <a name="l00037"></a>00037 <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a> = id; <a name="l00038"></a>00038 <a class="code" href="classdtn_1_1Bundle.html#c26e4f31ba03473e0a2169f98940ab01" title="Fragmentary Bundle.">is_fragment_</a> = <span class="keyword">false</span>; <a name="l00039"></a>00039 <a class="code" href="classdtn_1_1Bundle.html#e303a30810b8050718234f8057913aa2" title="Administrative record bundle.">is_admin_</a> = <span class="keyword">false</span>; <a name="l00040"></a>00040 <a class="code" href="classdtn_1_1Bundle.html#ad4b14e9eb112b7c5152f462d1090195" title="Bundle shouldn&#39;t be fragmented.">do_not_fragment_</a> = <span class="keyword">false</span>; <a name="l00041"></a>00041 <a class="code" href="classdtn_1_1Bundle.html#925f8ece32c039914da3f313e3851482" title="Is bundle in persistent store.">in_datastore_</a> = <span class="keyword">false</span>; <a name="l00042"></a>00042 <a class="code" href="classdtn_1_1Bundle.html#520f9262a16c77123ce04630dcecea03" title="Custody requested.">custody_requested_</a> = <span class="keyword">false</span>; <a name="l00043"></a>00043 <a class="code" href="classdtn_1_1Bundle.html#00d69059c16f74a10d7300781b342a94" title="Does local node have custody.">local_custody_</a> = <span class="keyword">false</span>; <a name="l00044"></a>00044 <a class="code" href="classdtn_1_1Bundle.html#69aa11ee7359745f93f90ed88ce995b3" title="Destination endpoint is a singleton.">singleton_dest_</a> = <span class="keyword">true</span>; <a name="l00045"></a>00045 <a class="code" href="classdtn_1_1Bundle.html#d6e6e672668691e60601a143de668d8c" title="Bundle priority.">priority_</a> = <a class="code" href="classdtn_1_1Bundle.html#ee1ec0a9c045adc48dc8751f54f59e649acfb0603df69344a00cae0aa885d78f" title="regular priority">COS_NORMAL</a>; <a name="l00046"></a>00046 <a class="code" href="classdtn_1_1Bundle.html#829a720ddcb9400c378ddccebab3ca45" title="Hop by hop reception receipt.">receive_rcpt_</a> = <span class="keyword">false</span>; <a name="l00047"></a>00047 <a class="code" href="classdtn_1_1Bundle.html#a69eea94a81f88f3e5d8f2c2153a653b" title="Custody xfer reporting.">custody_rcpt_</a> = <span class="keyword">false</span>; <a name="l00048"></a>00048 <a class="code" href="classdtn_1_1Bundle.html#b9af83a2e348628d03fef19721fe6d13" title="Hop by hop forwarding reporting.">forward_rcpt_</a> = <span class="keyword">false</span>; <a name="l00049"></a>00049 <a class="code" href="classdtn_1_1Bundle.html#cf37f1deb18cb25bbe6c4b949ce48b20" title="End-to-end delivery reporting.">delivery_rcpt_</a> = <span class="keyword">false</span>; <a name="l00050"></a>00050 <a class="code" href="classdtn_1_1Bundle.html#89b45b4bd679a21fb8358f0dd934522d" title="Bundle deletion reporting.">deletion_rcpt_</a> = <span class="keyword">false</span>; <a name="l00051"></a>00051 <a class="code" href="classdtn_1_1Bundle.html#759ec250b64dc2484fb015816140951c" title="Acknowlege by application reporting.">app_acked_rcpt_</a> = <span class="keyword">false</span>; <a name="l00052"></a>00052 <a class="code" href="classdtn_1_1Bundle.html#ba21fc6b34def3e852b9582c8034f97e" title="Length of original bundle.">orig_length_</a> = 0; <a name="l00053"></a>00053 <a class="code" href="classdtn_1_1Bundle.html#8b8fe900f2b2842861745855210ef271" title="Offset of fragment in original bundle.">frag_offset_</a> = 0; <a name="l00054"></a>00054 <a class="code" href="classdtn_1_1Bundle.html#dd0bfff0aeda43e68c75cc00d88f63cb" title="Bundle expiration time.">expiration_</a> = 0; <a name="l00055"></a>00055 <a class="code" href="classdtn_1_1Bundle.html#f43afb7db765b6c7764c1427fee164f9" title="Declared entity that &quot;owns&quot; this bundle, which could be empty.">owner_</a> = <span class="stringliteral">""</span>; <a name="l00056"></a>00056 <a class="code" href="classdtn_1_1Bundle.html#aee056f839ea0cedf3a6efaf08e43dc3" title="Is the bundle an incoming reactive fragment.">fragmented_incoming_</a>= <span class="keyword">false</span>; <a name="l00057"></a>00057 <a class="code" href="classdtn_1_1Bundle.html#5056fc59e9964cc89bb8667fd352e935" title="Session flags.">session_flags_</a> = 0; <a name="l00058"></a>00058 <a name="l00059"></a>00059 <span class="comment">// as per the spec, the creation timestamp should be calculated as</span> <a name="l00060"></a>00060 <span class="comment">// seconds since 1/1/2000, and since the bundle id should be</span> <a name="l00061"></a>00061 <span class="comment">// monotonically increasing, it's safe to use that for the seqno</span> <a name="l00062"></a>00062 <a class="code" href="classdtn_1_1Bundle.html#72faefd75f44ab417637735cba997f9a" title="Creation timestamp.">creation_ts_</a>.<a class="code" href="structdtn_1_1BundleTimestamp.html#02c8a347150620243240655bdcd2f42d" title="Seconds since 1/1/2000.">seconds_</a> = <a class="code" href="structdtn_1_1BundleTimestamp.html#27af1dd8ce1c3d9f361a0149aba6cb0c" title="Return the current time in the correct format for the bundle protocol, i.e.">BundleTimestamp::get_current_time</a>(); <a name="l00063"></a>00063 <a class="code" href="classdtn_1_1Bundle.html#72faefd75f44ab417637735cba997f9a" title="Creation timestamp.">creation_ts_</a>.<a class="code" href="structdtn_1_1BundleTimestamp.html#ebc8cea66862d7f6056da450db410347" title="Sub-second sequence number.">seqno_</a> = <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>; <a name="l00064"></a>00064 <a name="l00065"></a>00065 <span class="comment">// This identifier provides information about when a local Bundle</span> <a name="l00066"></a>00066 <span class="comment">// object was created so that bundles with the same GBOF-ID can be</span> <a name="l00067"></a>00067 <span class="comment">// distinguished. We have to keep a copy separate from creation_ts_</span> <a name="l00068"></a>00068 <span class="comment">// because that will be set to the actual BP creation time if this</span> <a name="l00069"></a>00069 <span class="comment">// bundle was received from a peer, or is the result of</span> <a name="l00070"></a>00070 <span class="comment">// fragmentation, etc.</span> <a name="l00071"></a>00071 <a class="code" href="classdtn_1_1Bundle.html#912b0960ad8b3d8803f4a16f0069dfbf" title="Identifier for external routers to refer to duplicate bundles.">extended_id_</a> = <a class="code" href="classdtn_1_1Bundle.html#72faefd75f44ab417637735cba997f9a" title="Creation timestamp.">creation_ts_</a>; <a name="l00072"></a>00072 <a name="l00073"></a>00073 log_debug_p(<span class="stringliteral">"/dtn/bundle"</span>, <span class="stringliteral">"Bundle::init bundle id %d"</span>, <span class="keywordtype">id</span>); <a name="l00074"></a>00074 } <a name="l00075"></a>00075 <a name="l00076"></a>00076 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00077"></a><a class="code" href="classdtn_1_1Bundle.html#7ee2b18a3df14a90d4b1a26c770877f8">00077</a> Bundle::Bundle(<a class="code" href="classdtn_1_1BundlePayload.html#f87102863631e39f673458a7527ae352" title="Options for payload location state.">BundlePayload::location_t</a> location) <a name="l00078"></a>00078 : payload_(&lock_), fwdlog_(&lock_), xmit_blocks_(&lock_), <a name="l00079"></a>00079 recv_metadata_(<span class="stringliteral">"recv_metadata"</span>) <a name="l00080"></a>00080 { <a name="l00081"></a>00081 u_int32_t <span class="keywordtype">id</span> = <a class="code" href="classdtn_1_1GlobalStore.html#84112e55922524eb85a143be7d5197a0" title="Singleton instance accessor.">GlobalStore::instance</a>()-><a class="code" href="classdtn_1_1GlobalStore.html#70842bf9404fe5c9ec84bb9fc99c657e" title="Get a new bundle id, updating the value in the store.">next_bundleid</a>(); <a name="l00082"></a>00082 <a class="code" href="classdtn_1_1Bundle.html#d103ff9538eedf4aced9d5da90cfdf0b" title="Initialization helper function.">init</a>(<span class="keywordtype">id</span>); <a name="l00083"></a>00083 <a class="code" href="classdtn_1_1Bundle.html#5240281e3072cc451bba55e716a3257e" title="Reference to the payload.">payload_</a>.<a class="code" href="classdtn_1_1BundlePayload.html#ad63b74a23afeffb000d2e9d59d88f19" title="Actual payload initialization function.">init</a>(<span class="keywordtype">id</span>, location); <a name="l00084"></a>00084 <a class="code" href="classdtn_1_1Bundle.html#484370b532a1f328d3b2582af82cd2b6" title="Bundle reference count.">refcount_</a> = 0; <a name="l00085"></a>00085 <a class="code" href="classdtn_1_1Bundle.html#04c759563bcaca145ebce02539c2f677" title="The expiration timer.">expiration_timer_</a> = NULL; <a name="l00086"></a>00086 <a class="code" href="classdtn_1_1Bundle.html#cc0ac36721c1226af7961d8036ba7451" title="Bit indicating whether a bundle free event has been posted.">freed_</a> = <span class="keyword">false</span>; <a name="l00087"></a>00087 } <a name="l00088"></a>00088 <a name="l00089"></a>00089 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00090"></a><a class="code" href="classdtn_1_1Bundle.html#76c4fb9228b8ad6eaf4d4dda6cd7a1b3">00090</a> <a class="code" href="classdtn_1_1Bundle.html#7ee2b18a3df14a90d4b1a26c770877f8" title="Default constructor to create an empty bundle, initializing all fields to defaults...">Bundle::Bundle</a>(<span class="keyword">const</span> oasys::Builder&) <a name="l00091"></a>00091 : <a class="code" href="classdtn_1_1Bundle.html#5240281e3072cc451bba55e716a3257e" title="Reference to the payload.">payload_</a>(&<a class="code" href="classdtn_1_1Bundle.html#39fd05c48dca2e56883ad4d2b34d7a3e" title="Lock for bundle data that can be updated by multiple threads.">lock_</a>), <a class="code" href="classdtn_1_1Bundle.html#43a4f11f21b1b496e47b068933848e8e" title="Log of bundle forwarding records.">fwdlog_</a>(&<a class="code" href="classdtn_1_1Bundle.html#39fd05c48dca2e56883ad4d2b34d7a3e" title="Lock for bundle data that can be updated by multiple threads.">lock_</a>), <a class="code" href="classdtn_1_1Bundle.html#3d7298e3def6853c47b2d14043abe7d1" title="Block vector for each link.">xmit_blocks_</a>(&<a class="code" href="classdtn_1_1Bundle.html#39fd05c48dca2e56883ad4d2b34d7a3e" title="Lock for bundle data that can be updated by multiple threads.">lock_</a>), <a name="l00092"></a>00092 <a class="code" href="classdtn_1_1Bundle.html#6d3105dfbd5382ede587618245f25afb" title="Metadata as arrived in bundle.">recv_metadata_</a>(<span class="stringliteral">"recv_metadata"</span>) <a name="l00093"></a>00093 { <a name="l00094"></a>00094 <span class="comment">// don't do anything here except set the id to a bogus default</span> <a name="l00095"></a>00095 <span class="comment">// value and make sure the expiration timer is NULL, since the</span> <a name="l00096"></a>00096 <span class="comment">// fields are set and the payload initialized when loading from</span> <a name="l00097"></a>00097 <span class="comment">// the database</span> <a name="l00098"></a>00098 <a class="code" href="classdtn_1_1Bundle.html#d103ff9538eedf4aced9d5da90cfdf0b" title="Initialization helper function.">init</a>(0xffffffff); <a name="l00099"></a>00099 <a class="code" href="classdtn_1_1Bundle.html#484370b532a1f328d3b2582af82cd2b6" title="Bundle reference count.">refcount_</a> = 0; <a name="l00100"></a>00100 <a class="code" href="classdtn_1_1Bundle.html#04c759563bcaca145ebce02539c2f677" title="The expiration timer.">expiration_timer_</a> = NULL; <a name="l00101"></a>00101 <a class="code" href="classdtn_1_1Bundle.html#cc0ac36721c1226af7961d8036ba7451" title="Bit indicating whether a bundle free event has been posted.">freed_</a> = <span class="keyword">false</span>; <a name="l00102"></a>00102 } <a name="l00103"></a>00103 <a name="l00104"></a>00104 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00105"></a><a class="code" href="classdtn_1_1Bundle.html#51fcdc62f97df69501805cf1dba76ee4">00105</a> <a class="code" href="classdtn_1_1Bundle.html#51fcdc62f97df69501805cf1dba76ee4" title="Bundle destructor.">Bundle::~Bundle</a>() <a name="l00106"></a>00106 { <a name="l00107"></a>00107 log_debug_p(<span class="stringliteral">"/dtn/bundle/free"</span>, <span class="stringliteral">"destroying bundle id %d"</span>, <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>); <a name="l00108"></a>00108 <a name="l00109"></a>00109 <a class="code" href="SDNV_8cc.html#ca68c0d4ac8df0838e209fb5300f7be3">ASSERT</a>(<a class="code" href="classdtn_1_1Bundle.html#ffda74852216e190b80e4bc07a2d74cc" title="The set of BundleLists that contain the Bundle.">mappings_</a>.size() == 0); <a name="l00110"></a>00110 <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a> = 0xdeadf00d; <a name="l00111"></a>00111 <a name="l00112"></a>00112 ASSERTF(<a class="code" href="classdtn_1_1Bundle.html#04c759563bcaca145ebce02539c2f677" title="The expiration timer.">expiration_timer_</a> == NULL, <a name="l00113"></a>00113 <span class="stringliteral">"bundle deleted with pending expiration timer"</span>); <a name="l00114"></a>00114 <a name="l00115"></a>00115 } <a name="l00116"></a>00116 <a name="l00117"></a>00117 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00118"></a>00118 <span class="keywordtype">int</span> <a name="l00119"></a><a class="code" href="classdtn_1_1Bundle.html#c06dd8a663890915ea37c250277b4810">00119</a> <a class="code" href="classdtn_1_1Bundle.html#c06dd8a663890915ea37c250277b4810" title="Virtual from formatter.">Bundle::format</a>(<span class="keywordtype">char</span>* <a class="code" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>, <span class="keywordtype">size_t</span> sz)<span class="keyword"> const</span> <a name="l00120"></a>00120 <span class="keyword"></span>{ <a name="l00121"></a>00121 <span class="keywordflow">if</span> (<a class="code" href="classdtn_1_1Bundle.html#839db0b56b61020d9f2b3878e6c2d34a" title="Accessors.">is_admin</a>()) { <a name="l00122"></a>00122 <span class="keywordflow">return</span> snprintf(buf, sz, <span class="stringliteral">"bundle id %u [%s -> %s %zu byte payload, is_admin]"</span>, <a name="l00123"></a>00123 <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>, <a class="code" href="classdtn_1_1Bundle.html#e0ee1519e799770d83ba4b07d724b192" title="Source eid.">source_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>(), <a class="code" href="classdtn_1_1Bundle.html#73bebd0daef752d8bf0212e9e79dbeec" title="Destination eid.">dest_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>(), <a name="l00124"></a>00124 <a class="code" href="classdtn_1_1Bundle.html#5240281e3072cc451bba55e716a3257e" title="Reference to the payload.">payload_</a>.<a class="code" href="classdtn_1_1BundlePayload.html#56b3851ad789c4dbf019a32d557b7453" title="The payload length.">length</a>()); <a name="l00125"></a>00125 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classdtn_1_1Bundle.html#d6c74eba219bfe55854cf7a90e210cca" title="Accessors.">is_fragment</a>()) { <a name="l00126"></a>00126 <span class="keywordflow">return</span> snprintf(buf, sz, <span class="stringliteral">"bundle id %u [%s -> %s %zu byte payload, fragment @%u/%u]"</span>, <a name="l00127"></a>00127 <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>, <a class="code" href="classdtn_1_1Bundle.html#e0ee1519e799770d83ba4b07d724b192" title="Source eid.">source_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>(), <a class="code" href="classdtn_1_1Bundle.html#73bebd0daef752d8bf0212e9e79dbeec" title="Destination eid.">dest_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>(), <a name="l00128"></a>00128 <a class="code" href="classdtn_1_1Bundle.html#5240281e3072cc451bba55e716a3257e" title="Reference to the payload.">payload_</a>.<a class="code" href="classdtn_1_1BundlePayload.html#56b3851ad789c4dbf019a32d557b7453" title="The payload length.">length</a>(), <a class="code" href="classdtn_1_1Bundle.html#8b8fe900f2b2842861745855210ef271" title="Offset of fragment in original bundle.">frag_offset_</a>, <a class="code" href="classdtn_1_1Bundle.html#ba21fc6b34def3e852b9582c8034f97e" title="Length of original bundle.">orig_length_</a>); <a name="l00129"></a>00129 } <span class="keywordflow">else</span> { <a name="l00130"></a>00130 <span class="keywordflow">return</span> snprintf(buf, sz, <span class="stringliteral">"bundle id %u [%s -> %s %zu byte payload]"</span>, <a name="l00131"></a>00131 <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>, <a class="code" href="classdtn_1_1Bundle.html#e0ee1519e799770d83ba4b07d724b192" title="Source eid.">source_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>(), <a class="code" href="classdtn_1_1Bundle.html#73bebd0daef752d8bf0212e9e79dbeec" title="Destination eid.">dest_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>(), <a name="l00132"></a>00132 <a class="code" href="classdtn_1_1Bundle.html#5240281e3072cc451bba55e716a3257e" title="Reference to the payload.">payload_</a>.<a class="code" href="classdtn_1_1BundlePayload.html#56b3851ad789c4dbf019a32d557b7453" title="The payload length.">length</a>()); <a name="l00133"></a>00133 } <a name="l00134"></a>00134 } <a name="l00135"></a>00135 <a name="l00136"></a>00136 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00137"></a>00137 <span class="keywordtype">void</span> <a name="l00138"></a><a class="code" href="classdtn_1_1Bundle.html#9b410ec89fc28040e52d3b0892cd3694">00138</a> <a class="code" href="classdtn_1_1Bundle.html#9b410ec89fc28040e52d3b0892cd3694" title="Virtual from formatter.">Bundle::format_verbose</a>(oasys::StringBuffer* <a class="code" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>) <a name="l00139"></a>00139 { <a name="l00140"></a>00140 <a name="l00141"></a>00141 <span class="preprocessor">#define bool_to_str(x) ((x) ? "true" : "false")</span> <a name="l00142"></a>00142 <span class="preprocessor"></span> <a name="l00143"></a>00143 buf->appendf(<span class="stringliteral">"bundle id %d:\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>); <a name="l00144"></a>00144 buf->appendf(<span class="stringliteral">" source: %s\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#e0ee1519e799770d83ba4b07d724b192" title="Source eid.">source_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>()); <a name="l00145"></a>00145 buf->appendf(<span class="stringliteral">" dest: %s\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#73bebd0daef752d8bf0212e9e79dbeec" title="Destination eid.">dest_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>()); <a name="l00146"></a>00146 buf->appendf(<span class="stringliteral">" custodian: %s\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#a45715369147ab506c5500f89276f7a6" title="Current custodian eid.">custodian_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>()); <a name="l00147"></a>00147 buf->appendf(<span class="stringliteral">" replyto: %s\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#6bfeb5c4a39936ecb34c554ea0aa1d24" title="Reply-To eid.">replyto_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>()); <a name="l00148"></a>00148 buf->appendf(<span class="stringliteral">" prevhop: %s\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#68efefda51e6feddb8c45aa51dd7b8b4" title="Previous hop eid.">prevhop_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>()); <a name="l00149"></a>00149 buf->appendf(<span class="stringliteral">" payload_length: %zu\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#5240281e3072cc451bba55e716a3257e" title="Reference to the payload.">payload_</a>.<a class="code" href="classdtn_1_1BundlePayload.html#56b3851ad789c4dbf019a32d557b7453" title="The payload length.">length</a>()); <a name="l00150"></a>00150 buf->appendf(<span class="stringliteral">" priority: %d\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#d6e6e672668691e60601a143de668d8c" title="Bundle priority.">priority_</a>); <a name="l00151"></a>00151 buf->appendf(<span class="stringliteral">" custody_requested: %s\n"</span>, <a class="code" href="Bundle_8cc.html#915b15cd31601ac7f93a416711ebeef9">bool_to_str</a>(<a class="code" href="classdtn_1_1Bundle.html#520f9262a16c77123ce04630dcecea03" title="Custody requested.">custody_requested_</a>)); <a name="l00152"></a>00152 buf->appendf(<span class="stringliteral">" local_custody: %s\n"</span>, <a class="code" href="Bundle_8cc.html#915b15cd31601ac7f93a416711ebeef9">bool_to_str</a>(<a class="code" href="classdtn_1_1Bundle.html#00d69059c16f74a10d7300781b342a94" title="Does local node have custody.">local_custody_</a>)); <a name="l00153"></a>00153 buf->appendf(<span class="stringliteral">" singleton_dest: %s\n"</span>, <a class="code" href="Bundle_8cc.html#915b15cd31601ac7f93a416711ebeef9">bool_to_str</a>(<a class="code" href="classdtn_1_1Bundle.html#69aa11ee7359745f93f90ed88ce995b3" title="Destination endpoint is a singleton.">singleton_dest_</a>)); <a name="l00154"></a>00154 buf->appendf(<span class="stringliteral">" receive_rcpt: %s\n"</span>, <a class="code" href="Bundle_8cc.html#915b15cd31601ac7f93a416711ebeef9">bool_to_str</a>(<a class="code" href="classdtn_1_1Bundle.html#829a720ddcb9400c378ddccebab3ca45" title="Hop by hop reception receipt.">receive_rcpt_</a>)); <a name="l00155"></a>00155 buf->appendf(<span class="stringliteral">" custody_rcpt: %s\n"</span>, <a class="code" href="Bundle_8cc.html#915b15cd31601ac7f93a416711ebeef9">bool_to_str</a>(<a class="code" href="classdtn_1_1Bundle.html#a69eea94a81f88f3e5d8f2c2153a653b" title="Custody xfer reporting.">custody_rcpt_</a>)); <a name="l00156"></a>00156 buf->appendf(<span class="stringliteral">" forward_rcpt: %s\n"</span>, <a class="code" href="Bundle_8cc.html#915b15cd31601ac7f93a416711ebeef9">bool_to_str</a>(<a class="code" href="classdtn_1_1Bundle.html#b9af83a2e348628d03fef19721fe6d13" title="Hop by hop forwarding reporting.">forward_rcpt_</a>)); <a name="l00157"></a>00157 buf->appendf(<span class="stringliteral">" delivery_rcpt: %s\n"</span>, <a class="code" href="Bundle_8cc.html#915b15cd31601ac7f93a416711ebeef9">bool_to_str</a>(<a class="code" href="classdtn_1_1Bundle.html#cf37f1deb18cb25bbe6c4b949ce48b20" title="End-to-end delivery reporting.">delivery_rcpt_</a>)); <a name="l00158"></a>00158 buf->appendf(<span class="stringliteral">" deletion_rcpt: %s\n"</span>, <a class="code" href="Bundle_8cc.html#915b15cd31601ac7f93a416711ebeef9">bool_to_str</a>(<a class="code" href="classdtn_1_1Bundle.html#89b45b4bd679a21fb8358f0dd934522d" title="Bundle deletion reporting.">deletion_rcpt_</a>)); <a name="l00159"></a>00159 buf->appendf(<span class="stringliteral">" app_acked_rcpt: %s\n"</span>, <a class="code" href="Bundle_8cc.html#915b15cd31601ac7f93a416711ebeef9">bool_to_str</a>(<a class="code" href="classdtn_1_1Bundle.html#759ec250b64dc2484fb015816140951c" title="Acknowlege by application reporting.">app_acked_rcpt_</a>)); <a name="l00160"></a>00160 buf->appendf(<span class="stringliteral">" creation_ts: %u.%u\n"</span>, <a name="l00161"></a>00161 <a class="code" href="classdtn_1_1Bundle.html#72faefd75f44ab417637735cba997f9a" title="Creation timestamp.">creation_ts_</a>.<a class="code" href="structdtn_1_1BundleTimestamp.html#02c8a347150620243240655bdcd2f42d" title="Seconds since 1/1/2000.">seconds_</a>, <a class="code" href="classdtn_1_1Bundle.html#72faefd75f44ab417637735cba997f9a" title="Creation timestamp.">creation_ts_</a>.<a class="code" href="structdtn_1_1BundleTimestamp.html#ebc8cea66862d7f6056da450db410347" title="Sub-second sequence number.">seqno_</a>); <a name="l00162"></a>00162 buf->appendf(<span class="stringliteral">" expiration: %d\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#dd0bfff0aeda43e68c75cc00d88f63cb" title="Bundle expiration time.">expiration_</a>); <a name="l00163"></a>00163 buf->appendf(<span class="stringliteral">" is_fragment: %s\n"</span>, <a class="code" href="Bundle_8cc.html#915b15cd31601ac7f93a416711ebeef9">bool_to_str</a>(<a class="code" href="classdtn_1_1Bundle.html#c26e4f31ba03473e0a2169f98940ab01" title="Fragmentary Bundle.">is_fragment_</a>)); <a name="l00164"></a>00164 buf->appendf(<span class="stringliteral">" is_admin: %s\n"</span>, <a class="code" href="Bundle_8cc.html#915b15cd31601ac7f93a416711ebeef9">bool_to_str</a>(<a class="code" href="classdtn_1_1Bundle.html#e303a30810b8050718234f8057913aa2" title="Administrative record bundle.">is_admin_</a>)); <a name="l00165"></a>00165 buf->appendf(<span class="stringliteral">" do_not_fragment: %s\n"</span>, <a class="code" href="Bundle_8cc.html#915b15cd31601ac7f93a416711ebeef9">bool_to_str</a>(<a class="code" href="classdtn_1_1Bundle.html#ad4b14e9eb112b7c5152f462d1090195" title="Bundle shouldn&#39;t be fragmented.">do_not_fragment_</a>)); <a name="l00166"></a>00166 buf->appendf(<span class="stringliteral">" orig_length: %d\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#ba21fc6b34def3e852b9582c8034f97e" title="Length of original bundle.">orig_length_</a>); <a name="l00167"></a>00167 buf->appendf(<span class="stringliteral">" frag_offset: %d\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#8b8fe900f2b2842861745855210ef271" title="Offset of fragment in original bundle.">frag_offset_</a>); <a name="l00168"></a>00168 buf->appendf(<span class="stringliteral">" sequence_id: %s\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#5ef16c4b405e1e273336814e07917563" title="Sequence id vector.">sequence_id_</a>.<a class="code" href="classdtn_1_1SequenceID.html#7b9bd398514f902641e1930c60653c37" title="Get a string representation.">to_str</a>().c_str()); <a name="l00169"></a>00169 buf->appendf(<span class="stringliteral">" obsoletes_id: %s\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#915c18bd06b54a728841913c064492d5" title="Obsoletes id vector.">obsoletes_id_</a>.<a class="code" href="classdtn_1_1SequenceID.html#7b9bd398514f902641e1930c60653c37" title="Get a string representation.">to_str</a>().c_str()); <a name="l00170"></a>00170 buf->appendf(<span class="stringliteral">" session_eid: %s\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#59c4f745b91308e9e074363f6481b27f" title="Session eid.">session_eid_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>()); <a name="l00171"></a>00171 buf->appendf(<span class="stringliteral">" session_flags: 0x%x\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#5056fc59e9964cc89bb8667fd352e935" title="Session flags.">session_flags_</a>); <a name="l00172"></a>00172 buf->append(<span class="stringliteral">"\n"</span>); <a name="l00173"></a>00173 <a name="l00174"></a>00174 buf->appendf(<span class="stringliteral">"forwarding log:\n"</span>); <a name="l00175"></a>00175 <a class="code" href="classdtn_1_1Bundle.html#43a4f11f21b1b496e47b068933848e8e" title="Log of bundle forwarding records.">fwdlog_</a>.<a class="code" href="classdtn_1_1ForwardingLog.html#43e4efb3eeb1a479bf2afefdfe1def4f" title="Dump a string representation of the log.">dump</a>(buf); <a name="l00176"></a>00176 buf->append(<span class="stringliteral">"\n"</span>); <a name="l00177"></a>00177 <a name="l00178"></a>00178 oasys::ScopeLock l(&<a class="code" href="classdtn_1_1Bundle.html#39fd05c48dca2e56883ad4d2b34d7a3e" title="Lock for bundle data that can be updated by multiple threads.">lock_</a>, <span class="stringliteral">"Bundle::format_verbose"</span>); <a name="l00179"></a>00179 buf->appendf(<span class="stringliteral">"queued on %zu lists:\n"</span>, <a class="code" href="classdtn_1_1Bundle.html#ffda74852216e190b80e4bc07a2d74cc" title="The set of BundleLists that contain the Bundle.">mappings_</a>.size()); <a name="l00180"></a>00180 <span class="keywordflow">for</span> (BundleMappings::iterator i = <a class="code" href="classdtn_1_1Bundle.html#ffda74852216e190b80e4bc07a2d74cc" title="The set of BundleLists that contain the Bundle.">mappings_</a>.begin(); <a name="l00181"></a>00181 i != <a class="code" href="classdtn_1_1Bundle.html#ffda74852216e190b80e4bc07a2d74cc" title="The set of BundleLists that contain the Bundle.">mappings_</a>.end(); ++i) { <a name="l00182"></a>00182 buf->appendf(<span class="stringliteral">"\t%s\n"</span>, i->list()->name().c_str()); <a name="l00183"></a>00183 } <a name="l00184"></a>00184 <a name="l00185"></a>00185 buf->append(<span class="stringliteral">"\nblocks:"</span>); <a name="l00186"></a>00186 <span class="keywordflow">for</span> (BlockInfoVec::iterator iter = <a class="code" href="classdtn_1_1Bundle.html#3e6fa8dfaab47fbf560c10835aabef54" title="BP blocks as arrived off the wire.">recv_blocks_</a>.begin(); <a name="l00187"></a>00187 iter != <a class="code" href="classdtn_1_1Bundle.html#3e6fa8dfaab47fbf560c10835aabef54" title="BP blocks as arrived off the wire.">recv_blocks_</a>.end(); <a name="l00188"></a>00188 ++iter) <a name="l00189"></a>00189 { <a name="l00190"></a>00190 buf->appendf(<span class="stringliteral">"\n type: 0x%02x "</span>, iter->type()); <a name="l00191"></a>00191 <span class="keywordflow">if</span> (iter->data_offset() == 0) <a name="l00192"></a>00192 buf->append(<span class="stringliteral">"(runt)"</span>); <a name="l00193"></a>00193 <span class="keywordflow">else</span> { <a name="l00194"></a>00194 <span class="keywordflow">if</span> (!iter->complete()) <a name="l00195"></a>00195 buf->append(<span class="stringliteral">"(incomplete) "</span>); <a name="l00196"></a>00196 buf->appendf(<span class="stringliteral">"data length: %d"</span>, iter->full_length()); <a name="l00197"></a>00197 } <a name="l00198"></a>00198 } <a name="l00199"></a>00199 <span class="keywordflow">if</span> (<a class="code" href="classdtn_1_1Bundle.html#a979223562cdfd86dc47f8b61e528791" title="BP blocks given from local API.">api_blocks_</a>.size() > 0) { <a name="l00200"></a>00200 buf->append(<span class="stringliteral">"\napi_blocks:"</span>); <a name="l00201"></a>00201 <span class="keywordflow">for</span> (BlockInfoVec::iterator iter = <a class="code" href="classdtn_1_1Bundle.html#a979223562cdfd86dc47f8b61e528791" title="BP blocks given from local API.">api_blocks_</a>.begin(); <a name="l00202"></a>00202 iter != <a class="code" href="classdtn_1_1Bundle.html#a979223562cdfd86dc47f8b61e528791" title="BP blocks given from local API.">api_blocks_</a>.end(); <a name="l00203"></a>00203 ++iter) <a name="l00204"></a>00204 { <a name="l00205"></a>00205 buf->appendf(<span class="stringliteral">"\n type: 0x%02x data length: %d"</span>, <a name="l00206"></a>00206 iter->type(), iter->full_length()); <a name="l00207"></a>00207 } <a name="l00208"></a>00208 } <a name="l00209"></a>00209 buf->append(<span class="stringliteral">"\n"</span>); <a name="l00210"></a>00210 } <a name="l00211"></a>00211 <a name="l00212"></a>00212 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00213"></a>00213 <span class="keywordtype">void</span> <a name="l00214"></a><a class="code" href="classdtn_1_1Bundle.html#4d69d0b203471722f947069d7f85094a">00214</a> <a class="code" href="classdtn_1_1Bundle.html#4d69d0b203471722f947069d7f85094a" title="Virtual from SerializableObject.">Bundle::serialize</a>(oasys::SerializeAction* a) <a name="l00215"></a>00215 { <a name="l00216"></a>00216 a->process(<span class="stringliteral">"bundleid"</span>, &<a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>); <a name="l00217"></a>00217 a->process(<span class="stringliteral">"is_fragment"</span>, &<a class="code" href="classdtn_1_1Bundle.html#c26e4f31ba03473e0a2169f98940ab01" title="Fragmentary Bundle.">is_fragment_</a>); <a name="l00218"></a>00218 a->process(<span class="stringliteral">"is_admin"</span>, &<a class="code" href="classdtn_1_1Bundle.html#e303a30810b8050718234f8057913aa2" title="Administrative record bundle.">is_admin_</a>); <a name="l00219"></a>00219 a->process(<span class="stringliteral">"do_not_fragment"</span>, &<a class="code" href="classdtn_1_1Bundle.html#ad4b14e9eb112b7c5152f462d1090195" title="Bundle shouldn&#39;t be fragmented.">do_not_fragment_</a>); <a name="l00220"></a>00220 a->process(<span class="stringliteral">"source"</span>, &<a class="code" href="classdtn_1_1Bundle.html#e0ee1519e799770d83ba4b07d724b192" title="Source eid.">source_</a>); <a name="l00221"></a>00221 a->process(<span class="stringliteral">"dest"</span>, &<a class="code" href="classdtn_1_1Bundle.html#73bebd0daef752d8bf0212e9e79dbeec" title="Destination eid.">dest_</a>); <a name="l00222"></a>00222 a->process(<span class="stringliteral">"custodian"</span>, &<a class="code" href="classdtn_1_1Bundle.html#a45715369147ab506c5500f89276f7a6" title="Current custodian eid.">custodian_</a>); <a name="l00223"></a>00223 a->process(<span class="stringliteral">"replyto"</span>, &<a class="code" href="classdtn_1_1Bundle.html#6bfeb5c4a39936ecb34c554ea0aa1d24" title="Reply-To eid.">replyto_</a>); <a name="l00224"></a>00224 a->process(<span class="stringliteral">"prevhop"</span>, &<a class="code" href="classdtn_1_1Bundle.html#68efefda51e6feddb8c45aa51dd7b8b4" title="Previous hop eid.">prevhop_</a>); <a name="l00225"></a>00225 a->process(<span class="stringliteral">"priority"</span>, &<a class="code" href="classdtn_1_1Bundle.html#d6e6e672668691e60601a143de668d8c" title="Bundle priority.">priority_</a>); <a name="l00226"></a>00226 a->process(<span class="stringliteral">"custody_requested"</span>, &<a class="code" href="classdtn_1_1Bundle.html#520f9262a16c77123ce04630dcecea03" title="Custody requested.">custody_requested_</a>); <a name="l00227"></a>00227 a->process(<span class="stringliteral">"local_custody"</span>, &<a class="code" href="classdtn_1_1Bundle.html#00d69059c16f74a10d7300781b342a94" title="Does local node have custody.">local_custody_</a>); <a name="l00228"></a>00228 a->process(<span class="stringliteral">"singleton_dest"</span>, &<a class="code" href="classdtn_1_1Bundle.html#69aa11ee7359745f93f90ed88ce995b3" title="Destination endpoint is a singleton.">singleton_dest_</a>); <a name="l00229"></a>00229 a->process(<span class="stringliteral">"custody_rcpt"</span>, &<a class="code" href="classdtn_1_1Bundle.html#a69eea94a81f88f3e5d8f2c2153a653b" title="Custody xfer reporting.">custody_rcpt_</a>); <a name="l00230"></a>00230 a->process(<span class="stringliteral">"receive_rcpt"</span>, &<a class="code" href="classdtn_1_1Bundle.html#829a720ddcb9400c378ddccebab3ca45" title="Hop by hop reception receipt.">receive_rcpt_</a>); <a name="l00231"></a>00231 a->process(<span class="stringliteral">"forward_rcpt"</span>, &<a class="code" href="classdtn_1_1Bundle.html#b9af83a2e348628d03fef19721fe6d13" title="Hop by hop forwarding reporting.">forward_rcpt_</a>); <a name="l00232"></a>00232 a->process(<span class="stringliteral">"delivery_rcpt"</span>, &<a class="code" href="classdtn_1_1Bundle.html#cf37f1deb18cb25bbe6c4b949ce48b20" title="End-to-end delivery reporting.">delivery_rcpt_</a>); <a name="l00233"></a>00233 a->process(<span class="stringliteral">"deletion_rcpt"</span>, &<a class="code" href="classdtn_1_1Bundle.html#89b45b4bd679a21fb8358f0dd934522d" title="Bundle deletion reporting.">deletion_rcpt_</a>); <a name="l00234"></a>00234 a->process(<span class="stringliteral">"app_acked_rcpt"</span>, &<a class="code" href="classdtn_1_1Bundle.html#759ec250b64dc2484fb015816140951c" title="Acknowlege by application reporting.">app_acked_rcpt_</a>); <a name="l00235"></a>00235 a->process(<span class="stringliteral">"creation_ts_seconds"</span>, &<a class="code" href="classdtn_1_1Bundle.html#72faefd75f44ab417637735cba997f9a" title="Creation timestamp.">creation_ts_</a>.<a class="code" href="structdtn_1_1BundleTimestamp.html#02c8a347150620243240655bdcd2f42d" title="Seconds since 1/1/2000.">seconds_</a>); <a name="l00236"></a>00236 a->process(<span class="stringliteral">"creation_ts_seqno"</span>, &<a class="code" href="classdtn_1_1Bundle.html#72faefd75f44ab417637735cba997f9a" title="Creation timestamp.">creation_ts_</a>.<a class="code" href="structdtn_1_1BundleTimestamp.html#ebc8cea66862d7f6056da450db410347" title="Sub-second sequence number.">seqno_</a>); <a name="l00237"></a>00237 a->process(<span class="stringliteral">"expiration"</span>, &<a class="code" href="classdtn_1_1Bundle.html#dd0bfff0aeda43e68c75cc00d88f63cb" title="Bundle expiration time.">expiration_</a>); <a name="l00238"></a>00238 a->process(<span class="stringliteral">"payload"</span>, &<a class="code" href="classdtn_1_1Bundle.html#5240281e3072cc451bba55e716a3257e" title="Reference to the payload.">payload_</a>); <a name="l00239"></a>00239 a->process(<span class="stringliteral">"orig_length"</span>, &<a class="code" href="classdtn_1_1Bundle.html#ba21fc6b34def3e852b9582c8034f97e" title="Length of original bundle.">orig_length_</a>); <a name="l00240"></a>00240 a->process(<span class="stringliteral">"frag_offset"</span>, &<a class="code" href="classdtn_1_1Bundle.html#8b8fe900f2b2842861745855210ef271" title="Offset of fragment in original bundle.">frag_offset_</a>); <a name="l00241"></a>00241 a->process(<span class="stringliteral">"owner"</span>, &<a class="code" href="classdtn_1_1Bundle.html#f43afb7db765b6c7764c1427fee164f9" title="Declared entity that &quot;owns&quot; this bundle, which could be empty.">owner_</a>); <a name="l00242"></a>00242 a->process(<span class="stringliteral">"session_eid"</span>, &<a class="code" href="classdtn_1_1Bundle.html#59c4f745b91308e9e074363f6481b27f" title="Session eid.">session_eid_</a>); <a name="l00243"></a>00243 a->process(<span class="stringliteral">"session_flags"</span>, &<a class="code" href="classdtn_1_1Bundle.html#5056fc59e9964cc89bb8667fd352e935" title="Session flags.">session_flags_</a>); <a name="l00244"></a>00244 a->process(<span class="stringliteral">"extended_id_seconds"</span>, &<a class="code" href="classdtn_1_1Bundle.html#912b0960ad8b3d8803f4a16f0069dfbf" title="Identifier for external routers to refer to duplicate bundles.">extended_id_</a>.<a class="code" href="structdtn_1_1BundleTimestamp.html#02c8a347150620243240655bdcd2f42d" title="Seconds since 1/1/2000.">seconds_</a>); <a name="l00245"></a>00245 a->process(<span class="stringliteral">"extended_id_seqno"</span>, &<a class="code" href="classdtn_1_1Bundle.html#912b0960ad8b3d8803f4a16f0069dfbf" title="Identifier for external routers to refer to duplicate bundles.">extended_id_</a>.<a class="code" href="structdtn_1_1BundleTimestamp.html#ebc8cea66862d7f6056da450db410347" title="Sub-second sequence number.">seqno_</a>); <a name="l00246"></a>00246 a->process(<span class="stringliteral">"recv_blocks"</span>, &<a class="code" href="classdtn_1_1Bundle.html#3e6fa8dfaab47fbf560c10835aabef54" title="BP blocks as arrived off the wire.">recv_blocks_</a>); <a name="l00247"></a>00247 a->process(<span class="stringliteral">"api_blocks"</span>, &<a class="code" href="classdtn_1_1Bundle.html#a979223562cdfd86dc47f8b61e528791" title="BP blocks given from local API.">api_blocks_</a>); <a name="l00248"></a>00248 <a name="l00249"></a>00249 <span class="comment">// XXX/TODO serialize the forwarding log and make sure it's</span> <a name="l00250"></a>00250 <span class="comment">// updated on disk as it changes in memory</span> <a name="l00251"></a>00251 <span class="comment">//a->process("forwarding_log", &fwdlog_);</span> <a name="l00252"></a>00252 <a name="l00253"></a>00253 <span class="keywordflow">if</span> (a->action_code() == oasys::Serialize::UNMARSHAL) { <a name="l00254"></a>00254 <a class="code" href="classdtn_1_1Bundle.html#925f8ece32c039914da3f313e3851482" title="Is bundle in persistent store.">in_datastore_</a> = <span class="keyword">true</span>; <a name="l00255"></a>00255 <a class="code" href="classdtn_1_1Bundle.html#5240281e3072cc451bba55e716a3257e" title="Reference to the payload.">payload_</a>.<a class="code" href="classdtn_1_1BundlePayload.html#e701d992e994d03b174e500976e60c0c" title="Initialization when re-reading the database.">init_from_store</a>(<a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>); <a name="l00256"></a>00256 } <a name="l00257"></a>00257 } <a name="l00258"></a>00258 <a name="l00259"></a>00259 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00260"></a>00260 <span class="keywordtype">void</span> <a name="l00261"></a><a class="code" href="classdtn_1_1Bundle.html#659027ae11e78a7527b3e31e7ebf0eb1">00261</a> <a class="code" href="classdtn_1_1Bundle.html#659027ae11e78a7527b3e31e7ebf0eb1" title="Copy the metadata from one bundle to another (used in fragmentation).">Bundle::copy_metadata</a>(<a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* new_bundle)<span class="keyword"> const</span> <a name="l00262"></a>00262 <span class="keyword"></span>{ <a name="l00263"></a>00263 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#e303a30810b8050718234f8057913aa2" title="Administrative record bundle.">is_admin_</a> = <a class="code" href="classdtn_1_1Bundle.html#e303a30810b8050718234f8057913aa2" title="Administrative record bundle.">is_admin_</a>; <a name="l00264"></a>00264 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#c26e4f31ba03473e0a2169f98940ab01" title="Fragmentary Bundle.">is_fragment_</a> = <a class="code" href="classdtn_1_1Bundle.html#c26e4f31ba03473e0a2169f98940ab01" title="Fragmentary Bundle.">is_fragment_</a>; <a name="l00265"></a>00265 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#ad4b14e9eb112b7c5152f462d1090195" title="Bundle shouldn&#39;t be fragmented.">do_not_fragment_</a> = <a class="code" href="classdtn_1_1Bundle.html#ad4b14e9eb112b7c5152f462d1090195" title="Bundle shouldn&#39;t be fragmented.">do_not_fragment_</a>; <a name="l00266"></a>00266 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#e0ee1519e799770d83ba4b07d724b192" title="Source eid.">source_</a> = <a class="code" href="classdtn_1_1Bundle.html#e0ee1519e799770d83ba4b07d724b192" title="Source eid.">source_</a>; <a name="l00267"></a>00267 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#73bebd0daef752d8bf0212e9e79dbeec" title="Destination eid.">dest_</a> = <a class="code" href="classdtn_1_1Bundle.html#73bebd0daef752d8bf0212e9e79dbeec" title="Destination eid.">dest_</a>; <a name="l00268"></a>00268 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#a45715369147ab506c5500f89276f7a6" title="Current custodian eid.">custodian_</a> = <a class="code" href="classdtn_1_1Bundle.html#a45715369147ab506c5500f89276f7a6" title="Current custodian eid.">custodian_</a>; <a name="l00269"></a>00269 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#6bfeb5c4a39936ecb34c554ea0aa1d24" title="Reply-To eid.">replyto_</a> = <a class="code" href="classdtn_1_1Bundle.html#6bfeb5c4a39936ecb34c554ea0aa1d24" title="Reply-To eid.">replyto_</a>; <a name="l00270"></a>00270 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#d6e6e672668691e60601a143de668d8c" title="Bundle priority.">priority_</a> = <a class="code" href="classdtn_1_1Bundle.html#d6e6e672668691e60601a143de668d8c" title="Bundle priority.">priority_</a>; <a name="l00271"></a>00271 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#520f9262a16c77123ce04630dcecea03" title="Custody requested.">custody_requested_</a> = <a class="code" href="classdtn_1_1Bundle.html#520f9262a16c77123ce04630dcecea03" title="Custody requested.">custody_requested_</a>; <a name="l00272"></a>00272 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#00d69059c16f74a10d7300781b342a94" title="Does local node have custody.">local_custody_</a> = <span class="keyword">false</span>; <a name="l00273"></a>00273 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#69aa11ee7359745f93f90ed88ce995b3" title="Destination endpoint is a singleton.">singleton_dest_</a> = <a class="code" href="classdtn_1_1Bundle.html#69aa11ee7359745f93f90ed88ce995b3" title="Destination endpoint is a singleton.">singleton_dest_</a>; <a name="l00274"></a>00274 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#a69eea94a81f88f3e5d8f2c2153a653b" title="Custody xfer reporting.">custody_rcpt_</a> = <a class="code" href="classdtn_1_1Bundle.html#a69eea94a81f88f3e5d8f2c2153a653b" title="Custody xfer reporting.">custody_rcpt_</a>; <a name="l00275"></a>00275 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#829a720ddcb9400c378ddccebab3ca45" title="Hop by hop reception receipt.">receive_rcpt_</a> = <a class="code" href="classdtn_1_1Bundle.html#829a720ddcb9400c378ddccebab3ca45" title="Hop by hop reception receipt.">receive_rcpt_</a>; <a name="l00276"></a>00276 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#b9af83a2e348628d03fef19721fe6d13" title="Hop by hop forwarding reporting.">forward_rcpt_</a> = <a class="code" href="classdtn_1_1Bundle.html#b9af83a2e348628d03fef19721fe6d13" title="Hop by hop forwarding reporting.">forward_rcpt_</a>; <a name="l00277"></a>00277 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#cf37f1deb18cb25bbe6c4b949ce48b20" title="End-to-end delivery reporting.">delivery_rcpt_</a> = <a class="code" href="classdtn_1_1Bundle.html#cf37f1deb18cb25bbe6c4b949ce48b20" title="End-to-end delivery reporting.">delivery_rcpt_</a>; <a name="l00278"></a>00278 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#89b45b4bd679a21fb8358f0dd934522d" title="Bundle deletion reporting.">deletion_rcpt_</a> = <a class="code" href="classdtn_1_1Bundle.html#89b45b4bd679a21fb8358f0dd934522d" title="Bundle deletion reporting.">deletion_rcpt_</a>; <a name="l00279"></a>00279 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#759ec250b64dc2484fb015816140951c" title="Acknowlege by application reporting.">app_acked_rcpt_</a> = <a class="code" href="classdtn_1_1Bundle.html#759ec250b64dc2484fb015816140951c" title="Acknowlege by application reporting.">app_acked_rcpt_</a>; <a name="l00280"></a>00280 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#72faefd75f44ab417637735cba997f9a" title="Creation timestamp.">creation_ts_</a> = <a class="code" href="classdtn_1_1Bundle.html#72faefd75f44ab417637735cba997f9a" title="Creation timestamp.">creation_ts_</a>; <a name="l00281"></a>00281 new_bundle-><a class="code" href="classdtn_1_1Bundle.html#dd0bfff0aeda43e68c75cc00d88f63cb" title="Bundle expiration time.">expiration_</a> = <a class="code" href="classdtn_1_1Bundle.html#dd0bfff0aeda43e68c75cc00d88f63cb" title="Bundle expiration time.">expiration_</a>; <a name="l00282"></a>00282 } <a name="l00283"></a>00283 <a name="l00284"></a>00284 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00285"></a>00285 <span class="keywordtype">int</span> <a name="l00286"></a><a class="code" href="classdtn_1_1Bundle.html#5c44263a2646f8e13115371b14f5359a">00286</a> <a class="code" href="classdtn_1_1Bundle.html#5c44263a2646f8e13115371b14f5359a" title="Bump up the reference count.">Bundle::add_ref</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* what1, <span class="keyword">const</span> <span class="keywordtype">char</span>* what2) <a name="l00287"></a>00287 { <a name="l00288"></a>00288 (void)what1; <a name="l00289"></a>00289 (void)what2; <a name="l00290"></a>00290 <a name="l00291"></a>00291 oasys::ScopeLock l(&<a class="code" href="classdtn_1_1Bundle.html#39fd05c48dca2e56883ad4d2b34d7a3e" title="Lock for bundle data that can be updated by multiple threads.">lock_</a>, <span class="stringliteral">"Bundle::add_ref"</span>); <a name="l00292"></a>00292 <a name="l00293"></a>00293 ASSERTF(<a class="code" href="classdtn_1_1Bundle.html#cc0ac36721c1226af7961d8036ba7451" title="Bit indicating whether a bundle free event has been posted.">freed_</a> == <span class="keyword">false</span>, <span class="stringliteral">"Bundle::add_ref on bundle %d (%p)"</span> <a name="l00294"></a>00294 <span class="stringliteral">"called when bundle is already being freed!"</span>, <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>, <span class="keyword">this</span>); <a name="l00295"></a>00295 <a name="l00296"></a>00296 <a class="code" href="SDNV_8cc.html#ca68c0d4ac8df0838e209fb5300f7be3">ASSERT</a>(<a class="code" href="classdtn_1_1Bundle.html#484370b532a1f328d3b2582af82cd2b6" title="Bundle reference count.">refcount_</a> >= 0); <a name="l00297"></a>00297 <span class="keywordtype">int</span> ret = ++<a class="code" href="classdtn_1_1Bundle.html#484370b532a1f328d3b2582af82cd2b6" title="Bundle reference count.">refcount_</a>; <a name="l00298"></a>00298 log_debug_p(<span class="stringliteral">"/dtn/bundle/refs"</span>, <a name="l00299"></a>00299 <span class="stringliteral">"bundle id %d (%p): refcount %d -> %d (%zu mappings) add %s %s"</span>, <a name="l00300"></a>00300 <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>, <span class="keyword">this</span>, <a class="code" href="classdtn_1_1Bundle.html#484370b532a1f328d3b2582af82cd2b6" title="Bundle reference count.">refcount_</a> - 1, <a class="code" href="classdtn_1_1Bundle.html#484370b532a1f328d3b2582af82cd2b6" title="Bundle reference count.">refcount_</a>, <a name="l00301"></a>00301 <a class="code" href="classdtn_1_1Bundle.html#ffda74852216e190b80e4bc07a2d74cc" title="The set of BundleLists that contain the Bundle.">mappings_</a>.size(), what1, what2); <a name="l00302"></a>00302 <span class="keywordflow">return</span> ret; <a name="l00303"></a>00303 } <a name="l00304"></a>00304 <a name="l00305"></a>00305 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00306"></a>00306 <span class="keywordtype">int</span> <a name="l00307"></a><a class="code" href="classdtn_1_1Bundle.html#386b3d36bfdbe4528b4fcaaf1078063c">00307</a> <a class="code" href="classdtn_1_1Bundle.html#386b3d36bfdbe4528b4fcaaf1078063c" title="Decrement the reference count.">Bundle::del_ref</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* what1, <span class="keyword">const</span> <span class="keywordtype">char</span>* what2) <a name="l00308"></a>00308 { <a name="l00309"></a>00309 (void)what1; <a name="l00310"></a>00310 (void)what2; <a name="l00311"></a>00311 <a name="l00312"></a>00312 oasys::ScopeLock l(&<a class="code" href="classdtn_1_1Bundle.html#39fd05c48dca2e56883ad4d2b34d7a3e" title="Lock for bundle data that can be updated by multiple threads.">lock_</a>, <span class="stringliteral">"Bundle::del_ref"</span>); <a name="l00313"></a>00313 <a name="l00314"></a>00314 ASSERTF(<a class="code" href="classdtn_1_1Bundle.html#cc0ac36721c1226af7961d8036ba7451" title="Bit indicating whether a bundle free event has been posted.">freed_</a> == <span class="keyword">false</span>, <span class="stringliteral">"Bundle::del_ref on bundle %d (%p)"</span> <a name="l00315"></a>00315 <span class="stringliteral">"called when bundle is already being freed!"</span>, <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>, <span class="keyword">this</span>); <a name="l00316"></a>00316 <a name="l00317"></a>00317 <span class="keywordtype">int</span> ret = --<a class="code" href="classdtn_1_1Bundle.html#484370b532a1f328d3b2582af82cd2b6" title="Bundle reference count.">refcount_</a>; <a name="l00318"></a>00318 log_debug_p(<span class="stringliteral">"/dtn/bundle/refs"</span>, <a name="l00319"></a>00319 <span class="stringliteral">"bundle id %d (%p): refcount %d -> %d (%zu mappings) del %s %s"</span>, <a name="l00320"></a>00320 <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>, <span class="keyword">this</span>, <a class="code" href="classdtn_1_1Bundle.html#484370b532a1f328d3b2582af82cd2b6" title="Bundle reference count.">refcount_</a> + 1, <a class="code" href="classdtn_1_1Bundle.html#484370b532a1f328d3b2582af82cd2b6" title="Bundle reference count.">refcount_</a>, <a name="l00321"></a>00321 <a class="code" href="classdtn_1_1Bundle.html#ffda74852216e190b80e4bc07a2d74cc" title="The set of BundleLists that contain the Bundle.">mappings_</a>.size(), what1, what2); <a name="l00322"></a>00322 <a name="l00323"></a>00323 <span class="keywordflow">if</span> (<a class="code" href="classdtn_1_1Bundle.html#484370b532a1f328d3b2582af82cd2b6" title="Bundle reference count.">refcount_</a> != 0) { <a name="l00324"></a>00324 <span class="keywordflow">return</span> ret; <a name="l00325"></a>00325 } <a name="l00326"></a>00326 <a name="l00327"></a>00327 <a class="code" href="classdtn_1_1Bundle.html#cc0ac36721c1226af7961d8036ba7451" title="Bit indicating whether a bundle free event has been posted.">freed_</a> = <span class="keyword">true</span>; <a name="l00328"></a>00328 <a name="l00329"></a>00329 log_debug_p(<span class="stringliteral">"/dtn/bundle"</span>, <a name="l00330"></a>00330 <span class="stringliteral">"bundle id %d (%p): no more references, posting free event"</span>, <a name="l00331"></a>00331 <a class="code" href="classdtn_1_1Bundle.html#351580b526d962c1e8bd730157b4c969" title="Local bundle identifier.">bundleid_</a>, <span class="keyword">this</span>); <a name="l00332"></a>00332 <a name="l00333"></a>00333 BundleDaemon::instance()->post(<span class="keyword">new</span> <a class="code" href="classdtn_1_1BundleFreeEvent.html" title="Event class for bundles that have no more references to them.">BundleFreeEvent</a>(<span class="keyword">this</span>)); <a name="l00334"></a>00334 <a name="l00335"></a>00335 <span class="keywordflow">return</span> 0; <a name="l00336"></a>00336 } <a name="l00337"></a>00337 <a name="l00338"></a>00338 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00339"></a>00339 <span class="keywordtype">size_t</span> <a name="l00340"></a><a class="code" href="classdtn_1_1Bundle.html#2b656a17b6971ca5a48819882cc1e659">00340</a> <a class="code" href="classdtn_1_1Bundle.html#2b656a17b6971ca5a48819882cc1e659" title="Return the number of mappings for this bundle.">Bundle::num_mappings</a>() <a name="l00341"></a>00341 { <a name="l00342"></a>00342 oasys::ScopeLock l(&<a class="code" href="classdtn_1_1Bundle.html#39fd05c48dca2e56883ad4d2b34d7a3e" title="Lock for bundle data that can be updated by multiple threads.">lock_</a>, <span class="stringliteral">"Bundle::num_mappings"</span>); <a name="l00343"></a>00343 <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Bundle.html#ffda74852216e190b80e4bc07a2d74cc" title="The set of BundleLists that contain the Bundle.">mappings_</a>.size(); <a name="l00344"></a>00344 } <a name="l00345"></a>00345 <a name="l00346"></a>00346 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00347"></a>00347 <a class="code" href="classdtn_1_1BundleMappings.html" title="Class to define the set of mappings.">BundleMappings</a>* <a name="l00348"></a><a class="code" href="classdtn_1_1Bundle.html#00c8ac89d536bda8d596495e98064825">00348</a> <a class="code" href="classdtn_1_1Bundle.html#00c8ac89d536bda8d596495e98064825" title="Return a pointer to the mappings.">Bundle::mappings</a>() <a name="l00349"></a>00349 { <a name="l00350"></a>00350 ASSERTF(<a class="code" href="classdtn_1_1Bundle.html#39fd05c48dca2e56883ad4d2b34d7a3e" title="Lock for bundle data that can be updated by multiple threads.">lock_</a>.is_locked_by_me(), <a name="l00351"></a>00351 <span class="stringliteral">"Must lock Bundle before using mappings iterator"</span>); <a name="l00352"></a>00352 <a name="l00353"></a>00353 <span class="keywordflow">return</span> &<a class="code" href="classdtn_1_1Bundle.html#ffda74852216e190b80e4bc07a2d74cc" title="The set of BundleLists that contain the Bundle.">mappings_</a>; <a name="l00354"></a>00354 } <a name="l00355"></a>00355 <a name="l00356"></a>00356 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00357"></a>00357 <span class="keywordtype">bool</span> <a name="l00358"></a><a class="code" href="classdtn_1_1Bundle.html#13d641b5d6a6617a8c37ab28a0a6c843">00358</a> <a class="code" href="classdtn_1_1Bundle.html#13d641b5d6a6617a8c37ab28a0a6c843" title="Return true if the bundle is on the given list.">Bundle::is_queued_on</a>(<span class="keyword">const</span> <a class="code" href="classdtn_1_1BundleList.html" title="List structure for handling bundles.">BundleList</a>* bundle_list) <a name="l00359"></a>00359 { <a name="l00360"></a>00360 oasys::ScopeLock l(&<a class="code" href="classdtn_1_1Bundle.html#39fd05c48dca2e56883ad4d2b34d7a3e" title="Lock for bundle data that can be updated by multiple threads.">lock_</a>, <span class="stringliteral">"Bundle::is_queued_on"</span>); <a name="l00361"></a>00361 <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Bundle.html#ffda74852216e190b80e4bc07a2d74cc" title="The set of BundleLists that contain the Bundle.">mappings_</a>.<a class="code" href="classdtn_1_1BundleMappings.html#e50235d3eff7943b139cad61e2c00854" title="Syntactic sugar for finding whether or not a mapping exists for the given list.">contains</a>(bundle_list); <a name="l00362"></a>00362 } <a name="l00363"></a>00363 <a name="l00364"></a>00364 <span class="comment">//----------------------------------------------------------------------</span> <a name="l00365"></a>00365 <span class="keywordtype">bool</span> <a name="l00366"></a><a class="code" href="classdtn_1_1Bundle.html#0205e1c4938ecfd753295c61f2002a48">00366</a> <a class="code" href="classdtn_1_1Bundle.html#0205e1c4938ecfd753295c61f2002a48" title="Validate the bundle&#39;s fields.">Bundle::validate</a>(oasys::StringBuffer* errbuf) <a name="l00367"></a>00367 { <a name="l00368"></a>00368 <span class="keywordflow">if</span> (!<a class="code" href="classdtn_1_1Bundle.html#e0ee1519e799770d83ba4b07d724b192" title="Source eid.">source_</a>.<a class="code" href="classdtn_1_1EndpointID.html#bbf47839fe5cc8cb425af9a257a92ef5">valid</a>()) { <a name="l00369"></a>00369 errbuf->appendf(<span class="stringliteral">"invalid source eid [%s]"</span>, <a class="code" href="classdtn_1_1Bundle.html#e0ee1519e799770d83ba4b07d724b192" title="Source eid.">source_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>()); <a name="l00370"></a>00370 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00371"></a>00371 } <a name="l00372"></a>00372 <a name="l00373"></a>00373 <span class="keywordflow">if</span> (!<a class="code" href="classdtn_1_1Bundle.html#73bebd0daef752d8bf0212e9e79dbeec" title="Destination eid.">dest_</a>.<a class="code" href="classdtn_1_1EndpointID.html#bbf47839fe5cc8cb425af9a257a92ef5">valid</a>()) { <a name="l00374"></a>00374 errbuf->appendf(<span class="stringliteral">"invalid dest eid [%s]"</span>, <a class="code" href="classdtn_1_1Bundle.html#73bebd0daef752d8bf0212e9e79dbeec" title="Destination eid.">dest_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>()); <a name="l00375"></a>00375 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00376"></a>00376 } <a name="l00377"></a>00377 <a name="l00378"></a>00378 <span class="keywordflow">if</span> (!<a class="code" href="classdtn_1_1Bundle.html#6bfeb5c4a39936ecb34c554ea0aa1d24" title="Reply-To eid.">replyto_</a>.<a class="code" href="classdtn_1_1EndpointID.html#bbf47839fe5cc8cb425af9a257a92ef5">valid</a>()) { <a name="l00379"></a>00379 errbuf->appendf(<span class="stringliteral">"invalid replyto eid [%s]"</span>, <a class="code" href="classdtn_1_1Bundle.html#6bfeb5c4a39936ecb34c554ea0aa1d24" title="Reply-To eid.">replyto_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>()); <a name="l00380"></a>00380 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00381"></a>00381 } <a name="l00382"></a>00382 <a name="l00383"></a>00383 <span class="keywordflow">if</span> (!<a class="code" href="classdtn_1_1Bundle.html#a45715369147ab506c5500f89276f7a6" title="Current custodian eid.">custodian_</a>.<a class="code" href="classdtn_1_1EndpointID.html#bbf47839fe5cc8cb425af9a257a92ef5">valid</a>()) { <a name="l00384"></a>00384 errbuf->appendf(<span class="stringliteral">"invalid custodian eid [%s]"</span>, <a class="code" href="classdtn_1_1Bundle.html#a45715369147ab506c5500f89276f7a6" title="Current custodian eid.">custodian_</a>.<a class="code" href="classdtn_1_1EndpointID.html#c9d8a72806359621f4d2850c1e78269c">c_str</a>()); <a name="l00385"></a>00385 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00386"></a>00386 } <a name="l00387"></a>00387 <a name="l00388"></a>00388 <span class="keywordflow">return</span> <span class="keyword">true</span>; <a name="l00389"></a>00389 <a name="l00390"></a>00390 } <a name="l00391"></a>00391 <a name="l00392"></a>00392 } <span class="comment">// namespace dtn</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 21 14:09:38 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>