class RibManager

Main top-level class containing RIBs and main eventloop. More...

Definition#include <rib_manager.hh>
InheritsProtoState (libproto) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

The single RibManager class instance is the top-level class in the RIB process from which everything else is built and run. It contains the four RIBs for IPv4 unicast routes, IPv4 multicast routes, IPv6 unicast routes and IPv6 multicast routes. It also contains the RIB's main eventloop.

 RibManager (EventLoop& eventloop, XrlStdRouter& xrl_std_router)

RibManager

RibManager constructor

Parameters:
eventloopthe event loop to user.
xrl_std_routerthe XRL router to use.

 ~RibManager ()

~RibManager

RibManager destructor

int  start ()

start

Start operation.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoState.

int  stop ()

stop

Stop operation.

Gracefully stop the RIB.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoState.

bool  status_updater ()

status_updater

Periodic Status Update

Returns: true to reschedule next status check.

ProcessStatus  status (string& reason)

status

[const]

Check status of RIB process.

Returns: process status code

int  new_vif (const string& vifname, const Vif& vif, string& err)

new_vif

new_vif is called to inform all the RIBs that a new virtual interface has been created.

Parameters:
vifnamethe name of the new VIF.
vifthe Vif class instance holding information about the new VIF.
errreference to string in which to store the human-readable error message in case anything goes wrong. Used for debugging purposes.

int  delete_vif (const string& vifname, string& err)

delete_vif

delete_vif is called to inform all the RIBs that a virtual interface that they previously knew about has been deleted.

Parameters:
vifnamethe name of the VIF that was deleted.
errreference to string in which to store the human-readable error message in case anything goes wrong. Used for debugging purposes.

int  add_vif_addr (const string& vifname, const IPv4& addr, const IPNet<IPv4>& net, string& err)

add_vif_addr

add_vif_addr is called to inform all the RIBs that a new IPv4 address has been added to a virtual interface.

Parameters:
vifnamethe name of the VIF that the address was added to.
addrthe new address.
netthe subnet (masked address) that the new address resides on.
errreference to string in which to store the human-readable error message in case anything goes wrong. Used for debugging purposes.

int  delete_vif_addr (const string& vifname, const IPv4& addr, string& err)

delete_vif_addr

delete_vif_addr is called to inform all the RIBs that an IPv4 address that they previously know about has been deleted from a specific VIF.

Parameters:
vifnamethe name of the VIF that the address was deleted from.
addrthe address that was deleted.
errreference to string in which to store the human-readable error message in case anything goes wrong. Used for debugging purposes.

int  add_vif_addr (const string& vifname, const IPv6& addr, const IPNet<IPv6>& net, string& err)

add_vif_addr

add_vif_addr is called to inform all the RIBs that a new IPv6 address has been added to a virtual interface.

Parameters:
vifnamethe name of the VIF that the address was added to.
addrthe new address.
netthe subnet (masked address) that the new address resides on.
errreference to string in which to store the human-readable error message in case anything goes wrong. Used for debugging purposes.

int  delete_vif_addr (const string& vifname, const IPv6& addr, string& err)

delete_vif_addr

delete_vif_addr is called to inform all the RIBs that an IPv6 address that they previously know about has been deleted from a specific VIF.

Parameters:
vifnamethe name of the VIF that the address was deleted from.
addrthe address that was deleted.
errreference to string in which to store the human-readable error message in case anything goes wrong. Used for debugging purposes.

RibClientfind_rib_client (const string& target_name, int family, bool unicast, bool multicast)

find_rib_client

Find a RIB client.

Find a RIB client for a given target name, address family, and unicast/multicast flags.

Parameters:
target_namethe target name of the RIB client.
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
unicasttrue if a client for the unicast RIB.
multicasttrue if a client for the multicast RIB.

Returns: a pointer to a valid RibClient if found, otherwise NULL.

int  add_rib_client (const string& target_name, int family, bool unicast, bool multicast)

add_rib_client

Add a RIB client.

Add a RIB client for a given target name, address family, and unicast/multicast flags.

Parameters:
target_namethe target name of the RIB client.
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
unicasttrue if a client for the unicast RIB.
multicasttrue if a client for the multicast RIB.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_rib_client (const string& target_name, int family, bool unicast, bool multicast)

delete_rib_client

Delete a RIB client.

Delete a RIB client for a given target name, address family, and unicast/multicast flags.

Parameters:
target_namethe target name of the RIB client.
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
unicasttrue if a client for the unicast RIB.
multicasttrue if a client for the multicast RIB.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  enable_rib_client (const string& target_name, int family, bool unicast, bool multicast)

enable_rib_client

Enable a RIB client.

Enable a RIB client for a given target name, address family, and unicast/multicast flags.

Parameters:
target_namethe target name of the RIB client.
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
unicasttrue if a client for the unicast RIB.
multicasttrue if a client for the multicast RIB.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  disable_rib_client (const string& target_name, int family, bool unicast, bool multicast)

disable_rib_client

Disable a RIB client.

Disable a RIB client for a given target name, address family, and unicast/multicast flags.

Parameters:
target_namethe target name of the RIB client.
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
unicasttrue if a client for the unicast RIB.
multicasttrue if a client for the multicast RIB.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  no_fea ()

no_fea

Don't try to communicate with the FEA.

Note that this method will be obsoleted in the future, and will be replaced with cleaner interface.

Returns: XORP_OK on success, otherwise XORP_ERROR.

void  make_errors_fatal ()

make_errors_fatal

Make some errors we'd normally mask fatal. Should be used for testing only.


Generated by: pavlin on possum.icir.org on Mon Jun 9 13:24:01 2003, using kdoc 2.0a54+XORP.