#include <rtmodule.h>
Inheritance diagram for RoutingModule:


Public Member Functions | |
| RoutingModule () | |
| Node * | node () |
| virtual int | attach (Node *n) |
| virtual int | command (int argc, const char *const *argv) |
| virtual const char * | module_name () const |
| void | route_notify (RoutingModule *rtm) |
| void | unreg_route_notify (RoutingModule *rtm) |
| virtual void | add_route (char *dst, NsObject *target) |
| virtual void | delete_route (char *dst, NsObject *nullagent) |
| void | set_table_size (int nn) |
| void | set_table_size (int level, int csize) |
Public Attributes | |
| RoutingModule * | next_rtm_ |
Protected Attributes | |
| Node * | n_ |
| Classifier * | classifier_ |
|
|
Definition at line 112 of file rtmodule.cc. References classifier_.
00112 : 00113 next_rtm_(NULL), n_(NULL), classifier_(NULL) { 00114 bind("classifier_", (TclObject**)&classifier_); 00115 } |
|
||||||||||||
|
Reimplemented in MPLSModule, ManualRoutingModule, VcRoutingModule, and LmsRoutingModule. Definition at line 417 of file rtmodule.cc. References classifier_, Classifier::do_install(), and next_rtm_. Referenced by ManualRoutingModule::add_route(), Node::add_route(), MPLSModule::add_route(), and delete_route().
00418 {
00419 if (classifier_)
00420 classifier_->do_install(dst,target);
00421 if (next_rtm_ != NULL)
00422 next_rtm_->add_route(dst, target);
00423 }
|
Here is the call graph for this function:

|
|
Definition at line 59 of file rtmodule.h. References n_.
00059 { n_ = n; return TCL_OK; }
|
|
||||||||||||
|
Reimplemented in MPLSModule, BaseRoutingModule, McastRoutingModule, HierRoutingModule, ManualRoutingModule, SourceRoutingModule, QSRoutingModule, and VcRoutingModule. Definition at line 117 of file rtmodule.cc. References module_name(), and n_. Referenced by VcRoutingModule::command(), ManualRoutingModule::command(), HierRoutingModule::command(), McastRoutingModule::command(), QSRoutingModule::command(), SourceRoutingModule::command(), BaseRoutingModule::command(), and MPLSModule::command().
00118 {
00119 Tcl& tcl = Tcl::instance();
00120 if (argc == 2) {
00121 if (strcmp(argv[1], "node") == 0) {
00122 assert(n_ != NULL);
00123 tcl.resultf("%s", n_->name());
00124 return TCL_OK;
00125 } else if (strcmp(argv[1], "module-name") == 0) {
00126 if (module_name() != NULL)
00127 tcl.resultf("%s", module_name());
00128 else
00129 tcl.result("");
00130 return TCL_OK;
00131 }
00132
00133 } else if (argc == 3) {
00134 if (strcmp(argv[1], "attach-node") == 0) {
00135 n_ = (Node*)TclObject::lookup(argv[2]);
00136 if (n_ == NULL) {
00137 tcl.add_errorf("Wrong object name %s",argv[2]);
00138 return TCL_ERROR;
00139 }
00140 return TCL_OK;
00141 }
00142 //if (strcmp(argv[1], "attach-classifier") == 0) {
00143 //classifier_ = (Classifier*)(TclObject::lookup(argv[2]));
00144 //if (classifier_ == NULL) {
00145 //tcl.add_errorf("Wrong object name %s",argv[2]);
00146 //return TCL_ERROR;
00147 //}
00148 //return TCL_OK;
00149 //}
00150 }
00151 return TclObject::command(argc, argv);
00152 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 425 of file rtmodule.cc. References add_route(), classifier_, Classifier::do_install(), and next_rtm_. Referenced by Node::delete_route().
00426 {
00427 if (classifier_)
00428 classifier_->do_install(dst, nullagent);
00429 if (next_rtm_)
00430 next_rtm_->add_route(dst, nullagent);
00431 }
|
Here is the call graph for this function:

|
|
Reimplemented in MPLSModule, BaseRoutingModule, McastRoutingModule, HierRoutingModule, ManualRoutingModule, SourceRoutingModule, QSRoutingModule, VcRoutingModule, PgmRoutingModule, and LmsRoutingModule. Definition at line 61 of file rtmodule.h. Referenced by command().
00061 { return NULL; }
|
|
|
Definition at line 49 of file rtmodule.h. References n_. Referenced by VcRoutingModule::command(), ManualRoutingModule::command(), HierRoutingModule::command(), McastRoutingModule::command(), QSRoutingModule::command(), SourceRoutingModule::command(), BaseRoutingModule::command(), and MPLSModule::command().
00049 { return n_; }
|
|
|
Definition at line 397 of file rtmodule.cc. References next_rtm_. Referenced by Node::route_notify().
00397 {
00398 if (next_rtm_ != NULL)
00399 next_rtm_->route_notify(rtm);
00400 else
00401 next_rtm_ = rtm;
00402 }
|
|
||||||||||||
|
Definition at line 441 of file rtmodule.cc. References classifier_, next_rtm_, set_table_size(), and Classifier::set_table_size().
00442 {
00443 if (classifier_)
00444 classifier_->set_table_size(level, size);
00445 if (next_rtm_)
00446 next_rtm_->set_table_size(level, size);
00447 }
|
Here is the call graph for this function:

|
|
Definition at line 433 of file rtmodule.cc. References classifier_, next_rtm_, and Classifier::set_table_size(). Referenced by set_table_size(), and Node::set_table_size().
00434 {
00435 if (classifier_)
00436 classifier_->set_table_size(nn);
00437 if (next_rtm_)
00438 next_rtm_->set_table_size(nn);
00439 }
|
Here is the call graph for this function:

|
|
Definition at line 404 of file rtmodule.cc. References next_rtm_. Referenced by Node::unreg_route_notify().
|
|
|
Reimplemented in BaseRoutingModule, McastRoutingModule, HierRoutingModule, and ManualRoutingModule. Definition at line 74 of file rtmodule.h. Referenced by add_route(), MPLSModule::add_route(), MPLSModule::command(), delete_route(), RoutingModule(), and set_table_size(). |
|
|
Definition at line 73 of file rtmodule.h. Referenced by attach(), VcRoutingModule::command(), ManualRoutingModule::command(), HierRoutingModule::command(), McastRoutingModule::command(), QSRoutingModule::command(), SourceRoutingModule::command(), BaseRoutingModule::command(), command(), MPLSModule::command(), and node(). |
|
|
Definition at line 70 of file rtmodule.h. Referenced by ManualRoutingModule::add_route(), add_route(), MPLSModule::add_route(), delete_route(), route_notify(), set_table_size(), unreg_route_notify(), and Node::unreg_route_notify(). |
1.3.3