xorp

ShowRoutesProcessor Class Reference

Inheritance diagram for ShowRoutesProcessor:
XrlShowRoutesTargetBase ServiceBase BugCatcher

List of all members.

Public Member Functions

 ShowRoutesProcessor (EventLoop &e, ShowRoutesOptions &opts)
int startup ()
 Start service.
int shutdown ()
 Shutdown service.
XrlCmdError common_0_1_get_target_name (string &name)
 Pure-virtual function that needs to be implemented to:
XrlCmdError common_0_1_get_version (string &version)
 Pure-virtual function that needs to be implemented to:
XrlCmdError common_0_1_get_status (uint32_t &status, string &reason)
 Pure-virtual function that needs to be implemented to:
XrlCmdError common_0_1_shutdown ()
 Pure-virtual function that needs to be implemented to:
XrlCmdError common_0_1_startup ()
 Pure-virtual function that needs to be implemented to:
XrlCmdError finder_event_observer_0_1_xrl_target_birth (const string &cls, const string &ins)
 Pure-virtual function that needs to be implemented to:
XrlCmdError finder_event_observer_0_1_xrl_target_death (const string &cls, const string &ins)
 Pure-virtual function that needs to be implemented to:
XrlCmdError redist4_0_1_starting_route_dump (const string &cookie)
 Pure-virtual function that needs to be implemented to:
XrlCmdError redist4_0_1_finishing_route_dump (const string &cookie)
 Pure-virtual function that needs to be implemented to:
XrlCmdError redist4_0_1_add_route (const IPv4Net &dst, const IPv4 &nexthop, const string &ifname, const string &vifname, const uint32_t &metric, const uint32_t &admin_distance, const string &cookie, const string &protocol_origin)
 Pure-virtual function that needs to be implemented to:
XrlCmdError redist4_0_1_delete_route (const IPv4Net &dst, const IPv4 &nexthop, const string &ifname, const string &vifname, const uint32_t &metric, const uint32_t &admin_distance, const string &cookie, const string &protocol_origin)
XrlCmdError redist6_0_1_starting_route_dump (const string &cookie)
 Pure-virtual function that needs to be implemented to:
XrlCmdError redist6_0_1_finishing_route_dump (const string &cookie)
 Pure-virtual function that needs to be implemented to:
XrlCmdError redist6_0_1_add_route (const IPv6Net &dst, const IPv6 &nexthop, const string &ifname, const string &vifname, const uint32_t &metric, const uint32_t &admin_distance, const string &cookie, const string &protocol_origin)
 Pure-virtual function that needs to be implemented to:
XrlCmdError redist6_0_1_delete_route (const IPv6Net &dst, const IPv6 &nexthop, const string &ifname, const string &vifname, const uint32_t &metric, const uint32_t &admin_distance, const string &cookie, const string &protocol_origin)
bool poll_ready_failed ()
bool check_cookie (const string &cookie)
void step_100_watch_rib ()
 Register with Finder to watch RIB birth and death events.
void watch_rib_cb (const XrlError &xe)
void step_200_request_redist ()
 Request redistribution of user requested protocol.
void request_redist_cb (const XrlError &xe)
void step_1000_request_cease ()
 Request redistribution cease.
void request_cease_cb (const XrlError &xe)

Protected Attributes

EventLoop_e
const ShowRoutesOptions_opts
XrlRouter_rtr
XorpTimer _t
IPv4Net _network_prefix4
IPv6Net _network_prefix6
string _cookie

Member Function Documentation

bool ShowRoutesProcessor::check_cookie ( const string &  cookie)
Returns:
true if cookie matches instance cookie, false otherwise.
XrlCmdError ShowRoutesProcessor::common_0_1_get_status ( uint32_t &  status,
string &  reason 
) [virtual]

Pure-virtual function that needs to be implemented to:

Get status of Xrl Target

Implements XrlShowRoutesTargetBase.

XrlCmdError ShowRoutesProcessor::common_0_1_get_target_name ( string &  name) [virtual]

Pure-virtual function that needs to be implemented to:

Get name of Xrl Target

Implements XrlShowRoutesTargetBase.

XrlCmdError ShowRoutesProcessor::common_0_1_get_version ( string &  version) [virtual]

Pure-virtual function that needs to be implemented to:

Get version string from Xrl Target

Implements XrlShowRoutesTargetBase.

XrlCmdError ShowRoutesProcessor::common_0_1_shutdown ( ) [virtual]

Pure-virtual function that needs to be implemented to:

Request clean shutdown of Xrl Target

Implements XrlShowRoutesTargetBase.

XrlCmdError ShowRoutesProcessor::common_0_1_startup ( ) [inline, virtual]

Pure-virtual function that needs to be implemented to:

Request a startup of Xrl Target

Implements XrlShowRoutesTargetBase.

XrlCmdError ShowRoutesProcessor::finder_event_observer_0_1_xrl_target_birth ( const string &  target_class,
const string &  target_instance 
) [virtual]

Pure-virtual function that needs to be implemented to:

Announce target birth to observer.

Parameters:
target_classthe target class name.
target_instancethe target instance name.

Implements XrlShowRoutesTargetBase.

XrlCmdError ShowRoutesProcessor::finder_event_observer_0_1_xrl_target_death ( const string &  target_class,
const string &  target_instance 
) [virtual]

Pure-virtual function that needs to be implemented to:

Announce target death to observer.

Parameters:
target_classthe target class name.
target_instancethe target instance name.

Implements XrlShowRoutesTargetBase.

XrlCmdError ShowRoutesProcessor::redist4_0_1_add_route ( const IPv4Net dst,
const IPv4 nexthop,
const string &  ifname,
const string &  vifname,
const uint32_t &  metric,
const uint32_t &  admin_distance,
const string &  cookie,
const string &  protocol_origin 
) [virtual]

Pure-virtual function that needs to be implemented to:

Add/delete a routing entry.

Parameters:
dstdestination network.
nexthopnexthop router address.
ifnameinterface name associated with nexthop.
vifnamevirtual interface name with nexthop.
metricorigin routing protocol metric for route.
admin_distanceadministrative distance of origin routing protocol.
cookievalue set by the requestor to identify redistribution source. Typical value is the originating protocol name.
protocol_originthe name of the protocol that originated this routing entry.

Implements XrlShowRoutesTargetBase.

XrlCmdError ShowRoutesProcessor::redist4_0_1_finishing_route_dump ( const string &  cookie) [virtual]

Pure-virtual function that needs to be implemented to:

When route redistribution begins, the receiver is sent the existing list of routes. This message marks the end of the existing routes being sent.

Parameters:
cookievalue set by the requestor to identify redistribution source. Typical value is the originating protocol name.

Implements XrlShowRoutesTargetBase.

XrlCmdError ShowRoutesProcessor::redist4_0_1_starting_route_dump ( const string &  cookie) [virtual]

Pure-virtual function that needs to be implemented to:

When route redistribution begins, the receiver is sent the existing list of routes. This message marks the beginning of the routes being sent.

Parameters:
cookievalue set by the requestor to identify redistribution source. Typical value is the originating protocol name.

Implements XrlShowRoutesTargetBase.

XrlCmdError ShowRoutesProcessor::redist6_0_1_add_route ( const IPv6Net dst,
const IPv6 nexthop,
const string &  ifname,
const string &  vifname,
const uint32_t &  metric,
const uint32_t &  admin_distance,
const string &  cookie,
const string &  protocol_origin 
) [virtual]

Pure-virtual function that needs to be implemented to:

Add/delete a routing entry.

Parameters:
dstdestination network.
nexthopnexthop router address.
ifnameinterface name associated with nexthop.
vifnamevirtual interface name with nexthop.
metricorigin routing protocol metric for route.
admin_distanceadministrative distance of origin routing protocol.
cookievalue set by the requestor to identify redistribution source. Typical value is the originating protocol name.
protocol_originthe name of the protocol that originated this routing entry.

Implements XrlShowRoutesTargetBase.

XrlCmdError ShowRoutesProcessor::redist6_0_1_finishing_route_dump ( const string &  cookie) [virtual]

Pure-virtual function that needs to be implemented to:

When route redistribution begins, the receiver is sent the existing list of routes. This message marks the end of the existing routes being sent.

Parameters:
cookievalue set by the requestor to identify redistribution source. Typical value is the originating protocol name.

Implements XrlShowRoutesTargetBase.

XrlCmdError ShowRoutesProcessor::redist6_0_1_starting_route_dump ( const string &  cookie) [virtual]

Pure-virtual function that needs to be implemented to:

When route redistribution begins, the receiver is sent the existing list of routes. This message marks the beginning of the routes being sent.

Parameters:
cookievalue set by the requestor to identify redistribution source. Typical value is the originating protocol name.

Implements XrlShowRoutesTargetBase.

int ShowRoutesProcessor::shutdown ( ) [virtual]

Shutdown service.

Service should transition from SERVICE_RUNNING to SERVICE_SHUTTING_DOWN immediately and onto SERVICE_SHUTDOWN or SERVICE_FAILED in the near future.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements ServiceBase.

int ShowRoutesProcessor::startup ( ) [virtual]

Start service.

Service should transition from SERVICE_READY to SERVICE_STARTING immediately and onto SERVICE_RUNNING or SERVICE_FAILED in the near future.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements ServiceBase.

void ShowRoutesProcessor::step_100_watch_rib ( )

Register with Finder to watch RIB birth and death events.

If the RIB crashes we don't want to hang waiting for messages from the RIB that will never arrive (start route dump, add route, finish route dump)


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