xorp

PeerManager< A > Class Template Reference

Peer Manager: 1) Monitor the state of the interfaces. More...

#include <peer_manager.hh>

List of all members.

Classes

struct  Summary
 Saved summaries that can be introduced into a new area. More...

Public Member Functions

 PeerManager (Ospf< A > &ospf)
bool check_area_type (OspfTypes::AreaID area, OspfTypes::AreaType area_type)
 Check area type.
bool create_area_router (OspfTypes::AreaID area, OspfTypes::AreaType area_type, bool permissive=true)
 Create an area router.
AreaRouter< A > * get_area_router (OspfTypes::AreaID area)
bool change_area_router_type (OspfTypes::AreaID area, OspfTypes::AreaType area_type)
 Change the type of this area.
bool destroy_area_router (OspfTypes::AreaID area)
 Destroy an area router.
bool area_range_add (OspfTypes::AreaID area, IPNet< A > net, bool advertise)
 Add area range.
bool area_range_delete (OspfTypes::AreaID area, IPNet< A > net)
 Delete area range.
bool area_range_change_state (OspfTypes::AreaID area, IPNet< A > net, bool advertise)
 Change the advertised state of this area.
bool get_lsa (const OspfTypes::AreaID area, const uint32_t index, bool &valid, bool &toohigh, bool &self, vector< uint8_t > &lsa)
 Get a single lsa from an area.
bool get_area_list (list< OspfTypes::AreaID > &areas) const
 Get a list of all the configured areas.
bool get_neighbour_list (list< OspfTypes::NeighbourID > &neighbours) const
 Get a list of all the neighbours.
bool get_neighbour_info (OspfTypes::NeighbourID nid, NeighbourInfo &ninfo) const
 Get state information about this neighbour.
OspfTypes::PeerID get_peerid (const string &interface, const string &vif) throw (BadPeer)
 Convert an interface/vif to a PeerID.
bool get_interface_vif_by_peerid (OspfTypes::PeerID peerid, string &interface, string &vif) const
 Given a PeerID convert it back to an interface and vif.
bool enabled (const string &interface, const string &vif, A address)
 Is this interface/vif/address enabled? This is a question asked of the FEA, has the interface/vif been marked as up.
OspfTypes::PeerID create_peer (const string &interface, const string &vif, A source, OspfTypes::LinkType linktype, OspfTypes::AreaID area) throw (BadPeer)
 Create a peer.
bool delete_peer (const OspfTypes::PeerID)
 Delete a peer.
bool set_state_peer (const OspfTypes::PeerID, bool state)
 Take a peer up or down.
bool set_link_status_peer (const OspfTypes::PeerID, bool state)
 Set the link status of the peer.
bool add_address_peer (const string &interface, const string &vif, OspfTypes::AreaID area, A addr)
 Add an address to this peer OSPFv3 only.
bool remove_address_peer (const OspfTypes::PeerID, OspfTypes::AreaID area, A addr)
 Remove an address from this peer OSPFv3 only.
bool set_address_state_peer (const OspfTypes::PeerID, OspfTypes::AreaID area, A addr, bool enable)
 Set the state of the address on this peer OSPFv3 only.
bool activate_peer (const string &interface, const string &vif, OspfTypes::AreaID area)
 Activate this peer OSPFv3 only.
bool update_peer (const string &interface, const string &vif, OspfTypes::AreaID area)
 Update this peer OSPFv3 only.
bool recompute_addresses_peer (const OspfTypes::PeerID, OspfTypes::AreaID area)
 Update this peer OSPFv3 only.
void vif_status_change (const string &interface, const string &vif, bool state)
 Track the state of a vif.
void address_status_change (const string &interface, const string &vif, A source, bool state)
 Track the state of an address.
bool add_neighbour (const OspfTypes::PeerID, OspfTypes::AreaID area, A neighbour_address, OspfTypes::RouterID)
 Add a neighbour to the peer.
bool remove_neighbour (const OspfTypes::PeerID, OspfTypes::AreaID area, A neighbour_address, OspfTypes::RouterID rid)
 Remove a neighbour from the peer.
bool transmit (const string &interface, const string &vif, A dst, A src, uint8_t *data, uint32_t len)
 Transmit packets.
bool receive (const string &interface, const string &vif, A dst, A src, Packet *packet) throw (BadPeer)
 Demultiplex incoming packets to the associated peer.
bool clear_database ()
 Drop all adjacencies and hence clear database.
bool queue_lsa (const OspfTypes::PeerID peerid, const OspfTypes::PeerID peer, OspfTypes::NeighbourID nid, Lsa::LsaRef lsar, bool &multicast_on_peer)
 Queue an LSA for transmission.
bool push_lsas (const OspfTypes::PeerID peerid, const char *msg)
 Send (push) any queued LSAs.
uint32_t get_interface_id (const OspfTypes::PeerID peerid)
 Get the interface ID of this peer OSPFv3 only.
bool get_attached_routers (const OspfTypes::PeerID peerid, OspfTypes::AreaID area, list< RouterInfo > &routers)
 Return a list of the fully adjacent routers.
bool configured_network (const A address) const
bool known_interface_address (const A address) const
bool neighbours_exchange_or_loading (const OspfTypes::PeerID peerid, OspfTypes::AreaID area)
 Are any of the neighbours of this peer in the state exchange or loading.
bool neighbour_at_least_two_way (const OspfTypes::PeerID peerid, OspfTypes::AreaID area, OspfTypes::RouterID rid, bool &twoway)
 Is the state of the neighbour with the specified Router ID at least 2-Way.
bool get_neighbour_address (const OspfTypes::PeerID peerid, OspfTypes::AreaID area, OspfTypes::RouterID rid, uint32_t interface_id, A &neighbour_address)
 Neighbour's source address.
bool on_link_state_request_list (const OspfTypes::PeerID peerid, OspfTypes::AreaID area, const OspfTypes::NeighbourID nid, Lsa::LsaRef lsar)
 Is this LSA on this neighbours link state request list.
bool event_bad_link_state_request (const OspfTypes::PeerID peerid, OspfTypes::AreaID area, const OspfTypes::NeighbourID nid)
 Generate a BadLSReq event.
bool send_lsa (const OspfTypes::PeerID peerid, OspfTypes::AreaID area, const OspfTypes::NeighbourID nid, Lsa::LsaRef lsar)
 Send this LSA directly to the neighbour.
void adjacency_changed (const OspfTypes::PeerID peerid, OspfTypes::RouterID rid, bool up)
 Upcall from a peer to notify the peer manager that a full adjacency has been achieved or lost.
void area_border_router_transition (bool up) const
 Track border router transitions.
void refresh_router_lsas () const
 Send a new Router-LSA in all areas.
bool create_virtual_peer (OspfTypes::RouterID rid)
 Create a virtual link peer.
bool delete_virtual_peer (OspfTypes::RouterID rid)
 Delete a virtual link peer.
bool virtual_link_endpoint (OspfTypes::AreaID area) const
 Are any of neighbours of this area a virtual link endpoint.
bool create_virtual_link (OspfTypes::RouterID rid)
 Create a virtual link (Configuration).
bool transit_area_virtual_link (OspfTypes::RouterID rid, OspfTypes::AreaID transit_area)
 Attach this transit area to the neighbours router ID (Configuration).
bool delete_virtual_link (OspfTypes::RouterID rid)
 Delete a virtual link (Configuration).
void up_virtual_link (OspfTypes::RouterID rid, A source, uint16_t interface_cost, A destination)
 Bring virtual link up (Upcall from area router).
void down_virtual_link (OspfTypes::RouterID rid)
 Take this virtual link down (Upcall from area router).
bool receive_virtual_link (A dst, A src, Packet *packet)
 A packet was sent to a peer that rejected it so this may be a virtual link candidate.
uint32_t area_count (OspfTypes::AreaType area_type) const
 Return the number of areas of the specified type.
bool internal_router_p () const
 Is this an internal router?
bool area_border_router_p () const
 Is this an area border router?
bool backbone_router_p () const
 Is this a backbone router?
bool as_boundary_router_p () const
 Is this an AS boundary router?
uint32_t compute_options (OspfTypes::AreaType area_type)
 Compute the options that are sent in hello packets, data description packets, LSA headers (OSPFv2), Router-LSAs (OSPFv3) and Network-LSAs (OSPFv3).
void router_id_changing ()
 The router ID is about to change.
bool set_interface_address (const OspfTypes::PeerID, A address)
 Set the interface address of this peer.
bool set_hello_interval (const OspfTypes::PeerID, OspfTypes::AreaID area, uint16_t hello_interval)
 Set the hello interval in seconds.
bool set_router_priority (const OspfTypes::PeerID, OspfTypes::AreaID area, uint8_t priority)
 Set router priority.
bool set_router_dead_interval (const OspfTypes::PeerID, OspfTypes::AreaID area, uint32_t router_dead_interval)
 Set the router dead interval in seconds.
bool set_interface_cost (const OspfTypes::PeerID, OspfTypes::AreaID area, uint16_t interface_cost)
 Set interface cost.
bool set_retransmit_interval (const OspfTypes::PeerID, OspfTypes::AreaID area, uint16_t retransmit_interval)
 Set RxmtInterval.
bool set_inftransdelay (const OspfTypes::PeerID, OspfTypes::AreaID area, uint16_t inftransdelay)
 Set InfTransDelay.
bool set_simple_authentication_key (const OspfTypes::PeerID peerid, OspfTypes::AreaID area, const string &password, string &error_msg)
 Set a simple password authentication key.
bool delete_simple_authentication_key (const OspfTypes::PeerID peerid, OspfTypes::AreaID area, string &error_msg)
 Delete a simple password authentication key.
bool set_md5_authentication_key (const OspfTypes::PeerID peerid, OspfTypes::AreaID area, uint8_t key_id, const string &password, const TimeVal &start_timeval, const TimeVal &end_timeval, const TimeVal &max_time_drift, string &error_msg)
 Set an MD5 authentication key.
bool delete_md5_authentication_key (const OspfTypes::PeerID peerid, OspfTypes::AreaID area, uint8_t key_id, string &error_msg)
 Delete an MD5 authentication key.
bool set_passive (const OspfTypes::PeerID, OspfTypes::AreaID area, bool passive, bool host)
 Toggle the passive status of an interface.
bool originate_default_route (OspfTypes::AreaID area, bool enable)
 If this is a "stub" or "nssa" area toggle the sending of a default route.
bool stub_default_cost (OspfTypes::AreaID area, uint32_t cost)
 Set the StubDefaultCost, the default cost sent in a default route in a "stub" or "nssa" area.
bool summaries (OspfTypes::AreaID area, bool enable)
 Toggle the sending of summaries into "stub" or "nssa" areas.
size_t number_of_areas () const
 Number of areas this router serves.
void summary_announce (OspfTypes::AreaID area, IPNet< A > net, RouteEntry< A > &rt)
 A new route has been added to the routing table announce it to all areas as it is a candidate for Summary-LSA generation.
void summary_withdraw (OspfTypes::AreaID area, IPNet< A > net, RouteEntry< A > &rt)
 A route has been deleted from the routing table.
void summary_replace (OspfTypes::AreaID area, IPNet< A > net, RouteEntry< A > &rt, RouteEntry< A > &previous_rt, OspfTypes::AreaID previous_area)
 A route has been replaced in the routing table.
void summary_push (OspfTypes::AreaID area)
 Send all the summary information to specified area.
bool area_range_covered (OspfTypes::AreaID area, IPNet< A > net, bool &advertise)
 In the specified area is the net covered by an area range.
bool area_range_configured (OspfTypes::AreaID area)
 Does the specified area have any area ranges configured.
bool external_announce (OspfTypes::AreaID area, Lsa::LsaRef lsar)
 An AS-External-LSA has arrived from this area announce it to all others.
bool external_announce (const IPNet< A > &net, const A &nexthop, const uint32_t &metric, const PolicyTags &policytags)
 Create an AS-External-LSA and announce it to all appropriate areas.
bool external_withdraw (OspfTypes::AreaID area, Lsa::LsaRef lsar)
 An AS-External-LSA is being withdrawn from this area withdraw from all others.
bool external_withdraw (const IPNet< A > &net)
 Withdraw a previously created and announced AS-External-LSA from all areas.
bool external_announce_complete (OspfTypes::AreaID area)
 Called to complete a series of calls to external_announce(area).
void external_push (OspfTypes::AreaID area)
 When a new area is configured it can use this method to.
void external_push_routes ()
 Re-run the policy filters on all routes.
void external_suppress_lsas (OspfTypes::AreaID area)
 Examine self originated AS-external-LSAs that may need to be suppressed because another router's AS-external-LSA takes precedence.
void routing_recompute_all_areas ()
 Recompute routing calculation all areas BACKBONE first.
void routing_recompute_all_transit_areas ()
 Recompute routing calculation for all transit areas.

Private Member Functions

OspfTypes::PeerID create_peerid (const string &interface, const string &vif) throw (BadPeer)
 Generate PeerID.
void destroy_peerid (const string &interface, const string &vif) throw (BadPeer)
 Get rid of this mapping.
bool summary_candidate (OspfTypes::AreaID area, IPNet< A > net, RouteEntry< A > &rt)
void track_area_count (OspfTypes::AreaType area_type, bool up)
 Track the number of areas of each type.

Private Attributes

Ospf< A > & _ospf
OspfTypes::PeerID _next_peerid
map< string, OspfTypes::PeerID_pmap
map< OspfTypes::PeerID,
PeerOut< A > * > 
_peers
map< OspfTypes::AreaID,
AreaRouter< A > * > 
_areas
External< A > _external
Vlink< A > _vlink
uint32_t _normal_cnt
uint32_t _stub_cnt
uint32_t _nssa_cnt
map< IPNet< A >, Summary_summaries

Detailed Description

template<typename A>
class PeerManager< A >

Peer Manager: 1) Monitor the state of the interfaces.

An interface going up/down will be monitored and trigger either adjacency attempts or new (withdraw) LSAs. 2) Manage interface configuration state. Control peers and area state. 3) Accept incoming hello's and demultiplex to the correct peer. 4) Manage the set of peers (peers are bound to interface and area). The peers themselves are hidden and are only exposed by reference (PeerID).


Member Function Documentation

template<typename A >
bool PeerManager< A >::activate_peer ( const string &  interface,
const string &  vif,
OspfTypes::AreaID  area 
)

Activate this peer OSPFv3 only.

Called once after the peer is created and every time a new address is added, but not when an address is deleted.

template<typename A>
void PeerManager< A >::address_status_change ( const string &  interface,
const string &  vif,
source,
bool  state 
)

Track the state of an address.

Callback when the status of the address changes.

template<typename A >
void PeerManager< A >::adjacency_changed ( const OspfTypes::PeerID  peerid,
OspfTypes::RouterID  rid,
bool  up 
)

Upcall from a peer to notify the peer manager that a full adjacency has been achieved or lost.

Parameters:
peerid
ridneighbours router ID.
uptrue if the adjacency has become full, false if a full adjacency has been lost.
template<typename A >
void PeerManager< A >::area_border_router_transition ( bool  up) const

Track border router transitions.

Parameters:
uptrue of the router just became an area border router, false if the router was an area border router and is no longer.
template<typename A >
bool PeerManager< A >::area_range_configured ( OspfTypes::AreaID  area)

Does the specified area have any area ranges configured.

The primary purpose is to discover if the backbone area has any area ranges configured, this is required when an area becomes a transit area.

template<typename A>
bool PeerManager< A >::area_range_covered ( OspfTypes::AreaID  area,
IPNet< A >  net,
bool &  advertise 
)

In the specified area is the net covered by an area range.

Parameters:
areabeing checked.
netthat may be covered.
advertiseif the area is covered set to advertise or do not advertise.
Returns:
true if the area is covered.
template<typename A >
bool PeerManager< A >::check_area_type ( OspfTypes::AreaID  area,
OspfTypes::AreaType  area_type 
)

Check area type.

Verify that this area can be set to this area type.

template<typename A >
bool PeerManager< A >::create_area_router ( OspfTypes::AreaID  area,
OspfTypes::AreaType  area_type,
bool  permissive = true 
)

Create an area router.

Parameters:
area
area_type
permissiveif true won't fail if the area already exists.
template<typename A>
OspfTypes::PeerID PeerManager< A >::create_peer ( const string &  interface,
const string &  vif,
source,
OspfTypes::LinkType  linktype,
OspfTypes::AreaID  area 
) throw (BadPeer)

Create a peer.

Parameters:
interface
vif
sourceaddress of transmitted packets.
linktypebroadcast or point-2-point, etc...
areaID of area
Returns:
PeerID on success otherwise throw an exception.
template<typename A >
OspfTypes::PeerID PeerManager< A >::create_peerid ( const string &  interface,
const string &  vif 
) throw (BadPeer) [private]

Generate PeerID.

Internally we want to deal with peers as simple IDs not interface/vif. Throw an exception a mapping already exists.

template<typename A >
bool PeerManager< A >::create_virtual_link ( OspfTypes::RouterID  rid)

Create a virtual link (Configuration).

Parameters:
ridneighbours router ID.
template<typename A >
bool PeerManager< A >::delete_md5_authentication_key ( const OspfTypes::PeerID  peerid,
OspfTypes::AreaID  area,
uint8_t  key_id,
string &  error_msg 
)

Delete an MD5 authentication key.

Note that after the deletion if there are no more valid MD5 keys, the MD5 authentication handler is replaced with a Null authentication handler.

Parameters:
peeridthe peer ID.
areathe area ID.
key_idthe ID of the key to delete.
theerror message (if error).
Returns:
true on success, otherwise false.
template<typename A >
bool PeerManager< A >::delete_simple_authentication_key ( const OspfTypes::PeerID  peerid,
OspfTypes::AreaID  area,
string &  error_msg 
)

Delete a simple password authentication key.

Note that after the deletion the simple password authentication handler is replaced with a Null authentication handler.

Parameters:
peeridthe peer ID.
areathe area ID.
theerror message (if error).
Returns:
true on success, otherwise false.
template<typename A >
bool PeerManager< A >::delete_virtual_link ( OspfTypes::RouterID  rid)

Delete a virtual link (Configuration).

Parameters:
ridneighbours router ID.
template<typename A>
bool PeerManager< A >::enabled ( const string &  interface,
const string &  vif,
address 
)

Is this interface/vif/address enabled? This is a question asked of the FEA, has the interface/vif been marked as up.

Returns:
true if it is.
template<typename A >
bool PeerManager< A >::event_bad_link_state_request ( const OspfTypes::PeerID  peerid,
OspfTypes::AreaID  area,
const OspfTypes::NeighbourID  nid 
)

Generate a BadLSReq event.

Parameters:
peerid
area
nid
Returns:
true if it is.
template<typename A >
bool PeerManager< A >::external_announce ( OspfTypes::AreaID  area,
Lsa::LsaRef  lsar 
)

An AS-External-LSA has arrived from this area announce it to all others.

The LSAs should not be scheduled for transmission until the external_accounce_complete() is seen. In many cases a number of LSAs may arrive in a single packet, waiting for the external_announce_complete() offers an opportunity for aggregation.

template<typename A >
void PeerManager< A >::external_push ( OspfTypes::AreaID  area)

When a new area is configured it can use this method to.

Parameters:
areathat all AS-External-LSAs should be sent to.
template<typename A >
bool PeerManager< A >::get_lsa ( const OspfTypes::AreaID  area,
const uint32_t  index,
bool &  valid,
bool &  toohigh,
bool &  self,
vector< uint8_t > &  lsa 
)

Get a single lsa from an area.

A stateless mechanism to get LSAs. The client of this interface should start from zero and continue to request LSAs (incrementing index) until toohigh becomes true.

Parameters:
areadatabase that is being searched.
indexinto database starting from 0.
validtrue if a LSA has been returned. Some index values do not contain LSAs. This should not be considered an error.
toohightrue if no more LSA exist after this index.
selfif true this LSA was originated by this router.
lsaif valid is true the LSA at index.
template<typename A>
bool PeerManager< A >::get_neighbour_address ( const OspfTypes::PeerID  peerid,
OspfTypes::AreaID  area,
OspfTypes::RouterID  rid,
uint32_t  interface_id,
A &  neighbour_address 
)

Neighbour's source address.

Parameters:
peerid
area
ridRouter ID
interface_idInterface ID.
neighbour_addressset if neighbour is found.
Returns:
true if the neighbour is found.
template<typename A >
bool PeerManager< A >::get_neighbour_info ( OspfTypes::NeighbourID  nid,
NeighbourInfo ninfo 
) const

Get state information about this neighbour.

Parameters:
nidneighbour information is being request about.
ninfoif neighbour is found its information.
template<typename A >
OspfTypes::PeerID PeerManager< A >::get_peerid ( const string &  interface,
const string &  vif 
) throw (BadPeer)

Convert an interface/vif to a PeerID.

Throw an exception if no mapping is found.

template<typename A >
bool PeerManager< A >::neighbour_at_least_two_way ( const OspfTypes::PeerID  peerid,
OspfTypes::AreaID  area,
OspfTypes::RouterID  rid,
bool &  twoway 
)

Is the state of the neighbour with the specified Router ID at least 2-Way.

Parameters:
peerid
area
ridRouter ID
twowayif the neighbour is found true means the neighbour is at least twoway.
Returns:
true if the neighbour is found.
template<typename A >
bool PeerManager< A >::neighbours_exchange_or_loading ( const OspfTypes::PeerID  peerid,
OspfTypes::AreaID  area 
)

Are any of the neighbours of this peer in the state exchange or loading.

Parameters:
peerid
area
Returns:
true if any of the neighbours are in state exchange or loading.
template<typename A >
bool PeerManager< A >::on_link_state_request_list ( const OspfTypes::PeerID  peerid,
OspfTypes::AreaID  area,
const OspfTypes::NeighbourID  nid,
Lsa::LsaRef  lsar 
)

Is this LSA on this neighbours link state request list.

Parameters:
peerid
area
nid
Returns:
true if it is.
template<typename A >
bool PeerManager< A >::queue_lsa ( const OspfTypes::PeerID  peerid,
const OspfTypes::PeerID  peer,
OspfTypes::NeighbourID  nid,
Lsa::LsaRef  lsar,
bool &  multicast_on_peer 
)

Queue an LSA for transmission.

Parameters:
peeridto queue the LSA on.
peerthe LSA arrived on.
nidthe LSA arrived on.
lsarthe lsa
multicast_on_peerwill this LSA get multicast on this peer.
Returns:
true on success.
template<typename A>
bool PeerManager< A >::receive ( const string &  interface,
const string &  vif,
dst,
src,
Packet packet 
) throw (BadPeer)

Demultiplex incoming packets to the associated peer.

If the packet contains LSAs send it to the LSA database manager if appropriate.

Parameters:
interfacethat packet arrived on
vifthat packet arrived on
packet
Returns:
true if the packet is now owned by the peer manager.
template<typename A >
bool PeerManager< A >::recompute_addresses_peer ( const OspfTypes::PeerID  peerid,
OspfTypes::AreaID  area 
)

Update this peer OSPFv3 only.

Reset the addresses that should be advertised by this peer.

template<typename A >
void PeerManager< A >::refresh_router_lsas ( ) const

Send a new Router-LSA in all areas.

Typically called when one of the Router-LSA flags changes state.

template<typename A >
bool PeerManager< A >::send_lsa ( const OspfTypes::PeerID  peerid,
OspfTypes::AreaID  area,
const OspfTypes::NeighbourID  nid,
Lsa::LsaRef  lsar 
)

Send this LSA directly to the neighbour.

Do not place on retransmission list.

Parameters:
peerid
area
nid
lsar
Returns:
true on success
template<typename A >
bool PeerManager< A >::set_md5_authentication_key ( const OspfTypes::PeerID  peerid,
OspfTypes::AreaID  area,
uint8_t  key_id,
const string &  password,
const TimeVal start_timeval,
const TimeVal end_timeval,
const TimeVal max_time_drift,
string &  error_msg 
)

Set an MD5 authentication key.

Note that the current authentication handler is replaced with an MD5 authentication handler.

Parameters:
peeridthe peer ID.
areathe area ID.
key_idunique ID associated with key.
passwordphrase used for MD5 digest computation.
start_timevalstart time when key becomes valid.
end_timevalend time when key becomes invalid.
max_time_driftthe maximum time drift among all routers.
theerror message (if error).
Returns:
true on success, otherwise false.
template<typename A >
bool PeerManager< A >::set_simple_authentication_key ( const OspfTypes::PeerID  peerid,
OspfTypes::AreaID  area,
const string &  password,
string &  error_msg 
)

Set a simple password authentication key.

Note that the current authentication handler is replaced with a simple password authentication handler.

Parameters:
peeridthe peer ID.
areathe area ID.
passwordthe password to set.
theerror message (if error).
Returns:
true on success, otherwise false.
template<typename A>
void PeerManager< A >::summary_announce ( OspfTypes::AreaID  area,
IPNet< A >  net,
RouteEntry< A > &  rt 
)

A new route has been added to the routing table announce it to all areas as it is a candidate for Summary-LSA generation.

Parameters:
areathat the route was introduced by.
template<typename A>
bool PeerManager< A >::summary_candidate ( OspfTypes::AreaID  area,
IPNet< A >  net,
RouteEntry< A > &  rt 
) [private]
Returns:
true if this route is a candidate for summarisation.
template<typename A >
void PeerManager< A >::summary_push ( OspfTypes::AreaID  area)

Send all the summary information to specified area.

New areas or stub areas that change from do not advertise can use this hook to force all routes to be sent to the specified area.

Parameters:
areathat all routes should be sent to.
template<typename A>
void PeerManager< A >::summary_replace ( OspfTypes::AreaID  area,
IPNet< A >  net,
RouteEntry< A > &  rt,
RouteEntry< A > &  previous_rt,
OspfTypes::AreaID  previous_area 
)

A route has been replaced in the routing table.

If a generated Summary-LSA exists it will need to have its metric or nexthop modified.

Parameters:
areathat the route was introduced by.
template<typename A>
void PeerManager< A >::summary_withdraw ( OspfTypes::AreaID  area,
IPNet< A >  net,
RouteEntry< A > &  rt 
)

A route has been deleted from the routing table.

It may previously have caused a Summary-LSA which now needs to be withdrawn.

Parameters:
areathat the route was introduced by.
template<typename A >
void PeerManager< A >::track_area_count ( OspfTypes::AreaType  area_type,
bool  up 
) [private]

Track the number of areas of each type.

Parameters:
area_typebeing tracked.
uptrue if the area is being created, false if it is being deleted.
template<typename A>
void PeerManager< A >::up_virtual_link ( OspfTypes::RouterID  rid,
source,
uint16_t  interface_cost,
destination 
)

Bring virtual link up (Upcall from area router).

Parameters:
ridneighbours router ID.
sourceaddress of packets sent to this neighbour.
interface_cost
destinationaddress of the neighbour router.
template<typename A >
bool PeerManager< A >::update_peer ( const string &  interface,
const string &  vif,
OspfTypes::AreaID  area 
)

Update this peer OSPFv3 only.

Called every time a variable related to this peer is changed.

template<typename A >
void PeerManager< A >::vif_status_change ( const string &  interface,
const string &  vif,
bool  state 
)

Track the state of a vif.

Callback when the status of the vif changes.

template<typename A >
bool PeerManager< A >::virtual_link_endpoint ( OspfTypes::AreaID  area) const

Are any of neighbours of this area a virtual link endpoint.

Returns:
true if any are.

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