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(Link* link, int argc, const char* argv[]);
00084 void dump_link(Link* link, oasys::StringBuffer* buf);
00085 bool reconfigure_link(Link* link, int argc, const char* argv[]);
00086 bool open_contact(const ContactRef& contact);
00087 bool close_contact(const ContactRef& contact);
00088 void send_bundle(const ContactRef& contact, Bundle* bundle);
00090
00096 class LinkParams : public CLInfo {
00097 public:
00098 u_int32_t busy_queue_depth_;
00099 bool reactive_frag_enabled_;
00100 u_int sendbuf_len_;
00101 u_int recvbuf_len_;
00102 u_int data_timeout_;
00103
00104 u_int test_read_delay_;
00105 u_int test_write_delay_;
00106 u_int test_recv_delay_;
00107
00108 protected:
00109
00110
00111
00112
00113 LinkParams(bool init_defaults);
00114 };
00115
00119 virtual bool parse_nexthop(Link* link, LinkParams* params) = 0;
00120
00121 protected:
00125 virtual LinkParams* new_link_params() = 0;
00126
00131 virtual bool parse_link_params(LinkParams* params,
00132 int argc, const char** argv,
00133 const char** invalidp);
00134
00139 virtual bool finish_init_link(Link* link, LinkParams* params);
00140
00144 virtual CLConnection* new_connection(LinkParams* params) = 0;
00145
00146 };
00147
00148 }
00149
00150 #endif