|
xorp
|
RouteRegister stores a registration of interest in a subset of a route. More...
#include <rt_tab_register.hh>
Public Member Functions | |
| RouteRegister (const IPNet< A > &valid_subnet, const IPRouteEntry< A > *route, const ModuleData &module) | |
| RouteRegister Constructor. | |
| ~RouteRegister () | |
| Destructor. | |
| int | add_registrant (const ModuleData &module) |
| add_registrant is called when an additional routing protocol expresses interest in the routing information already held by this RouteRegister instance. | |
| int | delete_registrant (const ModuleData &module) |
| delete_registrant is called when a routing protocol that was previously interested in this RouteRegister de-registers itself. | |
| void | mark_modules () const |
| mark_modules is called when the routing information matching this registration changes. | |
| int | size () const |
| const IPNet< A > & | valid_subnet () const |
| const IPRouteEntry< A > * | route () const |
| list< string > | module_names () const |
| string | str () const |
Private Attributes | |
| map< string, ModuleData > | _modules |
| IPNet< A > | _valid_subnet |
| const IPRouteEntry< A > * | _route |
RouteRegister stores a registration of interest in a subset of a route.
A RouteRegister instance is used to store the registration of interest in a route. Suppose there are two overlapping routes: 1.0.0.0/16 and 1.0.1.0/24. Now a routing protocol "bgp" expresses interest in route changes that affect 1.0.0.27, which is routed using 1.0.0.0/16. The relevant RouteRegister would then hold: route: route entry for 1.0.0.0/16 valid_subnet: 1.0.0.0/24 moduledata: {"bgp"} The valid_subnet is 1.0.0.0/24 because this is the largest subset of 1.0.0.0/16 that encompasses 1.0.0.27 and doesn't overlap any other route.
If a subsequent request from routing protocol "pim" were to come along for 1.0.0.54, then this would be stored on the same RouteRegister instance, but the ModuleData would be expanded to include "pim".
| RouteRegister< A >::RouteRegister | ( | const IPNet< A > & | valid_subnet, |
| const IPRouteEntry< A > * | route, | ||
| const ModuleData & | module | ||
| ) | [inline] |
RouteRegister Constructor.
| int RouteRegister< A >::add_registrant | ( | const ModuleData & | module | ) | [inline] |
add_registrant is called when an additional routing protocol expresses interest in the routing information already held by this RouteRegister instance.
| module | the ModuleData instance refering to the additional routing protocol that just registered interest. |
| int RouteRegister< A >::delete_registrant | ( | const ModuleData & | module | ) |
delete_registrant is called when a routing protocol that was previously interested in this RouteRegister de-registers itself.
| module | the ModuleData instance of the routing protocol that de-registered. |
| void RouteRegister< A >::mark_modules | ( | ) | const [inline] |
mark_modules is called when the routing information matching this registration changes.
It marks the original instances of the ModuleData as needing nitification.
| list<string> RouteRegister< A >::module_names | ( | ) | const [inline] |
| const IPRouteEntry<A>* RouteRegister< A >::route | ( | ) | const [inline] |
| int RouteRegister< A >::size | ( | ) | const [inline] |
| string RouteRegister< A >::str | ( | ) | const |
| const IPNet<A>& RouteRegister< A >::valid_subnet | ( | ) | const [inline] |