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 |