class RibManager

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

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

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, const string& fea_target)

RibManager

RibManager constructor

Parameters:

eventloopthe event loop to user.
xrl_std_routerthe XRL router to use.
fea_targetthe FEA XRL target name.
 ~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: the process status code.

See also: ProcessStatus.

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.

Returns: XORP_OK on success, otherwise XORP_ERROR.

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.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  set_vif_flags (const string& vifname, bool is_p2p, bool is_loopback, bool is_multicast, bool is_broadcast, bool is_up, uint32_t mtu, string& err)

set_vif_flags

Set the vif flags of a configured vif.

Parameters:

vifnamethe name of the vif.
is_pim_registertrue if the vif is a PIM Register interface.
is_p2ptrue if the vif is point-to-point interface.
is_loopbacktrue if the vif is a loopback interface.
is_multicasttrue if the vif is multicast capable.
is_broadcasttrue if the vif is broadcast capable.
is_uptrue if the underlying vif is UP.
mtuthe MTU of the vif.
errreference to string in which to store the human-readable error message in case anything goes wrong. Used for debugging purposes.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  add_vif_address (const string& vifname, const IPv4& addr, const IPv4Net& subnet, const IPv4& broadcast_addr, const IPv4& peer_addr, string& err)

add_vif_address

add_vif_address 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.
subnetthe subnet (masked address) that the new address resides on.
broadcastthe broadcast address to add.
peerthe peer address to add.
errreference to string in which to store the human-readable error message in case anything goes wrong. Used for debugging purposes.

Returns: XORP_OK on success, otherwise XORP_ERROR.

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

delete_vif_address

delete_vif_address 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.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  add_vif_address (const string& vifname, const IPv6& addr, const IPv6Net& subnet, const IPv6& peer, string& err)

add_vif_address

add_vif_address 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.
subnetthe subnet (masked address) that the new address resides on.
peerthe peer address to add.
errreference to string in which to store the human-readable error message in case anything goes wrong. Used for debugging purposes.

Returns: XORP_OK on success, otherwise XORP_ERROR.

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

delete_vif_address

delete_vif_address 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.

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.

void  register_interest_in_target (const string& target_class)

register_interest_in_target

Register Interest in an XRL target so we can monitor process births and deaths and clean up appropriately when things die.

Parameters:

target_classthe XRL Target Class we're interested in.
void  register_interest_in_target_done (const XrlError& e)

register_interest_in_target_done

Called in response to registering interest in an XRL target

Parameters:

eXRL Response code.
void  deregister_interest_in_target (const string& target_class)

deregister_interest_in_target

Deregister Interest in an XRL target so we can stop monitor process births and deaths.

Parameters:

target_classthe XRL Target Class we're deregistering interested in.
void  deregister_interest_in_target_done (const XrlError& e)

deregister_interest_in_target_done

Called in response to deregistering interest in an XRL target

Parameters:

eXRL Response code.
void  target_death (const string& target_class, const string& target_instance)

target_death

Target Death is called when an XRL target that we've registered an interest in dies.

Parameters:

target_classthe XRL Class of the target that died.
target_instancethe XRL Class Instance of the target that died.
int  add_redist_xrl_output4 (const string& target_name, const string& from_protocol, bool unicast, bool multicast, const IPv4Net& network_prefix, const string& cookie, bool is_xrl_transaction_output)

add_redist_xrl_output4

Add Route Redistributor that generates updates with redist4 XRL interface.

Parameters:

target_nameXRL target to receive redistributed routes.
from_protocolprotocol routes are redistributed from.
unicastapply to unicast rib.
multicastapply to multicast rib.
network_prefixredistribite only the routes that fall into this prefix address.
cookiecookie passed in route redistribution XRLs.
is_xrl_transaction_outputif true the add/delete route XRLs are grouped into transactions.

Returns: XORP_OK on success, XORP_ERROR on failure.

int  add_redist_xrl_output6 (const string& target_name, const string& from_protocol, bool unicast, bool multicast, const IPv6Net& network_prefix, const string& cookie, bool is_xrl_transaction_output)

add_redist_xrl_output6

Add Route Redistributor that generates updates with redist6 XRL interface.

Parameters:

target_nameXRL target to receive redistributed routes.
from_protocolprotocol routes are redistributed from.
unicastapply to unicast rib.
multicastapply to multicast rib.
network_prefixredistribite only the routes that fall into this prefix address.
cookiecookie passed in route redistribution XRLs.
is_xrl_transaction_outputif true the add/delete route XRLs are grouped into transactions.

Returns: XORP_OK on success, XORP_ERROR on failure.

int  delete_redist_xrl_output4 (const string& target_name, const string& from_protocol, bool unicast, bool multicast, const string& cookie, bool is_xrl_transaction_output)

delete_redist_xrl_output4

Remove Route Redistributor that generates updates with redist4 XRL interface.

Parameters:

target_nameXRL target to receive redistributed routes.
from_protocolprotocol routes are redistributed from.
unicastapply to unicast rib.
multicastapply to multicast rib.
cookiecookie passed in route redistribution XRLs.
is_xrl_transaction_outputif true the add/delete route XRLs are grouped into transactions.

Returns: XORP_OK on success, XORP_ERROR on failure.

int  delete_redist_xrl_output6 (const string& target_name, const string& from_protocol, bool unicast, bool multicast, const string& cookie, bool is_xrl_transaction_output)

delete_redist_xrl_output6

Remove Route Redistributor that generates updates with redist6 XRL interface.

Parameters:

target_nameXRL target to receive redistributed routes.
from_protocolprotocol routes are redistributed from.
unicastapply to unicast rib.
multicastapply to multicast rib.
cookiecookie passed in route redistribution XRLs.
is_xrl_transaction_outputif true the add/delete route XRLs are grouped into transactions.

Returns: XORP_OK on success, XORP_ERROR on failure.

XrlStdRouter&  xrl_router ()

xrl_router

void  push_routes ()

push_routes

Push the connected routes through the policy filter for re-filtering.

void  configure_filter (const uint32_t& filter, const string& conf)

configure_filter

Configure a policy filter.

Will throw an exception on error.

In this case the source match filter of connected routes will be configured.

Parameters:

filterIdentifier of filter to configure.
confConfiguration of the filter.
void  reset_filter (const uint32_t& filter)

reset_filter

Reset a policy filter.

Parameters:

filterIdentifier of filter to reset.
PolicyFilters&  policy_filters ()

policy_filters

Returns: the global instance of policy filters.

PolicyRedistMap&  policy_redist_map ()

policy_redist_map

Returns: the global instance of the policy redistribution map.

void  insert_policy_redist_tags (const string& protocol, const PolicyTags& tags)

insert_policy_redist_tags

Insert [old ones are kept] policy-tags for a protocol.

All routes which contain at least one of these tags, will be redistributed to the protocol.

Parameters:

protocolDestination protocol for redistribution.
tagsPolicy-tags of routes which need to be redistributed.
void  reset_policy_redist_tags ()

reset_policy_redist_tags

Reset the policy redistribution map.

This map allows policy redistribution to occur by directing routes with specific policy-tags to specific protocols.

Profile&  profile ()

profile

Returns: a reference to the profiler.

RIB<IPv4>&  urib4 ()

urib4

Returns: a reference to the IPv4 unicast RIB.

RIB<IPv4>&  mrib4 ()

mrib4

Returns: a reference to the IPv4 multicast RIB.

RIB<IPv6>&  urib6 ()

urib6

Returns: a reference to the IPv6 unicast RIB.

RIB<IPv6>&  mrib6 ()

mrib6

Returns: a reference to the IPv6 multicast RIB.

XrlRibTarget&  xrl_rib_target ()

xrl_rib_target

Returns: a reference to the XRL RIB target.


Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:11:09 2009, using kdoc 2.0a54+XORP.