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


Definition at line 167 of file rtmodule.h.
Public Member Functions | |
| virtual void | add_route (char *dst, NsObject *target) |
| virtual int | attach (Node *n) |
| virtual int | command (int argc, const char *const *argv) |
| virtual void | delete_route (char *dst, NsObject *nullagent) |
| virtual const char * | module_name () const |
| Node * | node () |
| PgmRoutingModule () | |
| void | route_notify (RoutingModule *rtm) |
| void | set_table_size (int level, int csize) |
| void | set_table_size (int nn) |
| void | unreg_route_notify (RoutingModule *rtm) |
Data Fields | |
| RoutingModule * | next_rtm_ |
Protected Attributes | |
| Classifier * | classifier_ |
| Node * | n_ |
|
|
Definition at line 169 of file rtmodule.h. 00169 : RoutingModule() {}
|
|
||||||||||||
|
Reimplemented in MPLSModule, ManualRoutingModule, VcRoutingModule, and LmsRoutingModule. Definition at line 445 of file rtmodule.cc. References RoutingModule::add_route(), RoutingModule::classifier_, Classifier::do_install(), and RoutingModule::next_rtm_. Referenced by ManualRoutingModule::add_route(), RoutingModule::add_route(), Node::add_route(), MPLSModule::add_route(), and RoutingModule::delete_route(). 00446 { 00447 if (classifier_) 00448 classifier_->do_install(dst,target); 00449 if (next_rtm_ != NULL) 00450 next_rtm_->add_route(dst, target); 00451 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 88 of file rtmodule.h. References RoutingModule::n_. 00088 { n_ = n; return TCL_OK; }
|
|
||||||||||||
|
Reimplemented in MPLSModule, BaseRoutingModule, McastRoutingModule, HierRoutingModule, ManualRoutingModule, SourceRoutingModule, QSRoutingModule, and VcRoutingModule. Definition at line 145 of file rtmodule.cc. References RoutingModule::module_name(), and RoutingModule::n_. Referenced by VcRoutingModule::command(), ManualRoutingModule::command(), HierRoutingModule::command(), McastRoutingModule::command(), QSRoutingModule::command(), SourceRoutingModule::command(), BaseRoutingModule::command(), and MPLSModule::command(). 00146 { 00147 Tcl& tcl = Tcl::instance(); 00148 if (argc == 2) { 00149 if (strcmp(argv[1], "node") == 0) { 00150 assert(n_ != NULL); 00151 tcl.resultf("%s", n_->name()); 00152 return TCL_OK; 00153 } else if (strcmp(argv[1], "module-name") == 0) { 00154 if (module_name() != NULL) 00155 tcl.resultf("%s", module_name()); 00156 else 00157 tcl.result(""); 00158 return TCL_OK; 00159 } 00160 00161 } else if (argc == 3) { 00162 if (strcmp(argv[1], "attach-node") == 0) { 00163 n_ = (Node*)TclObject::lookup(argv[2]); 00164 if (n_ == NULL) { 00165 tcl.add_errorf("Wrong object name %s",argv[2]); 00166 return TCL_ERROR; 00167 } 00168 return TCL_OK; 00169 } 00170 //if (strcmp(argv[1], "attach-classifier") == 0) { 00171 //classifier_ = (Classifier*)(TclObject::lookup(argv[2])); 00172 //if (classifier_ == NULL) { 00173 //tcl.add_errorf("Wrong object name %s",argv[2]); 00174 //return TCL_ERROR; 00175 //} 00176 //return TCL_OK; 00177 //} 00178 } 00179 return TclObject::command(argc, argv); 00180 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 453 of file rtmodule.cc. References RoutingModule::add_route(), RoutingModule::classifier_, Classifier::do_install(), and RoutingModule::next_rtm_. Referenced by Node::delete_route(). 00454 { 00455 if (classifier_) 00456 classifier_->do_install(dst, nullagent); 00457 if (next_rtm_) 00458 next_rtm_->add_route(dst, nullagent); 00459 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented from RoutingModule. Definition at line 170 of file rtmodule.h.
|
|
|
Definition at line 78 of file rtmodule.h. References RoutingModule::n_. Referenced by VcRoutingModule::command(), ManualRoutingModule::command(), HierRoutingModule::command(), McastRoutingModule::command(), QSRoutingModule::command(), SourceRoutingModule::command(), BaseRoutingModule::command(), and MPLSModule::command(). 00078 { return n_; }
|
|
|
Definition at line 425 of file rtmodule.cc. References RoutingModule::next_rtm_, and RoutingModule::route_notify(). Referenced by RoutingModule::route_notify(), and Node::route_notify(). 00425 { 00426 if (next_rtm_ != NULL) 00427 next_rtm_->route_notify(rtm); 00428 else 00429 next_rtm_ = rtm; 00430 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 469 of file rtmodule.cc. References RoutingModule::classifier_, RoutingModule::next_rtm_, RoutingModule::set_table_size(), and Classifier::set_table_size(). 00470 { 00471 if (classifier_) 00472 classifier_->set_table_size(level, size); 00473 if (next_rtm_) 00474 next_rtm_->set_table_size(level, size); 00475 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 461 of file rtmodule.cc. References RoutingModule::classifier_, RoutingModule::next_rtm_, RoutingModule::set_table_size(), and Classifier::set_table_size(). Referenced by RoutingModule::set_table_size(), and Node::set_table_size(). 00462 { 00463 if (classifier_) 00464 classifier_->set_table_size(nn); 00465 if (next_rtm_) 00466 next_rtm_->set_table_size(nn); 00467 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 432 of file rtmodule.cc. References RoutingModule::next_rtm_, and RoutingModule::unreg_route_notify(). Referenced by RoutingModule::unreg_route_notify(), and Node::unreg_route_notify(). 00432 { 00433 if (next_rtm_) { 00434 if (next_rtm_ == rtm) { 00435 //RoutingModule *tmp = next_rtm_; 00436 next_rtm_ = next_rtm_->next_rtm_; 00437 //free (tmp); 00438 } 00439 else { 00440 next_rtm_->unreg_route_notify(rtm); 00441 } 00442 } 00443 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in BaseRoutingModule, McastRoutingModule, HierRoutingModule, and ManualRoutingModule. Definition at line 103 of file rtmodule.h. Referenced by RoutingModule::add_route(), MPLSModule::add_route(), MPLSModule::command(), RoutingModule::delete_route(), RoutingModule::RoutingModule(), and RoutingModule::set_table_size(). |
|
|
|
Definition at line 99 of file rtmodule.h. Referenced by ManualRoutingModule::add_route(), RoutingModule::add_route(), MPLSModule::add_route(), RoutingModule::delete_route(), RoutingModule::route_notify(), RoutingModule::set_table_size(), RoutingModule::unreg_route_notify(), and Node::unreg_route_notify(). |
1.4.6