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


Public Member Functions | |
| HierRoutingModule () | |
| virtual const char * | module_name () const |
| virtual int | command (int argc, const char *const *argv) |
| Node * | node () |
| virtual int | attach (Node *n) |
| 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 | |
| HierClassifier * | classifier_ |
| Node * | n_ |
|
|
Definition at line 97 of file rtmodule.h.
00097 : RoutingModule() {} |
|
||||||||||||
|
Reimplemented in MPLSModule, ManualRoutingModule, VcRoutingModule, and LmsRoutingModule. Definition at line 417 of file rtmodule.cc. References RoutingModule::classifier_, Classifier::do_install(), and RoutingModule::next_rtm_. Referenced by ManualRoutingModule::add_route(), Node::add_route(), MPLSModule::add_route(), and RoutingModule::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 RoutingModule::n_.
00059 { n_ = n; return TCL_OK; }
|
|
||||||||||||
|
Reimplemented from RoutingModule. Definition at line 286 of file rtmodule.cc. References RoutingModule::command(), RoutingModule::n_, RoutingModule::node(), Node::route_notify(), and Node::unreg_route_notify().
00286 {
00287 Tcl& tcl = Tcl::instance();
00288 if (argc == 3) {
00289 //if (strcmp(argv[1], "attach-classifier") == 0) {
00290 //classifier_ = (HierClassifier*)(TclObject::lookup(argv[2]));
00291 //if (classifier_ == NULL) {
00292 //tcl.add_errorf("Wrong object name %s",argv[2]);
00293 //return TCL_ERROR;
00294 //}
00295 //return TCL_OK;
00296 //}
00297 if (strcmp(argv[1] , "route-notify") == 0) {
00298 Node *node = (Node *)(TclObject::lookup(argv[2]));
00299 if (node == NULL) {
00300 tcl.add_errorf("Invalid node object %s", argv[2]);
00301 return TCL_ERROR;
00302 }
00303 if (node != n_) {
00304 tcl.add_errorf("Node object %s different from n_", argv[2]);
00305 return TCL_ERROR;
00306 }
00307 n_->route_notify(this);
00308 return TCL_OK;
00309 }
00310 if (strcmp(argv[1] , "unreg-route-notify") == 0) {
00311 Node *node = (Node *)(TclObject::lookup(argv[2]));
00312 if (node == NULL) {
00313 tcl.add_errorf("Invalid node object %s", argv[2]);
00314 return TCL_ERROR;
00315 }
00316 if (node != n_) {
00317 tcl.add_errorf("Node object %s different from n_", argv[2]);
00318 return TCL_ERROR;
00319 }
00320 n_->unreg_route_notify(this);
00321 return TCL_OK;
00322 }
00323 }
00324 return (RoutingModule::command(argc, argv));
00325 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 425 of file rtmodule.cc. References RoutingModule::add_route(), RoutingModule::classifier_, Classifier::do_install(), and RoutingModule::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 from RoutingModule. Definition at line 98 of file rtmodule.h.
00098 { return "Hier"; }
|
|
|
Definition at line 49 of file rtmodule.h. References RoutingModule::n_. Referenced by VcRoutingModule::command(), ManualRoutingModule::command(), command(), McastRoutingModule::command(), QSRoutingModule::command(), SourceRoutingModule::command(), BaseRoutingModule::command(), and MPLSModule::command().
00049 { return n_; }
|
|
|
Definition at line 397 of file rtmodule.cc. References RoutingModule::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 RoutingModule::classifier_, RoutingModule::next_rtm_, RoutingModule::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 RoutingModule::classifier_, RoutingModule::next_rtm_, and Classifier::set_table_size(). Referenced by RoutingModule::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 RoutingModule::next_rtm_. Referenced by Node::unreg_route_notify().
|
|
|
Reimplemented from RoutingModule. Definition at line 101 of file rtmodule.h. |
|
|
|
Definition at line 70 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.3.3