xorp

External< A > Class Template Reference

Handle AS-external-LSAs. More...

#include <external.hh>

List of all members.

Public Member Functions

 External (Ospf< A > &ospf, map< OspfTypes::AreaID, AreaRouter< A > * > &areas)
bool announce (OspfTypes::AreaID area, Lsa::LsaRef lsar)
 Candidate for announcing to other areas.
bool announce_complete (OspfTypes::AreaID area)
 Called to complete a series of calls to announce().
void push (AreaRouter< A > *area_router)
 Provide this area with the stored AS-external-LSAs.
bool announce (IPNet< A > net, A nexthop, uint32_t metric, const PolicyTags &policytags)
 A true external route redistributed from the RIB (announce).
bool withdraw (const IPNet< A > &net)
 A true external route redistributed from the RIB (withdraw).
bool clear_database ()
 Clear the AS-external-LSA database.
void suppress_lsas (OspfTypes::AreaID area)
 Suppress or remove AS-external-LSAs that are originated by this router that should yield to externally generated AS-external-LSAs as described in RFC 2328 Section 12.4.4.
void suppress_route_announce (OspfTypes::AreaID area, IPNet< A > net, RouteEntry< A > &rt)
 A route has just been added to the routing table.
void suppress_route_withdraw (OspfTypes::AreaID area, IPNet< A > net, RouteEntry< A > &rt)
 A route has just been withdrawn from the routing table.
bool as_boundary_router_p () const
 Is this an AS boundary router?
void push_routes ()
 Re-run the policy filters on all routes.

Private Member Functions

ASExternalDatabase::iterator find_lsa (Lsa::LsaRef lsar)
 Find this LSA.
void update_lsa (Lsa::LsaRef lsar)
 Add this LSA to the database if it already exists replace it with this entry.
void delete_lsa (Lsa::LsaRef lsar)
 Delete this LSA from the database.
void maxage_reached (Lsa::LsaRef lsar)
 This LSA has reached MaxAge get rid of it from the database and flood it out of all areas.
void unique_link_state_id (Lsa::LsaRef lsar)
 Networks with same network number but different prefix lengths can generate the same link state ID.
ASExternalDatabase::iterator unique_find_lsa (Lsa::LsaRef lsar, const IPNet< A > &net)
 Networks with same network number but different prefix lengths can generate the same link state ID.
void set_net_nexthop_lsid (ASExternalLsa *aselsa, IPNet< A > net, A nexthop)
 Set the network, nexthop and link state ID.
void announce_lsa (Lsa::LsaRef lsar)
 Send this self originated LSA out.
bool do_filtering (IPNet< A > &network, A &nexthop, uint32_t &metric, bool &e_bit, uint32_t &tag, bool &tag_set, const PolicyTags &policytags)
 Pass this outbound AS-external-LSA through the policy filter.
void start_refresh_timer (Lsa::LsaRef lsar)
 Start the refresh timer.
void refresh (Lsa::LsaRef lsar)
 Called every LSRefreshTime seconds to refresh this LSA.
Lsa::LsaRef clone_lsa (Lsa::LsaRef lsar)
 Clone a self orignated LSA that is about to be removed for possible later introduction.
bool suppress_candidate (Lsa::LsaRef lsar, IPNet< A > net, A nexthop, uint32_t metric)
 Is this a self originated AS-external-LSA a candidate for suppression?
void suppress_self (Lsa::LsaRef lsar)
 Should this AS-external-LSA cause a self originated LSA to be suppressed.
bool suppress_self_check (Lsa::LsaRef lsar)
 Should this AS-external-LSA cause a self originated LSA to be suppressed.
Lsa::LsaRef find_lsa_by_net (IPNet< A > net)
 Find a self originated AS-external-LSA by network.
void suppress_queue_lsa (Lsa::LsaRef lsar)
 This LSA if its advertising router is reachable matches a self origniated LSA that will be suppressed.
void suppress_maxage (Lsa::LsaRef lsar)
 An AS-external-LSA has reached MaxAge and is being withdrawn.
void suppress_release_lsa (Lsa::LsaRef lsar)
 If this is an AS-external-LSA that is suppressing a self originated route, then release it.
template<>
void unique_link_state_id (Lsa::LsaRef)
template<>
ASExternalDatabase::iterator unique_find_lsa (Lsa::LsaRef lsar, const IPNet< IPv6 > &)
template<>
void set_net_nexthop_lsid (ASExternalLsa *aselsa, IPNet< IPv6 > net, IPv6 nexthop)

Private Attributes

Ospf< A > & _ospf
map< OspfTypes::AreaID,
AreaRouter< A > * > & 
_areas
ASExternalDatabase _lsas
uint32_t _originating
uint32_t _lsid
map< IPNet< IPv6 >, uint32_t > _lsmap
list< Lsa::LsaRef_suppress_temp

Detailed Description

template<typename A>
class External< A >

Handle AS-external-LSAs.


Member Function Documentation

template<typename A >
bool External< A >::announce ( OspfTypes::AreaID  area,
Lsa::LsaRef  lsar 
)

Candidate for announcing to other areas.

Store this LSA for future replay into other areas. Also arrange for the MaxAge timer to start running.

Parameters:
areathe AS-external-LSA came from.
Returns:
true if this LSA should be propogated to other areas.
template<typename A>
bool External< A >::announce ( IPNet< A >  net,
nexthop,
uint32_t  metric,
const PolicyTags policytags 
)

A true external route redistributed from the RIB (announce).

If the nexthop address is not configured for OSPF then it won't be reachable, so set the nexthop to zero.

template<typename A >
void External< A >::suppress_lsas ( OspfTypes::AreaID  area)

Suppress or remove AS-external-LSAs that are originated by this router that should yield to externally generated AS-external-LSAs as described in RFC 2328 Section 12.4.4.

By time this method is called the routing table should have been updated so it should be clear if the other router is reachable.

template<typename A >
void External< A >::suppress_maxage ( Lsa::LsaRef  lsar) [private]

An AS-external-LSA has reached MaxAge and is being withdrawn.

check to see if it was suppressing a self originated LSA.

template<typename A >
void External< A >::suppress_queue_lsa ( Lsa::LsaRef  lsar) [private]

This LSA if its advertising router is reachable matches a self origniated LSA that will be suppressed.

Store until the routing computation has completed and the routing table can be checked.

template<typename A>
ASExternalDatabase::iterator External< A >::unique_find_lsa ( Lsa::LsaRef  lsar,
const IPNet< A > &  net 
) [private]

Networks with same network number but different prefix lengths can generate the same link state ID.

When looking for an LSA make sure that there the lsar that matches the net is found.

Parameters:
lsarsearch for this LSA in the database. WARNING this LSA may have its link state ID field modifed by the search.
netthat must match the LSA.
template<typename A>
void External< A >::unique_link_state_id ( Lsa::LsaRef  lsar) [private]

Networks with same network number but different prefix lengths can generate the same link state ID.

When generating a new LSA if a collision occurs use: RFC 2328 Appendix E. An algorithm for assigning Link State IDs to resolve the clash.


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