00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _CONNECTION_CONVERGENCE_LAYER_H_
00018 #define _CONNECTION_CONVERGENCE_LAYER_H_
00019
00020 #include "ConvergenceLayer.h"
00021
00022 namespace dtn {
00023
00024 class CLConnection;
00025
00075 class ConnectionConvergenceLayer : public ConvergenceLayer {
00076 public:
00080 ConnectionConvergenceLayer(const char* logpath, const char* cl_name);
00081
00083 bool init_link(const LinkRef& link, int argc, const char* argv[]);
00084 void delete_link(const LinkRef& link);
00085 void dump_link(const LinkRef& link, oasys::StringBuffer* buf);
00086 bool reconfigure_link(const LinkRef& link, int argc, const char* argv[]);
00087 bool open_contact(const ContactRef& contact);
00088 bool close_contact(const ContactRef& contact);
00089 void bundle_queued(const LinkRef& link, const BundleRef& bundle);
00090 void cancel_bundle(const LinkRef& link, const BundleRef& bundle);
00092
00098 class LinkParams : public CLInfo {
00099 public:
00100 bool reactive_frag_enabled_;
00101 u_int sendbuf_len_;
00102 u_int recvbuf_len_;
00103 u_int data_timeout_;
00104
00105 u_int test_read_delay_;
00106 u_int test_write_delay_;
00107 u_int test_recv_delay_;
00108
00109 u_int test_read_limit_;
00110 u_int test_write_limit_;
00111
00112 protected:
00113
00114
00115
00116
00117 LinkParams(bool init_defaults);
00118 };
00119
00123 virtual bool parse_nexthop(const LinkRef& link, LinkParams* params) = 0;
00124
00125 protected:
00129 virtual LinkParams* new_link_params() = 0;
00130
00135 virtual bool parse_link_params(LinkParams* params,
00136 int argc, const char** argv,
00137 const char** invalidp);
00138
00143 virtual bool finish_init_link(const LinkRef& link, LinkParams* params);
00144
00148 virtual CLConnection* new_connection(const LinkRef& link,
00149 LinkParams* params) = 0;
00150
00151 };
00152
00153 }
00154
00155 #endif