Sophie

Sophie

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

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: Link.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>Link.h</h1><a href="contacts_2Link_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 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">#ifndef _LINK_H_</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _LINK_H_</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;set&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;oasys/debug/Formatter.h&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;oasys/serialize/Serialize.h&gt;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;oasys/thread/SpinLock.h&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;oasys/util/Ref.h&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;oasys/util/RefCountedObject.h&gt;</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="bundling_2BundleList_8h.html">bundling/BundleList.h</a>"</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="EndpointID_8h.html">naming/EndpointID.h</a>"</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="Contact_8h.html">Contact.h</a>"</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="NamedAttribute_8h.html">NamedAttribute.h</a>"</span>
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="keyword">namespace </span>dtn {
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="keyword">class </span>ConvergenceLayer;
<a name="l00036"></a>00036 <span class="keyword">class </span>CLInfo;
<a name="l00037"></a>00037 <span class="keyword">class </span>Contact;
<a name="l00038"></a>00038 <span class="keyword">class </span>Link;
<a name="l00039"></a>00039 <span class="keyword">class </span>RouterInfo;
<a name="l00040"></a>00040 
<a name="l00044"></a>00044 <span class="keyword">typedef</span> oasys::Ref&lt;Link&gt; <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>;
<a name="l00045"></a>00045 
<a name="l00049"></a><a class="code" href="classdtn_1_1LinkSet.html">00049</a> <span class="keyword">class </span><a class="code" href="classdtn_1_1LinkSet.html" title="Set of links.">LinkSet</a> : <span class="keyword">public</span> std::<a class="code" href="dtnperf-client_8c.html#ae390b8721b082d546f305e213deccb0">set</a>&lt;LinkRef&gt; {};
<a name="l00050"></a>00050 
<a name="l00103"></a><a class="code" href="classdtn_1_1Link.html">00103</a> <span class="keyword">class </span><a class="code" href="classdtn_1_1Link.html" title="Abstraction for a DTN link, i.e.">Link</a> : <span class="keyword">public</span> oasys::RefCountedObject,
<a name="l00104"></a>00104              <span class="keyword">public</span> oasys::<a class="code" href="classoasys_1_1Logger.html">Logger</a>,
<a name="l00105"></a>00105              <span class="keyword">public</span> oasys::SerializableObject {
<a name="l00106"></a>00106 <span class="keyword">public</span>:
<a name="l00110"></a><a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e">00110</a>     <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00111"></a>00111     {
<a name="l00112"></a><a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e16f74d8b58f067027e718650590deef1">00112</a>         <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e16f74d8b58f067027e718650590deef1">LINK_INVALID</a> = -1,
<a name="l00113"></a>00113         
<a name="l00119"></a><a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61eb2b2a3f569e0a11e5277b2428253137d">00119</a>         <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61eb2b2a3f569e0a11e5277b2428253137d" title="The link is expected to be ALWAYS available, and any convergence layer connection...">ALWAYSON</a> = 1,
<a name="l00120"></a>00120         
<a name="l00128"></a><a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61eeacf2159ea9fd169ca07c9f9891309ec">00128</a>         <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61eeacf2159ea9fd169ca07c9f9891309ec" title="The link is expected to be either always available, or can be made available easily...">ONDEMAND</a> = 2,
<a name="l00129"></a>00129         
<a name="l00133"></a><a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e801d9aeea31cb25c67e25914a461db38">00133</a>         <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e801d9aeea31cb25c67e25914a461db38" title="The link is only available at pre-determined times.">SCHEDULED</a> = 3,
<a name="l00134"></a>00134         
<a name="l00141"></a><a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e692792332b57aa903a769cb33e3d366b">00141</a>         <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e692792332b57aa903a769cb33e3d366b" title="The link may or may not be available, based on uncontrollable factors.">OPPORTUNISTIC</a> = 4
<a name="l00142"></a>00142     }
<a name="l00143"></a>00143     <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e" title="Valid types for a link.">link_type_t</a>;
<a name="l00144"></a>00144 
<a name="l00148"></a>00148     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>*
<a name="l00149"></a><a class="code" href="classdtn_1_1Link.html#405aaca77bb12b2611ee49a8184b7829">00149</a>     <a class="code" href="classdtn_1_1Link.html#405aaca77bb12b2611ee49a8184b7829" title="Link type string conversion.">link_type_to_str</a>(<a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e" title="Valid types for a link.">link_type_t</a> <a class="code" href="classdtn_1_1Link.html#75dad1b5cff2bd5e84b06ffc57504c65" title="Return the type of the link.">type</a>)
<a name="l00150"></a>00150     {
<a name="l00151"></a>00151         <span class="keywordflow">switch</span>(type) {
<a name="l00152"></a>00152         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61eb2b2a3f569e0a11e5277b2428253137d" title="The link is expected to be ALWAYS available, and any convergence layer connection...">ALWAYSON</a>:          <span class="keywordflow">return</span> <span class="stringliteral">"ALWAYSON"</span>;
<a name="l00153"></a>00153         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61eeacf2159ea9fd169ca07c9f9891309ec" title="The link is expected to be either always available, or can be made available easily...">ONDEMAND</a>:          <span class="keywordflow">return</span> <span class="stringliteral">"ONDEMAND"</span>;
<a name="l00154"></a>00154         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e801d9aeea31cb25c67e25914a461db38" title="The link is only available at pre-determined times.">SCHEDULED</a>:         <span class="keywordflow">return</span> <span class="stringliteral">"SCHEDULED"</span>;
<a name="l00155"></a>00155         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e692792332b57aa903a769cb33e3d366b" title="The link may or may not be available, based on uncontrollable factors.">OPPORTUNISTIC</a>:     <span class="keywordflow">return</span> <span class="stringliteral">"OPPORTUNISTIC"</span>;
<a name="l00156"></a>00156         <span class="keywordflow">default</span>:                PANIC(<span class="stringliteral">"bogus link_type_t"</span>);
<a name="l00157"></a>00157         }
<a name="l00158"></a>00158     }
<a name="l00159"></a>00159 
<a name="l00160"></a>00160     <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e" title="Valid types for a link.">link_type_t</a>
<a name="l00161"></a><a class="code" href="classdtn_1_1Link.html#fbe02d3b95149fd1fcf9d08f0d4a3518">00161</a>     <a class="code" href="classdtn_1_1Link.html#fbe02d3b95149fd1fcf9d08f0d4a3518">str_to_link_type</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* str)
<a name="l00162"></a>00162     {
<a name="l00163"></a>00163         <span class="keywordflow">if</span> (strcasecmp(str, <span class="stringliteral">"ALWAYSON"</span>) == 0)
<a name="l00164"></a>00164             <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61eb2b2a3f569e0a11e5277b2428253137d" title="The link is expected to be ALWAYS available, and any convergence layer connection...">ALWAYSON</a>;
<a name="l00165"></a>00165         
<a name="l00166"></a>00166         <span class="keywordflow">if</span> (strcasecmp(str, <span class="stringliteral">"ONDEMAND"</span>) == 0)
<a name="l00167"></a>00167             <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61eeacf2159ea9fd169ca07c9f9891309ec" title="The link is expected to be either always available, or can be made available easily...">ONDEMAND</a>;
<a name="l00168"></a>00168         
<a name="l00169"></a>00169         <span class="keywordflow">if</span> (strcasecmp(str, <span class="stringliteral">"SCHEDULED"</span>) == 0)
<a name="l00170"></a>00170             <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e801d9aeea31cb25c67e25914a461db38" title="The link is only available at pre-determined times.">SCHEDULED</a>;
<a name="l00171"></a>00171         
<a name="l00172"></a>00172         <span class="keywordflow">if</span> (strcasecmp(str, <span class="stringliteral">"OPPORTUNISTIC"</span>) == 0)
<a name="l00173"></a>00173             <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e692792332b57aa903a769cb33e3d366b" title="The link may or may not be available, based on uncontrollable factors.">OPPORTUNISTIC</a>;
<a name="l00174"></a>00174         
<a name="l00175"></a>00175         <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e16f74d8b58f067027e718650590deef1">LINK_INVALID</a>;
<a name="l00176"></a>00176     }
<a name="l00177"></a>00177 
<a name="l00183"></a><a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3">00183</a>     <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00184"></a><a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3fcb80aea04644bdc565b13fa371b2e1e">00184</a>         <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3fcb80aea04644bdc565b13fa371b2e1e" title="The link is closed and not able to be opened currently.">UNAVAILABLE</a> = 1,
<a name="l00185"></a>00185 
<a name="l00186"></a>00186 
<a name="l00187"></a><a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a36a3d11409342e7987b0ffe9c532d6e51">00187</a>         <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a36a3d11409342e7987b0ffe9c532d6e51" title="The link is closed but is able to be opened, either because it is an on demand link...">AVAILABLE</a> = 2,  
<a name="l00188"></a>00188 
<a name="l00189"></a>00189 
<a name="l00190"></a>00190 
<a name="l00191"></a>00191 
<a name="l00192"></a>00192 
<a name="l00193"></a>00193         
<a name="l00194"></a><a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a335e8afe56056fd46352661764b8982df">00194</a>         <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a335e8afe56056fd46352661764b8982df" title="A convergence layer session is in the process of being established.">OPENING</a> = 4,    
<a name="l00195"></a>00195 
<a name="l00196"></a>00196         
<a name="l00197"></a><a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3ec7a744ed0ed07ccb2b255a0d76192c8">00197</a>         <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3ec7a744ed0ed07ccb2b255a0d76192c8" title="A convergence layer session has been established, and the link has capacity for a...">OPEN</a> = 8,       
<a name="l00198"></a>00198 
<a name="l00199"></a>00199 
<a name="l00200"></a>00200 
<a name="l00201"></a>00201 
<a name="l00202"></a>00202 
<a name="l00203"></a>00203 
<a name="l00204"></a>00204         
<a name="l00205"></a><a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a32e48e0c707487f143c54dd1cd5185323">00205</a>         <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a32e48e0c707487f143c54dd1cd5185323" title="Bogus state that&amp;#39;s never actually used in the Link state_ variable, but is used...">CLOSED</a> = 16     
<a name="l00206"></a>00206 
<a name="l00207"></a>00207 
<a name="l00208"></a>00208 
<a name="l00209"></a>00209         
<a name="l00210"></a>00210     } <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3" title="The possible states for a link.">state_t</a>;
<a name="l00211"></a>00211 
<a name="l00215"></a>00215     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>*
<a name="l00216"></a><a class="code" href="classdtn_1_1Link.html#9681a1ea52ef3c5db6dcf37b04e5c280">00216</a>     <a class="code" href="classdtn_1_1Link.html#9681a1ea52ef3c5db6dcf37b04e5c280" title="Convert a link state into a string.">state_to_str</a>(<a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3" title="The possible states for a link.">state_t</a> <a class="code" href="classdtn_1_1Link.html#71a8fdd921fb0e93fd4c21f08da28a8b" title="Return the actual state.">state</a>)
<a name="l00217"></a>00217     {
<a name="l00218"></a>00218         <span class="keywordflow">switch</span>(state) {
<a name="l00219"></a>00219         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3fcb80aea04644bdc565b13fa371b2e1e" title="The link is closed and not able to be opened currently.">UNAVAILABLE</a>:       <span class="keywordflow">return</span> <span class="stringliteral">"UNAVAILABLE"</span>;
<a name="l00220"></a>00220         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a36a3d11409342e7987b0ffe9c532d6e51" title="The link is closed but is able to be opened, either because it is an on demand link...">AVAILABLE</a>:         <span class="keywordflow">return</span> <span class="stringliteral">"AVAILABLE"</span>;
<a name="l00221"></a>00221         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a335e8afe56056fd46352661764b8982df" title="A convergence layer session is in the process of being established.">OPENING</a>:           <span class="keywordflow">return</span> <span class="stringliteral">"OPENING"</span>;
<a name="l00222"></a>00222         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3ec7a744ed0ed07ccb2b255a0d76192c8" title="A convergence layer session has been established, and the link has capacity for a...">OPEN</a>:              <span class="keywordflow">return</span> <span class="stringliteral">"OPEN"</span>;
<a name="l00223"></a>00223         <span class="keywordflow">case</span> <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a32e48e0c707487f143c54dd1cd5185323" title="Bogus state that&amp;#39;s never actually used in the Link state_ variable, but is used...">CLOSED</a>:            <span class="keywordflow">return</span> <span class="stringliteral">"CLOSED"</span>;
<a name="l00224"></a>00224         }
<a name="l00225"></a>00225 
<a name="l00226"></a>00226         NOTREACHED;
<a name="l00227"></a>00227     }
<a name="l00228"></a>00228     
<a name="l00232"></a>00232     <span class="keyword">static</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a> <a class="code" href="classdtn_1_1Link.html#caf84c89199fccadfaecfc85a46d96f7" title="Static function to create appropriate link object from link type.">create_link</a>(<span class="keyword">const</span> std::string&amp; <a class="code" href="classdtn_1_1Link.html#e4cad7d0449f9a5c9cb3ea9693df09c4" title="Accessor to this links name.">name</a>, <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e" title="Valid types for a link.">link_type_t</a> <a class="code" href="classdtn_1_1Link.html#75dad1b5cff2bd5e84b06ffc57504c65" title="Return the type of the link.">type</a>,
<a name="l00233"></a>00233                                <a class="code" href="classdtn_1_1ConvergenceLayer.html" title="The abstract interface for a convergence layer.">ConvergenceLayer</a>* cl, <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classdtn_1_1Link.html#5bffae252da80b32679686d826f4d4cf" title="Accessor to next hop string.">nexthop</a>,
<a name="l00234"></a>00234                                <span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span>* argv[],
<a name="l00235"></a>00235                                <span class="keyword">const</span> <span class="keywordtype">char</span>** invalid_argp = NULL);
<a name="l00236"></a>00236 
<a name="l00240"></a>00240     <a class="code" href="classdtn_1_1Link.html#d505d6b5230f402ad22687c00f494afe" title="Constructor / Destructor.">Link</a>(<span class="keyword">const</span> std::string&amp; <a class="code" href="classdtn_1_1Link.html#e4cad7d0449f9a5c9cb3ea9693df09c4" title="Accessor to this links name.">name</a>, <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e" title="Valid types for a link.">link_type_t</a> <a class="code" href="classdtn_1_1Link.html#75dad1b5cff2bd5e84b06ffc57504c65" title="Return the type of the link.">type</a>,
<a name="l00241"></a>00241          <a class="code" href="classdtn_1_1ConvergenceLayer.html" title="The abstract interface for a convergence layer.">ConvergenceLayer</a>* cl, <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classdtn_1_1Link.html#5bffae252da80b32679686d826f4d4cf" title="Accessor to next hop string.">nexthop</a>);
<a name="l00242"></a>00242 
<a name="l00246"></a>00246     <a class="code" href="classdtn_1_1Link.html#d505d6b5230f402ad22687c00f494afe" title="Constructor / Destructor.">Link</a>(<span class="keyword">const</span> oasys::Builder&amp; b);
<a name="l00247"></a>00247 
<a name="l00251"></a>00251     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#73e9b7a34c33222155522b991b03b27f" title="Handle and mark deleted link.">delete_link</a>();
<a name="l00252"></a>00252 
<a name="l00256"></a>00256     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#825053cfdbfb055728d4da96e1e50fb2" title="Reconfigure the link parameters.">reconfigure_link</a>(<span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span>* argv[]);
<a name="l00257"></a>00257 
<a name="l00258"></a>00258     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#825053cfdbfb055728d4da96e1e50fb2" title="Reconfigure the link parameters.">reconfigure_link</a>(<a class="code" href="namespacedtn.html#e203c4f515b9e88e9e3462100c257314">AttributeVector</a>&amp; <a class="code" href="classdtn_1_1Link.html#11705ab70240b25c7ce4d61e2bc8f9d8" title="Accessor for the parameter structure.">params</a>);
<a name="l00259"></a>00259 
<a name="l00263"></a>00263     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#2c0b330264926a57c63208bf1d6f04df" title="Virtual from SerializableObject.">serialize</a>(oasys::SerializeAction* action);
<a name="l00264"></a>00264 
<a name="l00268"></a>00268     <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classdtn_1_1Link.html#5e85022a6ac79a3879fb1bf2f8b759ed" title="Hook for subclass to parse arguments.">parse_args</a>(<span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span>* argv[],
<a name="l00269"></a>00269                            <span class="keyword">const</span> <span class="keywordtype">char</span>** invalidp = NULL);
<a name="l00270"></a>00270 
<a name="l00275"></a>00275     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#56ec91ab095a6a47bc70e3e03a400f94" title="Hook for subclass to post events to control the initial link state, after all initialization...">set_initial_state</a>();
<a name="l00276"></a>00276 
<a name="l00280"></a><a class="code" href="classdtn_1_1Link.html#75dad1b5cff2bd5e84b06ffc57504c65">00280</a>     <a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e" title="Valid types for a link.">link_type_t</a> <a class="code" href="classdtn_1_1Link.html#75dad1b5cff2bd5e84b06ffc57504c65" title="Return the type of the link.">type</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><a class="code" href="classdtn_1_1Link.html#a93653796d33692c67c415afd1edf61e" title="Valid types for a link.">link_type_t</a><span class="keyword">&gt;</span>(<a class="code" href="classdtn_1_1Link.html#356a205fda65a385edee00dafd6aa546" title="Type of the link.">type_</a>); }
<a name="l00281"></a>00281 
<a name="l00285"></a><a class="code" href="classdtn_1_1Link.html#53848e2ba98690abd334c658c3edc10c">00285</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classdtn_1_1Link.html#53848e2ba98690abd334c658c3edc10c" title="Return the string for of the link.">type_str</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#405aaca77bb12b2611ee49a8184b7829" title="Link type string conversion.">link_type_to_str</a>(<a class="code" href="classdtn_1_1Link.html#75dad1b5cff2bd5e84b06ffc57504c65" title="Return the type of the link.">type</a>()); }
<a name="l00286"></a>00286 
<a name="l00290"></a><a class="code" href="classdtn_1_1Link.html#952e9b3539ca5200c04daeb248dc4180">00290</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#952e9b3539ca5200c04daeb248dc4180" title="Return whether or not the link is open.">isopen</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( (<a class="code" href="classdtn_1_1Link.html#19d118d1c518d09ac42bd97b9c917169" title="State of the link.">state_</a> == <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3ec7a744ed0ed07ccb2b255a0d76192c8" title="A convergence layer session has been established, and the link has capacity for a...">OPEN</a>) ); }
<a name="l00291"></a>00291 
<a name="l00295"></a><a class="code" href="classdtn_1_1Link.html#80585b707870a3bb2a89d7354f544242">00295</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#80585b707870a3bb2a89d7354f544242" title="Return the availability state of the link.">isavailable</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (<a class="code" href="classdtn_1_1Link.html#19d118d1c518d09ac42bd97b9c917169" title="State of the link.">state_</a> != <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3fcb80aea04644bdc565b13fa371b2e1e" title="The link is closed and not able to be opened currently.">UNAVAILABLE</a>); }
<a name="l00296"></a>00296 
<a name="l00300"></a><a class="code" href="classdtn_1_1Link.html#b0879f5e65a3233f251b87fad0fe540c">00300</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#b0879f5e65a3233f251b87fad0fe540c" title="Return whether the link is in the process of opening.">isopening</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (<a class="code" href="classdtn_1_1Link.html#19d118d1c518d09ac42bd97b9c917169" title="State of the link.">state_</a> == <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a335e8afe56056fd46352661764b8982df" title="A convergence layer session is in the process of being established.">OPENING</a>); }
<a name="l00301"></a>00301 
<a name="l00305"></a>00305     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#da00d64fecd9930c831718421533de0d" title="Returns true if the link has been deleted; otherwise returns false.">isdeleted</a>() <span class="keyword">const</span>;
<a name="l00306"></a>00306 
<a name="l00310"></a><a class="code" href="classdtn_1_1Link.html#71a8fdd921fb0e93fd4c21f08da28a8b">00310</a>     <a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3" title="The possible states for a link.">state_t</a> <a class="code" href="classdtn_1_1Link.html#71a8fdd921fb0e93fd4c21f08da28a8b" title="Return the actual state.">state</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3" title="The possible states for a link.">state_t</a><span class="keyword">&gt;</span>(<a class="code" href="classdtn_1_1Link.html#19d118d1c518d09ac42bd97b9c917169" title="State of the link.">state_</a>); }
<a name="l00311"></a>00311 
<a name="l00325"></a>00325     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#771d7e1e57ec743d6c38b11a09274771" title="Sets the state of the link.">set_state</a>(<a class="code" href="classdtn_1_1Link.html#1bf2479a21276737f73204a3c46508a3" title="The possible states for a link.">state_t</a> <a class="code" href="classdtn_1_1Link.html#71a8fdd921fb0e93fd4c21f08da28a8b" title="Return the actual state.">state</a>);
<a name="l00326"></a>00326 
<a name="l00330"></a><a class="code" href="classdtn_1_1Link.html#8c091c35f14f40a8b921516620c7e8a3">00330</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#8c091c35f14f40a8b921516620c7e8a3" title="Set/get the create_pending_ flag on the link.">set_create_pending</a>(<span class="keywordtype">bool</span> create_pending = <span class="keyword">true</span>)
<a name="l00331"></a>00331              { <a class="code" href="classdtn_1_1Link.html#3634f13823a2ebd0bb9dfc894f0e0e60" title="Flag, that when set to true, indicates that the creation of the link is pending;...">create_pending_</a> = create_pending; }
<a name="l00332"></a><a class="code" href="classdtn_1_1Link.html#a27cd2445aaa0c5e38021e06258670a7">00332</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#a27cd2445aaa0c5e38021e06258670a7">is_create_pending</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#3634f13823a2ebd0bb9dfc894f0e0e60" title="Flag, that when set to true, indicates that the creation of the link is pending;...">create_pending_</a>; }
<a name="l00333"></a>00333 
<a name="l00337"></a><a class="code" href="classdtn_1_1Link.html#24dff10247d4ac8271c2c6dd7bf38d10">00337</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#24dff10247d4ac8271c2c6dd7bf38d10" title="Set/get the usable_ flag on the link.">set_usable</a>(<span class="keywordtype">bool</span> usable = <span class="keyword">true</span>) { <a class="code" href="classdtn_1_1Link.html#00910520baf6369869bb3ae6988172fd" title="Flag, that when set to true, indicates that the link is allowed to be used to transmit...">usable_</a> = usable; }
<a name="l00338"></a><a class="code" href="classdtn_1_1Link.html#afb64cff081f778f29dd47191883527f">00338</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#afb64cff081f778f29dd47191883527f">is_usable</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#00910520baf6369869bb3ae6988172fd" title="Flag, that when set to true, indicates that the link is allowed to be used to transmit...">usable_</a>; }
<a name="l00339"></a>00339 
<a name="l00343"></a><a class="code" href="classdtn_1_1Link.html#16894dcaf0d2b3edf053e5614e015857">00343</a>     <span class="keyword">const</span> <a class="code" href="namespacedtn.html#5f869544c85c75b5a85a14d6e90d7ff7" title="Typedef for a reference on a contact.">ContactRef</a>&amp; <a class="code" href="classdtn_1_1Link.html#16894dcaf0d2b3edf053e5614e015857" title="Return the current contact information (if any).">contact</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#71c79dccb9b64a80879000ba232f7e9a" title="Current contact. contact_ != null iff link is open.">contact_</a>; }
<a name="l00344"></a>00344 
<a name="l00348"></a><a class="code" href="classdtn_1_1Link.html#a9e4bd1bf4876495bc82cfa3abf5a647">00348</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#a9e4bd1bf4876495bc82cfa3abf5a647" title="Set the contact information.">set_contact</a>(<a class="code" href="classdtn_1_1Contact.html" title="Encapsulation of an active connection to a next-hop DTN contact.">Contact</a>* <a class="code" href="classdtn_1_1Link.html#16894dcaf0d2b3edf053e5614e015857" title="Return the current contact information (if any).">contact</a>)
<a name="l00349"></a>00349     {
<a name="l00350"></a>00350         <span class="comment">// XXX/demmer check this invariant</span>
<a name="l00351"></a>00351         <a class="code" href="SDNV_8cc.html#ca68c0d4ac8df0838e209fb5300f7be3">ASSERT</a>(<a class="code" href="classdtn_1_1Link.html#71c79dccb9b64a80879000ba232f7e9a" title="Current contact. contact_ != null iff link is open.">contact_</a> == NULL);
<a name="l00352"></a>00352         <a class="code" href="classdtn_1_1Link.html#71c79dccb9b64a80879000ba232f7e9a" title="Current contact. contact_ != null iff link is open.">contact_</a> = contact;
<a name="l00353"></a>00353     }
<a name="l00354"></a>00354 
<a name="l00358"></a><a class="code" href="classdtn_1_1Link.html#900b409fa2a3402c6f72c46a8cc207b4">00358</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#900b409fa2a3402c6f72c46a8cc207b4" title="Store convergence layer state associated with the link.">set_cl_info</a>(<a class="code" href="classdtn_1_1CLInfo.html" title="Abstract base class for convergence layer specific state stored in an interface /...">CLInfo</a>* <a class="code" href="classdtn_1_1Link.html#3273fdac57a577fc3abcc979147f4d24" title="Accessor to the convergence layer state.">cl_info</a>)
<a name="l00359"></a>00359     {
<a name="l00360"></a>00360         <a class="code" href="SDNV_8cc.html#ca68c0d4ac8df0838e209fb5300f7be3">ASSERT</a>((<a class="code" href="classdtn_1_1Link.html#b0c8d7b3a270bb4ec6d7f018ed70aa94" title="Convergence layer specific info, if needed.">cl_info_</a> == NULL &amp;&amp; cl_info != NULL) ||
<a name="l00361"></a>00361                (<a class="code" href="classdtn_1_1Link.html#b0c8d7b3a270bb4ec6d7f018ed70aa94" title="Convergence layer specific info, if needed.">cl_info_</a> != NULL &amp;&amp; cl_info == NULL));
<a name="l00362"></a>00362         
<a name="l00363"></a>00363         <a class="code" href="classdtn_1_1Link.html#b0c8d7b3a270bb4ec6d7f018ed70aa94" title="Convergence layer specific info, if needed.">cl_info_</a> = cl_info;
<a name="l00364"></a>00364     }
<a name="l00365"></a>00365 
<a name="l00369"></a><a class="code" href="classdtn_1_1Link.html#3273fdac57a577fc3abcc979147f4d24">00369</a>     <a class="code" href="classdtn_1_1CLInfo.html" title="Abstract base class for convergence layer specific state stored in an interface /...">CLInfo</a>* <a class="code" href="classdtn_1_1Link.html#3273fdac57a577fc3abcc979147f4d24" title="Accessor to the convergence layer state.">cl_info</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#b0c8d7b3a270bb4ec6d7f018ed70aa94" title="Convergence layer specific info, if needed.">cl_info_</a>; }
<a name="l00370"></a>00370     
<a name="l00374"></a><a class="code" href="classdtn_1_1Link.html#9f614043ee87ed559daef685e9661ef5">00374</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#9f614043ee87ed559daef685e9661ef5" title="Store router state associated with the link.">set_router_info</a>(<a class="code" href="classdtn_1_1RouterInfo.html" title="Empty wrapper class to encapsulate router-specific data attached to Links.">RouterInfo</a>* <a class="code" href="classdtn_1_1Link.html#44fb575be36966c14ee94e056375ea44" title="Accessor to the convergence layer state.">router_info</a>)
<a name="l00375"></a>00375     {
<a name="l00376"></a>00376         <a class="code" href="SDNV_8cc.html#ca68c0d4ac8df0838e209fb5300f7be3">ASSERT</a>((<a class="code" href="classdtn_1_1Link.html#2dd58ea037907dc2a5e5fe30d61414b2" title="Router specific info, if needed.">router_info_</a> == NULL &amp;&amp; router_info != NULL) ||
<a name="l00377"></a>00377                (<a class="code" href="classdtn_1_1Link.html#2dd58ea037907dc2a5e5fe30d61414b2" title="Router specific info, if needed.">router_info_</a> != NULL &amp;&amp; router_info == NULL));
<a name="l00378"></a>00378         
<a name="l00379"></a>00379         <a class="code" href="classdtn_1_1Link.html#2dd58ea037907dc2a5e5fe30d61414b2" title="Router specific info, if needed.">router_info_</a> = router_info;
<a name="l00380"></a>00380     }
<a name="l00381"></a>00381 
<a name="l00385"></a><a class="code" href="classdtn_1_1Link.html#44fb575be36966c14ee94e056375ea44">00385</a>     <a class="code" href="classdtn_1_1RouterInfo.html" title="Empty wrapper class to encapsulate router-specific data attached to Links.">RouterInfo</a>* <a class="code" href="classdtn_1_1Link.html#44fb575be36966c14ee94e056375ea44" title="Accessor to the convergence layer state.">router_info</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#2dd58ea037907dc2a5e5fe30d61414b2" title="Router specific info, if needed.">router_info_</a>; }
<a name="l00386"></a>00386     
<a name="l00390"></a><a class="code" href="classdtn_1_1Link.html#f909b48bf21f49b5646e22cb51151869">00390</a>     <a class="code" href="classdtn_1_1ConvergenceLayer.html" title="The abstract interface for a convergence layer.">ConvergenceLayer</a>* <a class="code" href="classdtn_1_1Link.html#f909b48bf21f49b5646e22cb51151869" title="Accessor to this contact&amp;#39;s convergence layer.">clayer</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#07ec2bd779b594270491dd15e03127d2" title="Pointer to convergence layer.">clayer_</a>; }
<a name="l00391"></a>00391 
<a name="l00395"></a><a class="code" href="classdtn_1_1Link.html#e4cad7d0449f9a5c9cb3ea9693df09c4">00395</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classdtn_1_1Link.html#e4cad7d0449f9a5c9cb3ea9693df09c4" title="Accessor to this links name.">name</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#18fba654bb084c0d68d5442579393439" title="Internal name of the link.">name_</a>.c_str(); }
<a name="l00396"></a>00396 
<a name="l00400"></a><a class="code" href="classdtn_1_1Link.html#4d22ab5b713286252422838e141b09b5">00400</a>     <span class="keyword">const</span> std::string&amp; <a class="code" href="classdtn_1_1Link.html#4d22ab5b713286252422838e141b09b5" title="Accessor to this links name as a c++ string.">name_str</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#18fba654bb084c0d68d5442579393439" title="Internal name of the link.">name_</a>; }
<a name="l00401"></a>00401 
<a name="l00405"></a><a class="code" href="classdtn_1_1Link.html#5bffae252da80b32679686d826f4d4cf">00405</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classdtn_1_1Link.html#5bffae252da80b32679686d826f4d4cf" title="Accessor to next hop string.">nexthop</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#4a0317c260c70581ef1a81a23bc27fba" title="Next hop address.">nexthop_</a>.c_str(); }
<a name="l00406"></a>00406 
<a name="l00410"></a><a class="code" href="classdtn_1_1Link.html#b3ae66b2c886764818f892714f36f2e6">00410</a>     <span class="keyword">const</span> std::string&amp; <a class="code" href="classdtn_1_1Link.html#b3ae66b2c886764818f892714f36f2e6" title="Accessor to next hop string.">nexthop_str</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#4a0317c260c70581ef1a81a23bc27fba" title="Next hop address.">nexthop_</a>; }
<a name="l00411"></a>00411 
<a name="l00415"></a><a class="code" href="classdtn_1_1Link.html#a832ad2297fd784fe6e70ee5dd7a8dab">00415</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#a832ad2297fd784fe6e70ee5dd7a8dab" title="Override for the next hop string.">set_nexthop</a>(<span class="keyword">const</span> std::string&amp; <a class="code" href="classdtn_1_1Link.html#5bffae252da80b32679686d826f4d4cf" title="Accessor to next hop string.">nexthop</a>) { <a class="code" href="classdtn_1_1Link.html#4a0317c260c70581ef1a81a23bc27fba" title="Next hop address.">nexthop_</a>.assign(nexthop); }
<a name="l00416"></a>00416 
<a name="l00420"></a><a class="code" href="classdtn_1_1Link.html#b4a083cc0c2445cb98e1c2a5be1e571a">00420</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#b4a083cc0c2445cb98e1c2a5be1e571a" title="Accessor to the reliability bit.">is_reliable</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#713c78c93785b2e3a6462892d52b550d" title="Whether or not this link is reliable.">reliable_</a>; }
<a name="l00421"></a>00421 
<a name="l00425"></a><a class="code" href="classdtn_1_1Link.html#c8a1dc207dffef1a906e23c90a876318">00425</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#c8a1dc207dffef1a906e23c90a876318" title="Accessor to set the reliability bit when the link is created.">set_reliable</a>(<span class="keywordtype">bool</span> r) { <a class="code" href="classdtn_1_1Link.html#713c78c93785b2e3a6462892d52b550d" title="Whether or not this link is reliable.">reliable_</a> = r; }
<a name="l00426"></a>00426 
<a name="l00430"></a><a class="code" href="classdtn_1_1Link.html#b9308b5442c5a0f2c549b254ccd9216f">00430</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#b9308b5442c5a0f2c549b254ccd9216f" title="Accessor to set the remote endpoint id.">set_remote_eid</a>(<span class="keyword">const</span> <a class="code" href="classdtn_1_1EndpointID.html">EndpointID</a>&amp; remote) {
<a name="l00431"></a>00431         <a class="code" href="classdtn_1_1Link.html#1db82aaa68166ce7029df32710ee58f1" title="Remote&amp;#39;s endpoint ID (eg, dtn://hostname.dtn).">remote_eid_</a>.<a class="code" href="classdtn_1_1EndpointID.html#ec39752e4da3107b16ff5da58d2aa5ab" title="Assign this endpoint ID as a copy of the other.">assign</a>(remote);
<a name="l00432"></a>00432     }
<a name="l00433"></a>00433 
<a name="l00437"></a><a class="code" href="classdtn_1_1Link.html#febda74522edf794750548f1067fa334">00437</a>     <span class="keyword">const</span> <a class="code" href="classdtn_1_1EndpointID.html">EndpointID</a>&amp; <a class="code" href="classdtn_1_1Link.html#febda74522edf794750548f1067fa334" title="Accessor to the remote endpoint id.">remote_eid</a>() { <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#1db82aaa68166ce7029df32710ee58f1" title="Remote&amp;#39;s endpoint ID (eg, dtn://hostname.dtn).">remote_eid_</a>; }
<a name="l00438"></a>00438 
<a name="l00443"></a><a class="code" href="classdtn_1_1Link.html#51f9db6caba35b80b20cca5259d9b8b2">00443</a>     <span class="keyword">const</span> <a class="code" href="classdtn_1_1BundleList.html" title="List structure for handling bundles.">BundleList</a>* <a class="code" href="classdtn_1_1Link.html#51f9db6caba35b80b20cca5259d9b8b2" title="Accessor for the link&amp;#39;s queue of bundles that are awaiting transmission.">queue</a>() { <span class="keywordflow">return</span> &amp;<a class="code" href="classdtn_1_1Link.html#f7bef65eadb08fc8370eaf235b9af22a" title="Queue of bundles currently active or pending transmission on the Link.">queue_</a>; }
<a name="l00444"></a>00444 
<a name="l00449"></a>00449     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#969754e20c9dd4b9995f681703c4d963" title="Return whether or not the queue is full, based on the configured queue limits.">queue_is_full</a>() <span class="keyword">const</span>;
<a name="l00450"></a>00450     
<a name="l00455"></a>00455     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#f81761808229e409927bee19494b878c" title="Return whether or not the queue has space, based on the configured queue limits.">queue_has_space</a>() <span class="keyword">const</span>;
<a name="l00456"></a>00456 
<a name="l00462"></a><a class="code" href="classdtn_1_1Link.html#79285b8d8f03410f171faa0be56403be">00462</a>     <span class="keyword">const</span> <a class="code" href="classdtn_1_1BundleList.html" title="List structure for handling bundles.">BundleList</a>* <a class="code" href="classdtn_1_1Link.html#79285b8d8f03410f171faa0be56403be" title="Accessor for the link&amp;#39;s list of bundles that have been transmitted but for which...">inflight</a>() { <span class="keywordflow">return</span> &amp;<a class="code" href="classdtn_1_1Link.html#fc4fe98181a47e648d7133898949d631" title="Queue of bundles that have been sent but not yet acknowledged.">inflight_</a>; }
<a name="l00463"></a>00463 
<a name="l00465"></a>00465 
<a name="l00470"></a>00470     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#4145ce871e553f7135550b2c2227b9c3" title="Accessor functions to add/remove bundles from the link queue and inflight list, keeping...">add_to_queue</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>&amp; bundle, <span class="keywordtype">size_t</span> total_len);
<a name="l00471"></a>00471     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#351b48d6422e54c1e1761de089ddcee1" title="Accessor functions to add/remove bundles from the link queue and inflight list, keeping...">del_from_queue</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>&amp; bundle, <span class="keywordtype">size_t</span> total_len);
<a name="l00472"></a>00472     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#48b8de62d4415d0d1d2214515bdfc9ac" title="Accessor functions to add/remove bundles from the link queue and inflight list, keeping...">add_to_inflight</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>&amp; bundle, <span class="keywordtype">size_t</span> total_len);
<a name="l00473"></a>00473     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#db1a66a1c3d5b23ef362151326120bbb" title="Accessor functions to add/remove bundles from the link queue and inflight list, keeping...">del_from_inflight</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>&amp; bundle, <span class="keywordtype">size_t</span> total_len);
<a name="l00475"></a>00475     
<a name="l00479"></a>00479     <span class="keywordtype">int</span> <a class="code" href="classdtn_1_1Link.html#03accdcb516ca16ba1c5c67fc64a2fa8" title="Virtual from formatter.">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="l00480"></a>00480 
<a name="l00484"></a>00484     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#92625abc0b8424f763824f099eee055d" title="Debugging printout.">dump</a>(oasys::StringBuffer* <a class="code" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>);
<a name="l00485"></a>00485 
<a name="l00486"></a>00486     <span class="comment">/**************************************************************</span>
<a name="l00487"></a>00487 <span class="comment">     * Link Parameters</span>
<a name="l00488"></a>00488 <span class="comment">     */</span>
<a name="l00489"></a><a class="code" href="structdtn_1_1Link_1_1Params.html">00489</a>     <span class="keyword">struct </span><a class="code" href="structdtn_1_1Link_1_1Params.html">Params</a> {
<a name="l00493"></a>00493         <a class="code" href="structdtn_1_1Link_1_1Params.html#a66a80828fbe8645786f21a2f4e38837" title="Default constructor.">Params</a>();
<a name="l00494"></a>00494         
<a name="l00498"></a><a class="code" href="structdtn_1_1Link_1_1Params.html#333734265a2a17aa4edcb97fbae31400">00498</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Params.html#333734265a2a17aa4edcb97fbae31400" title="MTU of the link, used to control proactive fragmentation.">mtu_</a>;
<a name="l00499"></a>00499          
<a name="l00507"></a><a class="code" href="structdtn_1_1Link_1_1Params.html#fad825e84db3cb9e92ea0862e7cdf609">00507</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Params.html#fad825e84db3cb9e92ea0862e7cdf609" title="Minimum amount to wait between attempts to re-open the link (in seconds).">min_retry_interval_</a>;
<a name="l00508"></a>00508     
<a name="l00516"></a><a class="code" href="structdtn_1_1Link_1_1Params.html#814873f095484897985d1b79cb218f01">00516</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Params.html#814873f095484897985d1b79cb218f01" title="Maximum amount to wait between attempts to re-open the link (in seconds).">max_retry_interval_</a>;
<a name="l00517"></a>00517 
<a name="l00525"></a><a class="code" href="structdtn_1_1Link_1_1Params.html#b234c93dc26fd078732abdb4746822e6">00525</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Params.html#b234c93dc26fd078732abdb4746822e6" title="Seconds of idle time before the link is closed.">idle_close_time_</a>;
<a name="l00526"></a>00526 
<a name="l00534"></a><a class="code" href="structdtn_1_1Link_1_1Params.html#836d9ef17e5ff0bb45b16826cc52e9c5">00534</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Params.html#836d9ef17e5ff0bb45b16826cc52e9c5" title="Conservative estimate of the maximum amount of time that the link may be down during...">potential_downtime_</a>;
<a name="l00535"></a>00535 
<a name="l00540"></a><a class="code" href="structdtn_1_1Link_1_1Params.html#826790ff03eba2149cefc18802cdf6d5">00540</a>         <span class="keywordtype">bool</span> <a class="code" href="structdtn_1_1Link_1_1Params.html#826790ff03eba2149cefc18802cdf6d5" title="Whether or not to send the previous hop header on this link.">prevhop_hdr_</a>;
<a name="l00541"></a>00541 
<a name="l00546"></a><a class="code" href="structdtn_1_1Link_1_1Params.html#ed0e0d6c0df908fd1d94da3aa752a8e6">00546</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Params.html#ed0e0d6c0df908fd1d94da3aa752a8e6" title="Abstract cost of the link, used by routing algorithms.">cost_</a>;
<a name="l00547"></a>00547 
<a name="l00560"></a><a class="code" href="structdtn_1_1Link_1_1Params.html#f5d23c371d36b35ed9bb1776baa2b178">00560</a>         u_int     <a class="code" href="structdtn_1_1Link_1_1Params.html#f5d23c371d36b35ed9bb1776baa2b178">qlimit_bundles_high_</a>;
<a name="l00561"></a><a class="code" href="structdtn_1_1Link_1_1Params.html#54e55c9e4458ec7037f59db593193ff8">00561</a>         u_int64_t <a class="code" href="structdtn_1_1Link_1_1Params.html#54e55c9e4458ec7037f59db593193ff8">qlimit_bytes_high_</a>;
<a name="l00562"></a><a class="code" href="structdtn_1_1Link_1_1Params.html#dffd607e6951f941ac2165a84d1fe2ec">00562</a>         u_int     <a class="code" href="structdtn_1_1Link_1_1Params.html#dffd607e6951f941ac2165a84d1fe2ec">qlimit_bundles_low_</a>;
<a name="l00563"></a><a class="code" href="structdtn_1_1Link_1_1Params.html#6319c3d9e5366cfe75cfd5f02a5702fe">00563</a>         u_int64_t <a class="code" href="structdtn_1_1Link_1_1Params.html#6319c3d9e5366cfe75cfd5f02a5702fe">qlimit_bytes_low_</a>;
<a name="l00565"></a>00565     };
<a name="l00566"></a>00566     
<a name="l00572"></a><a class="code" href="classdtn_1_1Link.html#6e687c4d55d6b65efef17dcc27ccbc76">00572</a>     u_int <a class="code" href="classdtn_1_1Link.html#6e687c4d55d6b65efef17dcc27ccbc76" title="Seconds to wait between attempts to re-open an unavailable link.">retry_interval_</a>;
<a name="l00573"></a>00573 
<a name="l00577"></a><a class="code" href="classdtn_1_1Link.html#11705ab70240b25c7ce4d61e2bc8f9d8">00577</a>     <span class="keyword">const</span> <a class="code" href="structdtn_1_1Link_1_1Params.html">Params</a>&amp; <a class="code" href="classdtn_1_1Link.html#11705ab70240b25c7ce4d61e2bc8f9d8" title="Accessor for the parameter structure.">params</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#f2c2e7e9451ceb7a0363b3a52b38b4d8" title="Parameters of the link.">params_</a>; }
<a name="l00578"></a><a class="code" href="classdtn_1_1Link.html#fc3ce544669cbcef1155694c8aaeb48d">00578</a>     <a class="code" href="structdtn_1_1Link_1_1Params.html">Params</a>&amp; <a class="code" href="classdtn_1_1Link.html#fc3ce544669cbcef1155694c8aaeb48d">params</a>() { <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#f2c2e7e9451ceb7a0363b3a52b38b4d8" title="Parameters of the link.">params_</a>; }
<a name="l00579"></a>00579 
<a name="l00580"></a>00580     <span class="comment">/*************************************************************</span>
<a name="l00581"></a>00581 <span class="comment">     * Link Statistics</span>
<a name="l00582"></a>00582 <span class="comment">     */</span>
<a name="l00583"></a><a class="code" href="structdtn_1_1Link_1_1Stats.html">00583</a>     <span class="keyword">struct </span><a class="code" href="structdtn_1_1Link_1_1Stats.html">Stats</a> {
<a name="l00587"></a><a class="code" href="structdtn_1_1Link_1_1Stats.html#6e3d627044f1947e6df365ac31831cd6">00587</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Stats.html#6e3d627044f1947e6df365ac31831cd6" title="Number of times the link attempted to be opened.">contact_attempts_</a>;
<a name="l00588"></a>00588         
<a name="l00593"></a><a class="code" href="structdtn_1_1Link_1_1Stats.html#28eede330812cec5fb3e60fcdde013ff">00593</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Stats.html#28eede330812cec5fb3e60fcdde013ff" title="Number of contacts ever successfully opened on the link (equivalent to the number...">contacts_</a>;
<a name="l00594"></a>00594 
<a name="l00598"></a><a class="code" href="structdtn_1_1Link_1_1Stats.html#dcfb18ecf12e47b7ed71c4f984e06c7a">00598</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Stats.html#dcfb18ecf12e47b7ed71c4f984e06c7a" title="Number of bundles transmitted over the link.">bundles_transmitted_</a>;
<a name="l00599"></a>00599 
<a name="l00603"></a><a class="code" href="structdtn_1_1Link_1_1Stats.html#c91d69628ecb52abe58c54959da71593">00603</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Stats.html#c91d69628ecb52abe58c54959da71593" title="Total byte count transmitted over the link.">bytes_transmitted_</a>;
<a name="l00604"></a>00604 
<a name="l00608"></a><a class="code" href="structdtn_1_1Link_1_1Stats.html#5dca4758e24ed07e14c25f928330c340">00608</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Stats.html#5dca4758e24ed07e14c25f928330c340" title="Number of bundles with cancelled transmission.">bundles_cancelled_</a>;
<a name="l00609"></a>00609 
<a name="l00614"></a><a class="code" href="structdtn_1_1Link_1_1Stats.html#7f8bb95c2198e76cbde8486f2751a154">00614</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Stats.html#7f8bb95c2198e76cbde8486f2751a154" title="The total uptime of the link, not counting the current contact.">uptime_</a>;
<a name="l00615"></a>00615 
<a name="l00620"></a><a class="code" href="structdtn_1_1Link_1_1Stats.html#908650a59c7d5864c059afc1574a6202">00620</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Stats.html#908650a59c7d5864c059afc1574a6202" title="The availablity of the link, as measured over time by the convergence layer.">availability_</a>;
<a name="l00621"></a>00621         
<a name="l00628"></a><a class="code" href="structdtn_1_1Link_1_1Stats.html#00fa5aee18b680e21d4c25360a050020">00628</a>         u_int <a class="code" href="structdtn_1_1Link_1_1Stats.html#00fa5aee18b680e21d4c25360a050020" title="The reliability of the link, as measured over time by the convergence layer.">reliability_</a>;
<a name="l00629"></a>00629     };
<a name="l00630"></a>00630 
<a name="l00634"></a><a class="code" href="classdtn_1_1Link.html#91f1badc160e30d2fa16b2099aae6307">00634</a>     <a class="code" href="structdtn_1_1Link_1_1Stats.html">Stats</a>* <a class="code" href="classdtn_1_1Link.html#91f1badc160e30d2fa16b2099aae6307" title="Accessor for the stats structure.">stats</a>() { <span class="keywordflow">return</span> &amp;<a class="code" href="classdtn_1_1Link.html#8f66801a2de483d745b7a0b619e12f0f" title="Stats for the link.">stats_</a>; }
<a name="l00635"></a>00635 
<a name="l00639"></a><a class="code" href="classdtn_1_1Link.html#14f73bc333655104800104f5be38603a">00639</a>     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#14f73bc333655104800104f5be38603a" title="Reset the stats.">reset_stats</a>()<span class="keyword"> const</span>
<a name="l00640"></a>00640 <span class="keyword">    </span>{
<a name="l00641"></a>00641         memset(&amp;<a class="code" href="classdtn_1_1Link.html#8f66801a2de483d745b7a0b619e12f0f" title="Stats for the link.">stats_</a>, 0, <span class="keyword">sizeof</span>(<a class="code" href="classdtn_1_1Link.html#8f66801a2de483d745b7a0b619e12f0f" title="Stats for the link.">stats_</a>));
<a name="l00642"></a>00642     }
<a name="l00643"></a>00643 
<a name="l00647"></a>00647     <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#ebb1e9d3bcc734ddf3263652d9f7cc14" title="Dump a printable version of the stats.">dump_stats</a>(oasys::StringBuffer* <a class="code" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>);
<a name="l00648"></a>00648 
<a name="l00650"></a><a class="code" href="classdtn_1_1Link.html#93cde4c0fd625866bdbbad3fb9dd1258">00650</a>     u_int <a class="code" href="classdtn_1_1Link.html#93cde4c0fd625866bdbbad3fb9dd1258" title="Accessors for the link queue stats.">bundles_queued</a>()   { <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#a1c555412ff256489d257a6c838f7b2a">bundles_queued_</a>; }
<a name="l00651"></a><a class="code" href="classdtn_1_1Link.html#ac179ece00f7036163d41a884d1aaa6c">00651</a>     u_int <a class="code" href="classdtn_1_1Link.html#ac179ece00f7036163d41a884d1aaa6c" title="Accessors for the link queue stats.">bytes_queued</a>()     { <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#611750c82a1ae0fe8d2c9d22097b5bbf">bytes_queued_</a>; }
<a name="l00652"></a><a class="code" href="classdtn_1_1Link.html#695f26506185d31f72f0d52de4aa8752">00652</a>     u_int <a class="code" href="classdtn_1_1Link.html#695f26506185d31f72f0d52de4aa8752" title="Accessors for the link queue stats.">bundles_inflight</a>() { <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#a6e3ac679e8ef5bc7ad158a8487a6497">bundles_inflight_</a>; }
<a name="l00653"></a><a class="code" href="classdtn_1_1Link.html#133f151b7ef9e341e9c38650ac35f475">00653</a>     u_int <a class="code" href="classdtn_1_1Link.html#133f151b7ef9e341e9c38650ac35f475" title="Accessors for the link queue stats.">bytes_inflight</a>()   { <span class="keywordflow">return</span> <a class="code" href="classdtn_1_1Link.html#bfdb39a4c12069033a21c50f12a4a0ef">bytes_inflight_</a>; }
<a name="l00655"></a>00655 
<a name="l00659"></a><a class="code" href="classdtn_1_1Link.html#b420e7045b82d003381c009cd649042e">00659</a>     oasys::Lock* <a class="code" href="classdtn_1_1Link.html#b420e7045b82d003381c009cd649042e" title="Accessor for the Link state lock.">lock</a>() { <span class="keywordflow">return</span> &amp;<a class="code" href="classdtn_1_1Link.html#9a028608b541c0e3d3c4af3aa3fb8712" title="Lock to protect internal data structures and state.">lock_</a>; }
<a name="l00660"></a>00660     
<a name="l00661"></a>00661 <span class="keyword">protected</span>:
<a name="l00662"></a><a class="code" href="classdtn_1_1Link.html#e81b8ce094725bbc983ec42961d8032e">00662</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classdtn_1_1BundleActions.html" title="Intermediary class that provides a utility interface to help routers more easily...">BundleActions</a>;
<a name="l00663"></a><a class="code" href="classdtn_1_1Link.html#fc7f6330f6d1e3b33bfc1e2e1c751537">00663</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classdtn_1_1BundleDaemon.html" title="Class that handles the basic event / action mechanism.">BundleDaemon</a>;
<a name="l00664"></a><a class="code" href="classdtn_1_1Link.html#47e77d21706e11e895af252dd4105c97">00664</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classdtn_1_1ContactManager.html" title="A contact manager class.">ContactManager</a>;
<a name="l00665"></a><a class="code" href="classdtn_1_1Link.html#2d50e0e4973c0bbd035fe4391bcf49dd">00665</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classdtn_1_1ParamCommand.html" title="Parameter setting command.">ParamCommand</a>;
<a name="l00666"></a>00666 
<a name="l00672"></a>00672     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#9397d41bdf415c846610343e15b4b503" title="Open the link.">open</a>();
<a name="l00673"></a>00673 
<a name="l00679"></a>00679     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1Link.html#415c96b4d171484971a6946eb231195a" title="Close the link.">close</a>();
<a name="l00680"></a>00680 
<a name="l00682"></a><a class="code" href="classdtn_1_1Link.html#356a205fda65a385edee00dafd6aa546">00682</a>     <span class="keywordtype">int</span> <a class="code" href="classdtn_1_1Link.html#356a205fda65a385edee00dafd6aa546" title="Type of the link.">type_</a>;
<a name="l00683"></a>00683 
<a name="l00685"></a><a class="code" href="classdtn_1_1Link.html#19d118d1c518d09ac42bd97b9c917169">00685</a>     u_int32_t <a class="code" href="classdtn_1_1Link.html#19d118d1c518d09ac42bd97b9c917169" title="State of the link.">state_</a>;
<a name="l00686"></a>00686 
<a name="l00688"></a><a class="code" href="classdtn_1_1Link.html#72c1c919069f37959273f9a0379679d5">00688</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#72c1c919069f37959273f9a0379679d5" title="Flag, that when set to true, indicates that the link has been deleted.">deleted_</a>;
<a name="l00689"></a>00689 
<a name="l00694"></a><a class="code" href="classdtn_1_1Link.html#3634f13823a2ebd0bb9dfc894f0e0e60">00694</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#3634f13823a2ebd0bb9dfc894f0e0e60" title="Flag, that when set to true, indicates that the creation of the link is pending;...">create_pending_</a>;
<a name="l00695"></a>00695 
<a name="l00698"></a><a class="code" href="classdtn_1_1Link.html#00910520baf6369869bb3ae6988172fd">00698</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#00910520baf6369869bb3ae6988172fd" title="Flag, that when set to true, indicates that the link is allowed to be used to transmit...">usable_</a>;
<a name="l00699"></a>00699 
<a name="l00701"></a><a class="code" href="classdtn_1_1Link.html#4a0317c260c70581ef1a81a23bc27fba">00701</a>     std::string <a class="code" href="classdtn_1_1Link.html#4a0317c260c70581ef1a81a23bc27fba" title="Next hop address.">nexthop_</a>;
<a name="l00702"></a>00702     
<a name="l00704"></a><a class="code" href="classdtn_1_1Link.html#18fba654bb084c0d68d5442579393439">00704</a>     std::string <a class="code" href="classdtn_1_1Link.html#18fba654bb084c0d68d5442579393439" title="Internal name of the link.">name_</a>;
<a name="l00705"></a>00705 
<a name="l00707"></a><a class="code" href="classdtn_1_1Link.html#713c78c93785b2e3a6462892d52b550d">00707</a>     <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1Link.html#713c78c93785b2e3a6462892d52b550d" title="Whether or not this link is reliable.">reliable_</a>;
<a name="l00708"></a>00708 
<a name="l00710"></a><a class="code" href="classdtn_1_1Link.html#f2c2e7e9451ceb7a0363b3a52b38b4d8">00710</a>     <a class="code" href="structdtn_1_1Link_1_1Params.html">Params</a> <a class="code" href="classdtn_1_1Link.html#f2c2e7e9451ceb7a0363b3a52b38b4d8" title="Parameters of the link.">params_</a>;
<a name="l00711"></a>00711 
<a name="l00713"></a><a class="code" href="classdtn_1_1Link.html#02dff1dc43dfca75fc4ecdef8ed08845">00713</a>     <span class="keyword">static</span> <a class="code" href="structdtn_1_1Link_1_1Params.html">Params</a> <a class="code" href="classdtn_1_1Link.html#02dff1dc43dfca75fc4ecdef8ed08845" title="Default parameters of the link.">default_params_</a>;
<a name="l00714"></a>00714 
<a name="l00716"></a><a class="code" href="classdtn_1_1Link.html#9a028608b541c0e3d3c4af3aa3fb8712">00716</a>     oasys::SpinLock <a class="code" href="classdtn_1_1Link.html#9a028608b541c0e3d3c4af3aa3fb8712" title="Lock to protect internal data structures and state.">lock_</a>;
<a name="l00717"></a>00717     
<a name="l00719"></a><a class="code" href="classdtn_1_1Link.html#f7bef65eadb08fc8370eaf235b9af22a">00719</a>     <a class="code" href="classdtn_1_1BundleList.html" title="List structure for handling bundles.">BundleList</a> <a class="code" href="classdtn_1_1Link.html#f7bef65eadb08fc8370eaf235b9af22a" title="Queue of bundles currently active or pending transmission on the Link.">queue_</a>;
<a name="l00720"></a>00720 
<a name="l00722"></a><a class="code" href="classdtn_1_1Link.html#fc4fe98181a47e648d7133898949d631">00722</a>     <a class="code" href="classdtn_1_1BundleList.html" title="List structure for handling bundles.">BundleList</a> <a class="code" href="classdtn_1_1Link.html#fc4fe98181a47e648d7133898949d631" title="Queue of bundles that have been sent but not yet acknowledged.">inflight_</a>;
<a name="l00723"></a>00723     
<a name="l00732"></a><a class="code" href="classdtn_1_1Link.html#a1c555412ff256489d257a6c838f7b2a">00732</a>     u_int <a class="code" href="classdtn_1_1Link.html#a1c555412ff256489d257a6c838f7b2a">bundles_queued_</a>;
<a name="l00733"></a><a class="code" href="classdtn_1_1Link.html#611750c82a1ae0fe8d2c9d22097b5bbf">00733</a>     u_int <a class="code" href="classdtn_1_1Link.html#611750c82a1ae0fe8d2c9d22097b5bbf">bytes_queued_</a>; 
<a name="l00734"></a><a class="code" href="classdtn_1_1Link.html#a6e3ac679e8ef5bc7ad158a8487a6497">00734</a>     u_int <a class="code" href="classdtn_1_1Link.html#a6e3ac679e8ef5bc7ad158a8487a6497">bundles_inflight_</a>;
<a name="l00735"></a><a class="code" href="classdtn_1_1Link.html#bfdb39a4c12069033a21c50f12a4a0ef">00735</a>     u_int <a class="code" href="classdtn_1_1Link.html#bfdb39a4c12069033a21c50f12a4a0ef">bytes_inflight_</a>;
<a name="l00738"></a>00738 
<a name="l00739"></a><a class="code" href="classdtn_1_1Link.html#8f66801a2de483d745b7a0b619e12f0f">00739</a>     <span class="keyword">mutable</span> <a class="code" href="structdtn_1_1Link_1_1Stats.html">Stats</a> <a class="code" href="classdtn_1_1Link.html#8f66801a2de483d745b7a0b619e12f0f" title="Stats for the link.">stats_</a>;
<a name="l00740"></a>00740 
<a name="l00742"></a><a class="code" href="classdtn_1_1Link.html#71c79dccb9b64a80879000ba232f7e9a">00742</a>     <a class="code" href="namespacedtn.html#5f869544c85c75b5a85a14d6e90d7ff7" title="Typedef for a reference on a contact.">ContactRef</a> <a class="code" href="classdtn_1_1Link.html#71c79dccb9b64a80879000ba232f7e9a" title="Current contact. contact_ != null iff link is open.">contact_</a>;
<a name="l00743"></a>00743 
<a name="l00745"></a><a class="code" href="classdtn_1_1Link.html#07ec2bd779b594270491dd15e03127d2">00745</a>     <a class="code" href="classdtn_1_1ConvergenceLayer.html" title="The abstract interface for a convergence layer.">ConvergenceLayer</a>* <a class="code" href="classdtn_1_1Link.html#07ec2bd779b594270491dd15e03127d2" title="Pointer to convergence layer.">clayer_</a>;
<a name="l00746"></a>00746 
<a name="l00748"></a><a class="code" href="classdtn_1_1Link.html#b0c8d7b3a270bb4ec6d7f018ed70aa94">00748</a>     <a class="code" href="classdtn_1_1CLInfo.html" title="Abstract base class for convergence layer specific state stored in an interface /...">CLInfo</a>* <a class="code" href="classdtn_1_1Link.html#b0c8d7b3a270bb4ec6d7f018ed70aa94" title="Convergence layer specific info, if needed.">cl_info_</a>;
<a name="l00749"></a>00749 
<a name="l00751"></a><a class="code" href="classdtn_1_1Link.html#2dd58ea037907dc2a5e5fe30d61414b2">00751</a>     <a class="code" href="classdtn_1_1RouterInfo.html" title="Empty wrapper class to encapsulate router-specific data attached to Links.">RouterInfo</a>* <a class="code" href="classdtn_1_1Link.html#2dd58ea037907dc2a5e5fe30d61414b2" title="Router specific info, if needed.">router_info_</a>;
<a name="l00752"></a>00752 
<a name="l00754"></a><a class="code" href="classdtn_1_1Link.html#1db82aaa68166ce7029df32710ee58f1">00754</a>     <a class="code" href="classdtn_1_1EndpointID.html">EndpointID</a> <a class="code" href="classdtn_1_1Link.html#1db82aaa68166ce7029df32710ee58f1" title="Remote&amp;#39;s endpoint ID (eg, dtn://hostname.dtn).">remote_eid_</a>;
<a name="l00755"></a>00755 
<a name="l00757"></a>00757     <span class="keyword">virtual</span> <a class="code" href="classdtn_1_1Link.html#9aed1d330a9d5e5bd09e0a18e06f2d95" title="Destructor -- protected since links shouldn&amp;#39;t be deleted.">~Link</a>();
<a name="l00758"></a>00758 };
<a name="l00759"></a>00759 
<a name="l00760"></a>00760 } <span class="comment">// namespace dtn</span>
<a name="l00761"></a>00761 
<a name="l00762"></a>00762 <span class="preprocessor">#endif </span><span class="comment">/* _LINK_H_ */</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 30 09:26:57 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>