Sophie

Sophie

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

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: CLConnection.h Source File</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><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>CLConnection.h</h1><a href="CLConnection_8h.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 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">#ifndef _CLCONNECTION_H_</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _CLCONNECTION_H_</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;oasys/debug/Log.h&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;oasys/thread/Atomic.h&gt;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;oasys/thread/MsgQueue.h&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;oasys/thread/Thread.h&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;oasys/util/SparseBitmap.h&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;oasys/util/StreamBuffer.h&gt;</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="ConnectionConvergenceLayer_8h.html">ConnectionConvergenceLayer.h</a>"</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="bundling_2Bundle_8h.html">bundling/Bundle.h</a>"</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="BundleEvent_8h.html">bundling/BundleEvent.h</a>"</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="keyword">namespace </span>dtn {
<a name="l00033"></a>00033 
<a name="l00038"></a><a class="code" href="classdtn_1_1CLConnection.html">00038</a> <span class="keyword">class </span><a class="code" href="classdtn_1_1CLConnection.html" title="Helper class (and thread) that manages an established connection with a peer daemon...">CLConnection</a> : <span class="keyword">public</span> <a class="code" href="classdtn_1_1CLInfo.html" title="Abstract base class for convergence layer specific state stored in an interface /...">CLInfo</a>,
<a name="l00039"></a>00039                      <span class="keyword">public</span> oasys::Thread,
<a name="l00040"></a>00040                      <span class="keyword">public</span> oasys::<a class="code" href="classoasys_1_1Logger.html">Logger</a> {
<a name="l00041"></a>00041 <span class="keyword">public</span>:
<a name="l00042"></a><a class="code" href="classdtn_1_1CLConnection.html#396a8cf29f208c710ef11c9d8ba712b0">00042</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html" title="All convergence layers that maintain a connection (i.e.">ConnectionConvergenceLayer</a>;
<a name="l00043"></a><a class="code" href="classdtn_1_1CLConnection.html#62ec0d38fe9ddb805daa477d27e57fde">00043</a>     <span class="keyword">typedef</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html" title="Tunable parameter structure stored in each Link&amp;#39;s CLInfo slot.">ConnectionConvergenceLayer::LinkParams</a> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html" title="Tunable parameter structure stored in each Link&amp;#39;s CLInfo slot.">LinkParams</a>;
<a name="l00044"></a>00044     
<a name="l00048"></a>00048     <a class="code" href="classdtn_1_1CLConnection.html#ecdbc7977153da5766537d58c7b86640" title="Constructor.">CLConnection</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* classname,
<a name="l00049"></a>00049                  <span class="keyword">const</span> <span class="keywordtype">char</span>* logpath,
<a name="l00050"></a>00050                  <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html" title="All convergence layers that maintain a connection (i.e.">ConnectionConvergenceLayer</a>* cl,
<a name="l00051"></a>00051                  <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html" title="Tunable parameter structure stored in each Link&amp;#39;s CLInfo slot.">LinkParams</a>* params,
<a name="l00052"></a>00052                  <span class="keywordtype">bool</span> active_connector);
<a name="l00053"></a>00053 
<a name="l00057"></a>00057     <span class="keyword">virtual</span> <a class="code" href="classdtn_1_1CLConnection.html#0a721370a299527ee06f7945d218d320">~CLConnection</a>();
<a name="l00058"></a>00058 
<a name="l00062"></a><a class="code" href="classdtn_1_1CLConnection.html#4104e08b78e6796beff1b46d9bdd6a31">00062</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#4104e08b78e6796beff1b46d9bdd6a31" title="Attach to the given contact.">set_contact</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#5f869544c85c75b5a85a14d6e90d7ff7" title="Typedef for a reference on a contact.">ContactRef</a>&amp; contact) { <a class="code" href="classdtn_1_1CLConnection.html#29c0707d21c5347919186a8e14728ed0" title="Ref to the Contact.">contact_</a> = contact; }
<a name="l00063"></a>00063 
<a name="l00064"></a>00064 <span class="keyword">protected</span>:
<a name="l00068"></a>00068     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#851229a5aa77ceed90311a41db937c18" title="Main run loop.">run</a>();
<a name="l00069"></a>00069 
<a name="l00072"></a>00072     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#1214075456352961d8a70f82f69be0bf">contact_up</a>();
<a name="l00073"></a>00073     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#4b0859bd97cd3e0d6d4dba4ba070c8cb">break_contact</a>(<a class="code" href="classdtn_1_1ContactEvent.html#e20f7357509a2bcca3d8e6c8daf552f7" title="Reason codes for contact state operations.">ContactEvent::reason_t</a> reason);
<a name="l00074"></a>00074     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#3980220ff1677d1e68a4738e690ef3a4">process_command</a>();
<a name="l00075"></a>00075     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1CLConnection.html#46186272ffc0c76aedd5e2035e8865b7">find_contact</a>(<span class="keyword">const</span> <a class="code" href="classdtn_1_1EndpointID.html">EndpointID</a>&amp; peer_eid);
<a name="l00077"></a>00077 
<a name="l00081"></a><a class="code" href="classdtn_1_1CLConnection.html#463fcafdc6fd41f67a39c78decb0ee92">00081</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#463fcafdc6fd41f67a39c78decb0ee92" title="Assignment function for the nexthop identifier.">set_nexthop</a>(<span class="keyword">const</span> std::string&amp; nexthop) {
<a name="l00082"></a>00082         <a class="code" href="classdtn_1_1CLConnection.html#04d6a5a9a07c68cd62756a5706ff58d1" title="Nexthop identifier set by CL.">nexthop_</a> = nexthop;
<a name="l00083"></a>00083     }
<a name="l00084"></a>00084 
<a name="l00088"></a>00088     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#1a74612d4da690a4719bfc1b3a37ded1" title="Initiate a connection to the remote side.">connect</a>() = 0;
<a name="l00089"></a>00089 
<a name="l00096"></a><a class="code" href="classdtn_1_1CLConnection.html#e57d6885f1053d64c54403ec6d263f6a">00096</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#e57d6885f1053d64c54403ec6d263f6a" title="Accept a connection from the remote side.">accept</a>() { NOTREACHED; }
<a name="l00097"></a>00097 
<a name="l00101"></a>00101     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#29174c5754484629bfb63c59ffb5ad46" title="Shut down the connection.">disconnect</a>() = 0;
<a name="l00102"></a>00102 
<a name="l00107"></a>00107     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#4eafc63965ee312f521b46d4a16e5621" title="Fill in the pollfds array with any file descriptors that should be waited on for...">initialize_pollfds</a>() = 0;
<a name="l00108"></a>00108 
<a name="l00112"></a>00112     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#3130269f207546f88bac4834a477accd" title="Handle notification that bundle(s) may be queued on the link.">handle_bundles_queued</a>() = 0;
<a name="l00113"></a>00113 
<a name="l00117"></a>00117     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#2aa5e13fd12c89035b952a7b4e19cb93" title="Handle a cancel bundle request.">handle_cancel_bundle</a>(<a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* b) = 0;
<a name="l00118"></a>00118 
<a name="l00129"></a>00129     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1CLConnection.html#ec0e51344116123883bafeafb0db4839" title="Start or continue transmission of bundle data or cl acks.">send_pending_data</a>() = 0;
<a name="l00130"></a>00130     
<a name="l00134"></a>00134     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#bd706e4a2d9c0ba04327347008a7affc" title="Handle network activity from the remote side.">handle_poll_activity</a>() = 0;
<a name="l00135"></a>00135 
<a name="l00139"></a>00139     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1CLConnection.html#7abfc7041499dd4cd5244a59843742a2" title="Handle network activity from the remote side.">handle_poll_timeout</a>() = 0;
<a name="l00140"></a>00140 
<a name="l00145"></a><a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d668">00145</a>     <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00146"></a><a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d668d020e5830ec08d958341bcb5898f8ddd">00146</a>         <a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d668d020e5830ec08d958341bcb5898f8ddd">CLMSG_INVALID</a>        = 0,
<a name="l00147"></a><a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d6682a3cb1958e000ece0c3b1ec62b6a6a28">00147</a>         <a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d6682a3cb1958e000ece0c3b1ec62b6a6a28">CLMSG_BUNDLES_QUEUED</a> = 1,
<a name="l00148"></a><a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d6687956f18d39bad128e8ec2e0b4015dd4b">00148</a>         <a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d6687956f18d39bad128e8ec2e0b4015dd4b">CLMSG_CANCEL_BUNDLE</a>  = 2,
<a name="l00149"></a><a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d6682a906c20963b066daaca910e2e6b5ffe">00149</a>         <a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d6682a906c20963b066daaca910e2e6b5ffe">CLMSG_BREAK_CONTACT</a>  = 3,
<a name="l00150"></a>00150     } <a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d668" title="Enum for messages from the daemon thread to the connection thread.">clmsg_t</a>;
<a name="l00151"></a>00151 
<a name="l00155"></a><a class="code" href="classdtn_1_1CLConnection.html#54a30c5db61563bb1f5c05d00fe70106">00155</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classdtn_1_1CLConnection.html#54a30c5db61563bb1f5c05d00fe70106" title="Message to string conversion.">clmsg_to_str</a>(<a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d668" title="Enum for messages from the daemon thread to the connection thread.">clmsg_t</a> type) {
<a name="l00156"></a>00156         <span class="keywordflow">switch</span>(type) {
<a name="l00157"></a>00157         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d668d020e5830ec08d958341bcb5898f8ddd">CLMSG_INVALID</a>:             <span class="keywordflow">return</span> <span class="stringliteral">"CLMSG_INVALID"</span>;
<a name="l00158"></a>00158         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d6682a3cb1958e000ece0c3b1ec62b6a6a28">CLMSG_BUNDLES_QUEUED</a>:      <span class="keywordflow">return</span> <span class="stringliteral">"CLMSG_BUNDLES_QUEUED"</span>;
<a name="l00159"></a>00159         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d6687956f18d39bad128e8ec2e0b4015dd4b">CLMSG_CANCEL_BUNDLE</a>:       <span class="keywordflow">return</span> <span class="stringliteral">"CLMSG_CANCEL_BUNDLE"</span>;
<a name="l00160"></a>00160         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d6682a906c20963b066daaca910e2e6b5ffe">CLMSG_BREAK_CONTACT</a>:       <span class="keywordflow">return</span> <span class="stringliteral">"CLMSG_BREAK_CONTACT"</span>;
<a name="l00161"></a>00161         <span class="keywordflow">default</span>:                        PANIC(<span class="stringliteral">"bogus clmsg_t"</span>);
<a name="l00162"></a>00162         }
<a name="l00163"></a>00163     }
<a name="l00164"></a>00164     
<a name="l00169"></a><a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html">00169</a>     <span class="keyword">struct </span><a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html" title="struct used for messages going from the daemon thread to the connection thread.">CLMsg</a> {
<a name="l00170"></a><a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#beabad5a22ecdd2852ec6757a5ff709b">00170</a>         <a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#beabad5a22ecdd2852ec6757a5ff709b">CLMsg</a>()
<a name="l00171"></a>00171             : <a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#ea49fde9029767c613a8ce8e6a5f7f5b">type_</a>(<a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d668d020e5830ec08d958341bcb5898f8ddd">CLMSG_INVALID</a>),
<a name="l00172"></a>00172               <a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#b040e11f0740520896aa4577456b2fd4">bundle_</a>(<span class="stringliteral">"ConnectionConvergenceLayer::CLMsg"</span>) {}
<a name="l00173"></a>00173         
<a name="l00174"></a><a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#fa16767b5c2f856c611f2be7a74feacc">00174</a>         <a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#beabad5a22ecdd2852ec6757a5ff709b">CLMsg</a>(<a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d668" title="Enum for messages from the daemon thread to the connection thread.">clmsg_t</a> type)
<a name="l00175"></a>00175             : <a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#ea49fde9029767c613a8ce8e6a5f7f5b">type_</a>(type),
<a name="l00176"></a>00176               <a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#b040e11f0740520896aa4577456b2fd4">bundle_</a>(<span class="stringliteral">"ConnectionConvergenceLayer::CLMsg"</span>) {}
<a name="l00177"></a>00177         
<a name="l00178"></a><a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#4843464aa9679bbd0d78aa8e8c4ddb0c">00178</a>         <a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#beabad5a22ecdd2852ec6757a5ff709b">CLMsg</a>(<a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d668" title="Enum for messages from the daemon thread to the connection thread.">clmsg_t</a> type, <span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>&amp; bundle)
<a name="l00179"></a>00179             : <a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#ea49fde9029767c613a8ce8e6a5f7f5b">type_</a>(type),
<a name="l00180"></a>00180               <a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#b040e11f0740520896aa4577456b2fd4">bundle_</a>(bundle.object(), <span class="stringliteral">"ConnectionConvergenceLayer::CLMsg"</span>) {}
<a name="l00181"></a>00181         
<a name="l00182"></a><a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#ea49fde9029767c613a8ce8e6a5f7f5b">00182</a>         <a class="code" href="classdtn_1_1CLConnection.html#63574e52407c97761d234ee70673d668" title="Enum for messages from the daemon thread to the connection thread.">clmsg_t</a>   <a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#ea49fde9029767c613a8ce8e6a5f7f5b">type_</a>;
<a name="l00183"></a><a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#b040e11f0740520896aa4577456b2fd4">00183</a>         <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a> <a class="code" href="structdtn_1_1CLConnection_1_1CLMsg.html#b040e11f0740520896aa4577456b2fd4">bundle_</a>;
<a name="l00184"></a>00184     };
<a name="l00185"></a>00185 
<a name="l00189"></a><a class="code" href="classdtn_1_1CLConnection.html#522cc03792f74a0d9b432877624488f6">00189</a>     <span class="keyword">typedef</span> oasys::SparseBitmap&lt;u_int32_t&gt; <a class="code" href="classdtn_1_1CLConnection.html#522cc03792f74a0d9b432877624488f6" title="Typedef for bitmaps used to record sent/received/acked data.">DataBitmap</a>;
<a name="l00190"></a>00190    
<a name="l00195"></a><a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html">00195</a>     <span class="keyword">class </span><a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html" title="Struct used to record bundles that are in-flight along with their transmission state...">InFlightBundle</a> {
<a name="l00196"></a>00196     <span class="keyword">public</span>:
<a name="l00197"></a><a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#4ee3e2c9b0e6439f2dc8f8df8ae10231">00197</a>         <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#4ee3e2c9b0e6439f2dc8f8df8ae10231">InFlightBundle</a>(<a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* b)
<a name="l00198"></a>00198             : <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#e0fb72eeccee446eccf8b17a3cc84b94">bundle_</a>(b, <span class="stringliteral">"CLConnection::InFlightBundle"</span>),
<a name="l00199"></a>00199               <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#fde31db0c5211defbb1e58d66efb8a68">total_length_</a>(0),
<a name="l00200"></a>00200               <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#cdd5a56f7932848e06a339194d04c29b">send_complete_</a>(false),
<a name="l00201"></a>00201               <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#c9159f7ebd46e2427c4095d5bcc1d3e9">transmit_event_posted_</a>(false)
<a name="l00202"></a>00202         {}
<a name="l00203"></a>00203         
<a name="l00204"></a><a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#e0fb72eeccee446eccf8b17a3cc84b94">00204</a>         <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a> <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#e0fb72eeccee446eccf8b17a3cc84b94">bundle_</a>;
<a name="l00205"></a><a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#d35f95a5a58b157fa3d4caa2a746d02b">00205</a>         <a class="code" href="classdtn_1_1BlockInfoVec.html" title="Class for a vector of BlockInfo structures.">BlockInfoVec</a>* <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#d35f95a5a58b157fa3d4caa2a746d02b">blocks_</a>;
<a name="l00206"></a>00206 
<a name="l00207"></a><a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#fde31db0c5211defbb1e58d66efb8a68">00207</a>         u_int32_t <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#fde31db0c5211defbb1e58d66efb8a68">total_length_</a>;
<a name="l00208"></a><a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#cdd5a56f7932848e06a339194d04c29b">00208</a>         <span class="keywordtype">bool</span>      <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#cdd5a56f7932848e06a339194d04c29b">send_complete_</a>;
<a name="l00209"></a><a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#c9159f7ebd46e2427c4095d5bcc1d3e9">00209</a>         <span class="keywordtype">bool</span>      <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#c9159f7ebd46e2427c4095d5bcc1d3e9">transmit_event_posted_</a>;
<a name="l00210"></a>00210         
<a name="l00211"></a><a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#f4f89ea9800c7eefe41e51018188180a">00211</a>         <a class="code" href="classdtn_1_1CLConnection.html#522cc03792f74a0d9b432877624488f6" title="Typedef for bitmaps used to record sent/received/acked data.">DataBitmap</a> <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#f4f89ea9800c7eefe41e51018188180a">sent_data_</a>;
<a name="l00212"></a><a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#7ba3f112c83aea033fab72f7759ce7f2">00212</a>         <a class="code" href="classdtn_1_1CLConnection.html#522cc03792f74a0d9b432877624488f6" title="Typedef for bitmaps used to record sent/received/acked data.">DataBitmap</a> <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#7ba3f112c83aea033fab72f7759ce7f2">ack_data_</a>;
<a name="l00213"></a>00213 
<a name="l00214"></a>00214     <span class="keyword">private</span>:
<a name="l00215"></a>00215         <span class="comment">// make sure we don't copy the structure by leaving the copy</span>
<a name="l00216"></a>00216         <span class="comment">// constructor undefined</span>
<a name="l00217"></a>00217         <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html#4ee3e2c9b0e6439f2dc8f8df8ae10231">InFlightBundle</a>(<span class="keyword">const</span> <a class="code" href="classdtn_1_1CLConnection_1_1InFlightBundle.html" title="Struct used to record bundles that are in-flight along with their transmission state...">InFlightBundle</a>&amp; copy);
<a name="l00218"></a>00218     };
<a name="l00219"></a>00219 
<a name="l00223"></a><a class="code" href="classdtn_1_1CLConnection.html#68eb8a5d4126dfab8698aa9712ab40fe">00223</a>     <span class="keyword">typedef</span> std::list&lt;InFlightBundle*&gt; <a class="code" href="classdtn_1_1CLConnection.html#68eb8a5d4126dfab8698aa9712ab40fe" title="Typedef for the list of in-flight bundles.">InFlightList</a>;
<a name="l00224"></a>00224 
<a name="l00230"></a><a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html">00230</a>     <span class="keyword">class </span><a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html" title="Struct used to record bundles that are in the process of being received along with...">IncomingBundle</a> {
<a name="l00231"></a>00231     <span class="keyword">public</span>:
<a name="l00232"></a><a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#4a03ca20141695b085cb035183ab318c">00232</a>         <a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#4a03ca20141695b085cb035183ab318c">IncomingBundle</a>(<a class="code" href="classdtn_1_1Bundle.html" title="The internal representation of a bundle.">Bundle</a>* b)
<a name="l00233"></a>00233             : <a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#7e868dff33d6868d5e42582fac3f4109">bundle_</a>(b, <span class="stringliteral">"CLConnection::IncomingBundle"</span>),
<a name="l00234"></a>00234               <a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#2f9d5b3f0487449503664a0429f59d33">total_length_</a>(0),
<a name="l00235"></a>00235               <a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#4457cbde07512253dfbb91ce12214faa">acked_length_</a>(0) {}
<a name="l00236"></a>00236 
<a name="l00237"></a><a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#7e868dff33d6868d5e42582fac3f4109">00237</a>         <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a> <a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#7e868dff33d6868d5e42582fac3f4109">bundle_</a>;
<a name="l00238"></a>00238         
<a name="l00239"></a><a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#2f9d5b3f0487449503664a0429f59d33">00239</a>         u_int32_t <a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#2f9d5b3f0487449503664a0429f59d33">total_length_</a>;
<a name="l00240"></a><a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#4457cbde07512253dfbb91ce12214faa">00240</a>         u_int32_t <a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#4457cbde07512253dfbb91ce12214faa">acked_length_</a>;
<a name="l00241"></a>00241 
<a name="l00242"></a><a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#414686f37abb161c1e5bc3ca9c02ad48">00242</a>         <a class="code" href="classdtn_1_1CLConnection.html#522cc03792f74a0d9b432877624488f6" title="Typedef for bitmaps used to record sent/received/acked data.">DataBitmap</a> <a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#414686f37abb161c1e5bc3ca9c02ad48">rcvd_data_</a>;
<a name="l00243"></a><a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#ec95d04d452ca75f28de4ba845e0a856">00243</a>         <a class="code" href="classdtn_1_1CLConnection.html#522cc03792f74a0d9b432877624488f6" title="Typedef for bitmaps used to record sent/received/acked data.">DataBitmap</a> <a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#ec95d04d452ca75f28de4ba845e0a856">ack_data_</a>;
<a name="l00244"></a>00244     <span class="keyword">private</span>:
<a name="l00245"></a>00245         <span class="comment">// make sure we don't copy the structure by leaving the copy</span>
<a name="l00246"></a>00246         <span class="comment">// constructor undefined</span>
<a name="l00247"></a>00247         <a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html#4a03ca20141695b085cb035183ab318c">IncomingBundle</a>(<span class="keyword">const</span> <a class="code" href="classdtn_1_1CLConnection_1_1IncomingBundle.html" title="Struct used to record bundles that are in the process of being received along with...">IncomingBundle</a>&amp; copy);
<a name="l00248"></a>00248     };
<a name="l00249"></a>00249 
<a name="l00253"></a><a class="code" href="classdtn_1_1CLConnection.html#e0bc39b170d994078b81ebcd7a7dbe74">00253</a>     <span class="keyword">typedef</span> std::list&lt;IncomingBundle*&gt; <a class="code" href="classdtn_1_1CLConnection.html#e0bc39b170d994078b81ebcd7a7dbe74" title="Typedef for the list of in-flight bundles.">IncomingList</a>;
<a name="l00254"></a>00254     
<a name="l00255"></a><a class="code" href="classdtn_1_1CLConnection.html#29c0707d21c5347919186a8e14728ed0">00255</a>     <a class="code" href="namespacedtn.html#5f869544c85c75b5a85a14d6e90d7ff7" title="Typedef for a reference on a contact.">ContactRef</a>          <a class="code" href="classdtn_1_1CLConnection.html#29c0707d21c5347919186a8e14728ed0" title="Ref to the Contact.">contact_</a>;       
<a name="l00256"></a><a class="code" href="classdtn_1_1CLConnection.html#5712e80e8d3608ae67709fd8adf53bbe">00256</a>     <span class="keywordtype">bool</span>                <a class="code" href="classdtn_1_1CLConnection.html#5712e80e8d3608ae67709fd8adf53bbe" title="Has contact_up been called.">contact_up_</a>;    
<a name="l00257"></a><a class="code" href="classdtn_1_1CLConnection.html#be317e95c51e97c9ad52cedfbaa4b130">00257</a>     oasys::SpinLock     <a class="code" href="classdtn_1_1CLConnection.html#be317e95c51e97c9ad52cedfbaa4b130" title="Lock for command queue.">cmdqueue_lock_</a>; 
<a name="l00258"></a><a class="code" href="classdtn_1_1CLConnection.html#1701c536c9f5cd3d276c4b91a38ed2cf">00258</a>     oasys::MsgQueue&lt;CLMsg&gt; <a class="code" href="classdtn_1_1CLConnection.html#1701c536c9f5cd3d276c4b91a38ed2cf" title="Daemon/CLConnection command queue.">cmdqueue_</a>;   
<a name="l00259"></a><a class="code" href="classdtn_1_1CLConnection.html#99b84b09e39381998c5a918579853a30">00259</a>     <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html" title="All convergence layers that maintain a connection (i.e.">ConnectionConvergenceLayer</a>* <a class="code" href="classdtn_1_1CLConnection.html#99b84b09e39381998c5a918579853a30" title="Pointer to the CL.">cl_</a>;    
<a name="l00260"></a>00260 
<a name="l00261"></a><a class="code" href="classdtn_1_1CLConnection.html#e3408a135a49d68ab36fd8de5805b1fe">00261</a>     <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html" title="Tunable parameter structure stored in each Link&amp;#39;s CLInfo slot.">LinkParams</a>*         <a class="code" href="classdtn_1_1CLConnection.html#e3408a135a49d68ab36fd8de5805b1fe" title="Pointer to Link parameters, or to defaults until Link is bound.">params_</a>;        
<a name="l00262"></a>00262 
<a name="l00263"></a><a class="code" href="classdtn_1_1CLConnection.html#cbb28c68b3122186db85d5978f97ad42">00263</a>     <span class="keywordtype">bool</span>                <a class="code" href="classdtn_1_1CLConnection.html#cbb28c68b3122186db85d5978f97ad42" title="Should we connect() or accept().">active_connector_</a>; 
<a name="l00264"></a><a class="code" href="classdtn_1_1CLConnection.html#04d6a5a9a07c68cd62756a5706ff58d1">00264</a>     std::string         <a class="code" href="classdtn_1_1CLConnection.html#04d6a5a9a07c68cd62756a5706ff58d1" title="Nexthop identifier set by CL.">nexthop_</a>;       
<a name="l00265"></a><a class="code" href="classdtn_1_1CLConnection.html#9acc4a1e846c1a93ca38be02296b9ee0">00265</a>     <span class="keywordtype">int</span>                 <a class="code" href="classdtn_1_1CLConnection.html#9acc4a1e846c1a93ca38be02296b9ee0" title="Number of pollfds in use.">num_pollfds_</a>;   
<a name="l00266"></a><a class="code" href="classdtn_1_1CLConnection.html#5f5d51481838c60607d6ec6604a8f693">00266</a>     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span>    <a class="code" href="classdtn_1_1CLConnection.html#5f5d51481838c60607d6ec6604a8f693" title="Maximum number of pollfds.">MAXPOLL</a> = 8;    
<a name="l00267"></a><a class="code" href="classdtn_1_1CLConnection.html#9b530df82d1a6b8ca6717fd225c30b5b">00267</a>     <span class="keyword">struct </span>pollfd       <a class="code" href="classdtn_1_1CLConnection.html#9b530df82d1a6b8ca6717fd225c30b5b" title="Array of pollfds.">pollfds_</a>[<a class="code" href="classdtn_1_1CLConnection.html#5f5d51481838c60607d6ec6604a8f693" title="Maximum number of pollfds.">MAXPOLL</a>]; 
<a name="l00268"></a><a class="code" href="classdtn_1_1CLConnection.html#b9b601dae1312020426d0d57daca19da">00268</a>     <span class="keywordtype">int</span>                 <a class="code" href="classdtn_1_1CLConnection.html#b9b601dae1312020426d0d57daca19da" title="Timeout to wait for poll data.">poll_timeout_</a>;  
<a name="l00269"></a><a class="code" href="classdtn_1_1CLConnection.html#95f89064268605c6183fa4c436a12071">00269</a>     oasys::StreamBuffer <a class="code" href="classdtn_1_1CLConnection.html#95f89064268605c6183fa4c436a12071" title="Buffer for outgoing data.">sendbuf_</a>;       
<a name="l00270"></a><a class="code" href="classdtn_1_1CLConnection.html#483ff0dd2871a812491c16aa8d3f9124">00270</a>     oasys::StreamBuffer <a class="code" href="classdtn_1_1CLConnection.html#483ff0dd2871a812491c16aa8d3f9124" title="Buffer for incoming data.">recvbuf_</a>;       
<a name="l00271"></a><a class="code" href="classdtn_1_1CLConnection.html#bb337ec089b627c417864a01a095319e">00271</a>     <a class="code" href="classdtn_1_1CLConnection.html#68eb8a5d4126dfab8698aa9712ab40fe" title="Typedef for the list of in-flight bundles.">InFlightList</a>        <a class="code" href="classdtn_1_1CLConnection.html#bb337ec089b627c417864a01a095319e" title="Bundles going out the wire.">inflight_</a>;      
<a name="l00272"></a><a class="code" href="classdtn_1_1CLConnection.html#d228b2004768c4ee6027823f270a816c">00272</a>     <a class="code" href="classdtn_1_1CLConnection.html#e0bc39b170d994078b81ebcd7a7dbe74" title="Typedef for the list of in-flight bundles.">IncomingList</a>        <a class="code" href="classdtn_1_1CLConnection.html#d228b2004768c4ee6027823f270a816c" title="Bundles arriving on the wire.">incoming_</a>;      
<a name="l00273"></a><a class="code" href="classdtn_1_1CLConnection.html#a61b296b02812f04b3df0c8fb09919b8">00273</a>     <span class="keyword">volatile</span> <span class="keywordtype">bool</span>       <a class="code" href="classdtn_1_1CLConnection.html#a61b296b02812f04b3df0c8fb09919b8" title="Contact has been broken.">contact_broken_</a>; 
<a name="l00274"></a><a class="code" href="classdtn_1_1CLConnection.html#ab29444bf7f7f52430639e18ee6b452a">00274</a>     oasys::atomic_t     <a class="code" href="classdtn_1_1CLConnection.html#ab29444bf7f7f52430639e18ee6b452a" title="Bundles pending transmission.">num_pending_</a>;   
<a name="l00275"></a>00275 };
<a name="l00276"></a>00276 
<a name="l00277"></a>00277 } <span class="comment">// namespace dtn</span>
<a name="l00278"></a>00278 
<a name="l00279"></a>00279 <span class="preprocessor">#endif </span><span class="comment">/* _CLCONNECTION_H_ */</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 30 09:26:53 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>