<!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: ConnectionConvergenceLayer.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <h1>ConnectionConvergenceLayer.h</h1><a href="ConnectionConvergenceLayer_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 _CONNECTION_CONVERGENCE_LAYER_H_</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _CONNECTION_CONVERGENCE_LAYER_H_</span> <a name="l00019"></a>00019 <span class="preprocessor"></span> <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="ConvergenceLayer_8h.html">ConvergenceLayer.h</a>"</span> <a name="l00021"></a>00021 <a name="l00022"></a>00022 <span class="keyword">namespace </span>dtn { <a name="l00023"></a>00023 <a name="l00024"></a>00024 <span class="keyword">class </span>CLConnection; <a name="l00025"></a>00025 <a name="l00075"></a><a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html">00075</a> <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> : <span class="keyword">public</span> <a class="code" href="classdtn_1_1ConvergenceLayer.html" title="The abstract interface for a convergence layer.">ConvergenceLayer</a> { <a name="l00076"></a>00076 <span class="keyword">public</span>: <a name="l00080"></a>00080 <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#56ec3d4688989c2df7adecdcaff0f634" title="Constructor.">ConnectionConvergenceLayer</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* logpath, <span class="keyword">const</span> <span class="keywordtype">char</span>* cl_name); <a name="l00081"></a>00081 <a name="l00083"></a>00083 <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#889ff6f6005f5a8c836ce39cd0c4c2e7" title="Virtual from ConvergenceLayer.">init_link</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>& link, <span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span>* argv[]); <a name="l00084"></a>00084 <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#f0a6be1e18dbf9241f6d1d7c89ff47e8" title="Virtual from ConvergenceLayer.">delete_link</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>& link); <a name="l00085"></a>00085 <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#c8a0955bbe61e68c1a697e62faa1e4c8" title="Virtual from ConvergenceLayer.">dump_link</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>& link, oasys::StringBuffer* <a class="code" href="num2sdnv_8c.html#a81cdcc7ff6987bc85c073253e32715f">buf</a>); <a name="l00086"></a>00086 <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#de9d1c7b1d79efaf0e93253e745aefb7" title="Virtual from ConvergenceLayer.">reconfigure_link</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>& link, <span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span>* argv[]); <a name="l00087"></a>00087 <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#1c3cb9cbe18ba59ac976e19067472ad4" title="Virtual from ConvergenceLayer.">open_contact</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#5f869544c85c75b5a85a14d6e90d7ff7" title="Typedef for a reference on a contact.">ContactRef</a>& contact); <a name="l00088"></a>00088 <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#e5498982de68b593fdf1985a9e7d4011" title="Virtual from ConvergenceLayer.">close_contact</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#5f869544c85c75b5a85a14d6e90d7ff7" title="Typedef for a reference on a contact.">ContactRef</a>& contact); <a name="l00089"></a>00089 <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#f84ad21279095a87e161a5f370b10bd2" title="Virtual from ConvergenceLayer.">bundle_queued</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>& link, <span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>& bundle); <a name="l00090"></a>00090 <span class="keywordtype">void</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#c80d202f28b43f016b56550fd8265704" title="Virtual from ConvergenceLayer.">cancel_bundle</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>& link, <span class="keyword">const</span> <a class="code" href="namespacedtn.html#87094f3b26b9f1d469e616d311ae57b1" title="Class definition for a Bundle reference.">BundleRef</a>& bundle); <a name="l00092"></a>00092 <a name="l00098"></a><a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html">00098</a> <span class="keyword">class </span><a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html" title="Tunable parameter structure stored in each Link&#39;s CLInfo slot.">LinkParams</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="l00099"></a>00099 <span class="keyword">public</span>: <a name="l00100"></a><a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#79b0142dedcbe59f6e5a98aca31bab8f">00100</a> <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#79b0142dedcbe59f6e5a98aca31bab8f" title="Is reactive fragmentation enabled.">reactive_frag_enabled_</a>; <a name="l00101"></a><a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#c5ca778da8a9f0fda86d83057ccda6aa">00101</a> u_int <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#c5ca778da8a9f0fda86d83057ccda6aa" title="Buffer size for sending data.">sendbuf_len_</a>; <a name="l00102"></a><a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#2ad6f369e6bdf7e153ddebc606ecb4fd">00102</a> u_int <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#2ad6f369e6bdf7e153ddebc606ecb4fd" title="Buffer size for receiving data.">recvbuf_len_</a>; <a name="l00103"></a><a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#d9a4cbe17b7dea4a086e688f35be83b8">00103</a> u_int <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#d9a4cbe17b7dea4a086e688f35be83b8" title="Msecs to wait for data arrival.">data_timeout_</a>; <a name="l00104"></a>00104 <a name="l00105"></a><a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#4cbb97db307b4014d0316ba799d61360">00105</a> u_int <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#4cbb97db307b4014d0316ba799d61360" title="Msecs to sleep between read calls.">test_read_delay_</a>; <a name="l00106"></a><a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#afc9760cfe60df3967cf328878f32f33">00106</a> u_int <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#afc9760cfe60df3967cf328878f32f33" title="Msecs to sleep between write calls.">test_write_delay_</a>; <a name="l00107"></a><a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#26202dc16d24aacee98b6ae6cf689cba">00107</a> u_int <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#26202dc16d24aacee98b6ae6cf689cba" title="Msecs to sleep before recv evt.">test_recv_delay_</a>; <a name="l00108"></a>00108 <a name="l00109"></a><a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#93366f294f3d618da32a454057e46f44">00109</a> u_int <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#93366f294f3d618da32a454057e46f44" title="Max amount to read from the channel.">test_read_limit_</a>; <a name="l00110"></a><a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#8064b479cfbd48ce1548fe41e1a6c6a6">00110</a> u_int <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#8064b479cfbd48ce1548fe41e1a6c6a6" title="Max amount to write to the channel.">test_write_limit_</a>; <a name="l00111"></a>00111 <a name="l00112"></a>00112 <span class="keyword">protected</span>: <a name="l00113"></a>00113 <span class="comment">// The only time this constructor should be called is to</span> <a name="l00114"></a>00114 <span class="comment">// initialize the default parameters. All other cases (i.e.</span> <a name="l00115"></a>00115 <span class="comment">// derivative parameter classes) should use a copy constructor</span> <a name="l00116"></a>00116 <span class="comment">// to grab the default settings.</span> <a name="l00117"></a>00117 <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html#9d3b5e0755b03c9c4ad1730cb0654a4a">LinkParams</a>(<span class="keywordtype">bool</span> init_defaults); <a name="l00118"></a>00118 }; <a name="l00119"></a>00119 <a name="l00123"></a>00123 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#9f96d07f1c0cb39625c18d08fda84bfc" title="Parse and validate the nexthop address for the given link.">parse_nexthop</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>& link, <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html" title="Tunable parameter structure stored in each Link&#39;s CLInfo slot.">LinkParams</a>* params) = 0; <a name="l00124"></a>00124 <a name="l00125"></a>00125 <span class="keyword">protected</span>: <a name="l00129"></a>00129 <span class="keyword">virtual</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html" title="Tunable parameter structure stored in each Link&#39;s CLInfo slot.">LinkParams</a>* <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#c837d8f6908c2711cabdfe925bee1ac5" title="Create a new LinkParams structure.">new_link_params</a>() = 0; <a name="l00130"></a>00130 <a name="l00135"></a>00135 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#adbf0e8a26308b4250543ff5a46e2a09" title="Parse the link parameters, returning true iff the args are valid for the given nexthop...">parse_link_params</a>(<a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html" title="Tunable parameter structure stored in each Link&#39;s CLInfo slot.">LinkParams</a>* params, <a name="l00136"></a>00136 <span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span>** argv, <a name="l00137"></a>00137 <span class="keyword">const</span> <span class="keywordtype">char</span>** invalidp); <a name="l00138"></a>00138 <a name="l00143"></a>00143 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#a256c77be82909fb4fede37fd347fd23" title="After the link parameters are parsed, do any initialization of the link that&#39;s...">finish_init_link</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>& link, <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html" title="Tunable parameter structure stored in each Link&#39;s CLInfo slot.">LinkParams</a>* params); <a name="l00144"></a>00144 <a name="l00148"></a>00148 <span class="keyword">virtual</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>* <a class="code" href="classdtn_1_1ConnectionConvergenceLayer.html#c7772a23c2ba8c47c24807e446264918" title="Create a new CL-specific connection object.">new_connection</a>(<span class="keyword">const</span> <a class="code" href="namespacedtn.html#6efb37e503f8062c537b022eb755b94e" title="Typedef for a reference on a link.">LinkRef</a>& link, <a name="l00149"></a>00149 <a class="code" href="classdtn_1_1ConnectionConvergenceLayer_1_1LinkParams.html" title="Tunable parameter structure stored in each Link&#39;s CLInfo slot.">LinkParams</a>* params) = 0; <a name="l00150"></a>00150 <a name="l00151"></a>00151 }; <a name="l00152"></a>00152 <a name="l00153"></a>00153 } <span class="comment">// namespace dtn</span> <a name="l00154"></a>00154 <a name="l00155"></a>00155 <span class="preprocessor">#endif </span><span class="comment">/* _CONNECTION_CONVERGENCE_LAYER_H_ */</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 21 14:09:38 2008 for DTN Reference Implementation by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>