xorp

RoutingTable< A > Class Template Reference

List of all members.

Public Member Functions

 RoutingTable (Ospf< A > &ospf)
void begin (OspfTypes::AreaID area)
 Before [add|replace|delete]_entry can be called, this method must be called to start the transaction.
bool add_entry (OspfTypes::AreaID area, IPNet< A > net, const RouteEntry< A > &rt, const char *message)
bool replace_entry (OspfTypes::AreaID area, IPNet< A > net, const RouteEntry< A > &rt)
bool delete_entry (OspfTypes::AreaID area, IPNet< A > net)
 Delete an entry from the current table.
void end ()
 For the [add|replace|delete]_entry calls to take effect this method must be called.
bool lookup_entry (A router, RouteEntry< A > &rt)
 Lookup address A in the routing table exact match.
bool lookup_entry (OspfTypes::AreaID area, A router, RouteEntry< A > &rt)
 Lookup address A in the routing table exact match in specified area.
bool lookup_entry (IPNet< A > net, RouteEntry< A > &rt)
 Lookup network in the routing table exact match.
bool lookup_entry (OspfTypes::AreaID area, IPNet< A > net, RouteEntry< A > &rt)
 Lookup network in the routing table exact match.
bool lookup_entry_by_advertising_router (OspfTypes::AreaID area, uint32_t adv, RouteEntry< A > &rt)
 Lookup advertising router in specific area.
bool longest_match_entry (A router, RouteEntry< A > &rt)
 Lookup address A in the routing table longest match.
void remove_area (OspfTypes::AreaID area)
 This call notifies the routing table that this area no longer exists, therefore all routes that came from this area should be removed.
void push_routes ()
 Re-run the policy filters on all routes.

Private Member Functions

bool add_route (OspfTypes::AreaID area, IPNet< A > net, A nexthop, uint32_t metric, RouteEntry< A > &rt, bool summaries)
bool delete_route (OspfTypes::AreaID area, IPNet< A > net, RouteEntry< A > &rt, bool summaries)
bool replace_route (OspfTypes::AreaID area, IPNet< A > net, A nexthop, uint32_t metric, RouteEntry< A > &rt, RouteEntry< A > &previous_rt, OspfTypes::AreaID previous_area)
bool do_filtering (IPNet< A > &net, A &nexthop, uint32_t &metric, RouteEntry< A > &rt, PolicyTags &policytags)

Private Attributes

Ospf< A > & _ospf
bool _in_transaction
Adv< A > _adv
Trie< A, InternalRouteEntry< A > > * _current
Trie< A, InternalRouteEntry< A > > * _previous

template<typename A>
class RoutingTable< A >


Member Function Documentation

template<typename A>
bool RoutingTable< A >::do_filtering ( IPNet< A > &  net,
A &  nexthop,
uint32_t &  metric,
RouteEntry< A > &  rt,
PolicyTags policytags 
) [private]
Returns:
true if the route should be accepted.
template<typename A>
bool RoutingTable< A >::longest_match_entry ( router,
RouteEntry< A > &  rt 
)

Lookup address A in the routing table longest match.

Parameters:
nexthopaddress to lookup.
rtif a match is found fill this in.
Returns:
true if an entry is found.
template<typename A>
bool RoutingTable< A >::lookup_entry ( router,
RouteEntry< A > &  rt 
)

Lookup address A in the routing table exact match.

Parameters:
routeraddress being looked up.
rtif a match is found fill this in.
Returns:
true if an entry is found.
template<typename A>
bool RoutingTable< A >::lookup_entry ( OspfTypes::AreaID  area,
IPNet< A >  net,
RouteEntry< A > &  rt 
)

Lookup network in the routing table exact match.

Parameters:
areaarea ID.
networkaddress being looked up.
rtif a match is found fill this in.
Returns:
true if an entry is found.
template<typename A>
bool RoutingTable< A >::lookup_entry ( OspfTypes::AreaID  area,
router,
RouteEntry< A > &  rt 
)

Lookup address A in the routing table exact match in specified area.

Parameters:
areaarea ID.
routeraddress being looked up.
rtif a match is found fill this in.
Returns:
true if an entry is found.
template<typename A>
bool RoutingTable< A >::lookup_entry ( IPNet< A >  net,
RouteEntry< A > &  rt 
)

Lookup network in the routing table exact match.

Parameters:
networkaddress being looked up.
rtif a match is found fill this in.
Returns:
true if an entry is found.
template<typename A>
bool RoutingTable< A >::lookup_entry_by_advertising_router ( OspfTypes::AreaID  area,
uint32_t  adv,
RouteEntry< A > &  rt 
)

Lookup advertising router in specific area.

Parameters:
areaarea ID.
advadvertsing router
rtif a match is found fill this in.
Returns:
true if an entry is found.
template<typename A >
void RoutingTable< A >::remove_area ( OspfTypes::AreaID  area)

This call notifies the routing table that this area no longer exists, therefore all routes that came from this area should be removed.

All other areas also need to be notified so that any summarisation information can be removed.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations