xorp

XrlMfeaNode Class Reference

Inheritance diagram for XrlMfeaNode:
MfeaNode XrlStdRouter XrlMfeaTargetBase MfeaNodeCli ProtoNode< MfeaVif > IfConfigUpdateReporterBase ServiceChangeObserverBase XrlRouter ProtoNodeCli ProtoUnit XrlDispatcher XrlSender FinderClientObserver ProtoUnit ProtoState XrlCmdMap ProtoState ServiceBase NONCOPYABLE ServiceBase BugCatcher BugCatcher

List of all members.

Public Member Functions

 XrlMfeaNode (FeaNode &fea_node, int family, xorp_module_id module_id, EventLoop &eventloop, const string &class_name, const string &finder_hostname, uint16_t finder_port, const string &finder_target)
int startup ()
 Startup the node operation.
int shutdown ()
 Shutdown the node operation.
XrlRouterxrl_router ()
 Get a reference to the XrlRouter instance.
const XrlRouterxrl_router () const
 Get a const reference to the XrlRouter instance.
int enable_cli ()
int disable_cli ()
int start_cli ()
int stop_cli ()
int enable_mfea ()
int disable_mfea ()
int start_mfea ()
int stop_mfea ()

Protected Member Functions

XrlCmdError common_0_1_get_target_name (string &name)
 Get name of Xrl Target.
XrlCmdError common_0_1_get_version (string &version)
 Get version string from Xrl Target.
XrlCmdError common_0_1_get_status (uint32_t &status, string &reason)
 Get status from Xrl Target.
XrlCmdError common_0_1_shutdown ()
 Shutdown cleanly.
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 &target_class, const string &target_instance)
 Announce target birth to observer.
XrlCmdError finder_event_observer_0_1_xrl_target_death (const string &target_class, const string &target_instance)
 Announce target death to observer.
XrlCmdError cli_processor_0_1_process_command (const string &processor_name, const string &cli_term_name, const uint32_t &cli_session_id, const string &command_name, const string &command_args, string &ret_processor_name, string &ret_cli_term_name, uint32_t &ret_cli_session_id, string &ret_command_output)
 Process a CLI command.
XrlCmdError ifmgr_replicator_0_1_register_ifmgr_mirror (const string &clientname)
 Register remote mirror of interface state.
XrlCmdError ifmgr_replicator_0_1_unregister_ifmgr_mirror (const string &clientname)
 Register remote mirror of interface state.
XrlCmdError mfea_0_1_have_multicast_routing4 (bool &result)
 Test if the underlying system supports IPv4 multicast routing.
XrlCmdError mfea_0_1_register_protocol4 (const string &xrl_sender_name, const string &if_name, const string &vif_name, const uint32_t &ip_protocol)
 Register a protocol on an interface in the Multicast FEA.
XrlCmdError mfea_0_1_unregister_protocol4 (const string &xrl_sender_name, const string &if_name, const string &vif_name)
 Unregister a protocol on an interface in the Multicast FEA.
XrlCmdError mfea_0_1_add_mfc4 (const string &xrl_sender_name, const IPv4 &source_address, const IPv4 &group_address, const uint32_t &iif_vif_index, const vector< uint8_t > &oiflist, const vector< uint8_t > &oiflist_disable_wrongvif, const uint32_t &max_vifs_oiflist, const IPv4 &rp_address)
 Add/delete a Multicast Forwarding Cache with the kernel.
XrlCmdError mfea_0_1_delete_mfc4 (const string &xrl_sender_name, const IPv4 &source_address, const IPv4 &group_address)
XrlCmdError mfea_0_1_add_dataflow_monitor4 (const string &xrl_sender_name, const IPv4 &source_address, const IPv4 &group_address, const uint32_t &threshold_interval_sec, const uint32_t &threshold_interval_usec, const uint32_t &threshold_packets, const uint32_t &threshold_bytes, const bool &is_threshold_in_packets, const bool &is_threshold_in_bytes, const bool &is_geq_upcall, const bool &is_leq_upcall)
 Add/delete a dataflow monitor with the MFEA.
XrlCmdError mfea_0_1_delete_dataflow_monitor4 (const string &xrl_sender_name, const IPv4 &source_address, const IPv4 &group_address, const uint32_t &threshold_interval_sec, const uint32_t &threshold_interval_usec, const uint32_t &threshold_packets, const uint32_t &threshold_bytes, const bool &is_threshold_in_packets, const bool &is_threshold_in_bytes, const bool &is_geq_upcall, const bool &is_leq_upcall)
XrlCmdError mfea_0_1_delete_all_dataflow_monitor4 (const string &xrl_sender_name, const IPv4 &source_address, const IPv4 &group_address)
XrlCmdError mfea_0_1_enable_vif (const string &vif_name, const bool &enable)
 Enable/disable/start/stop a MFEA vif interface.
XrlCmdError mfea_0_1_start_vif (const string &vif_name)
XrlCmdError mfea_0_1_stop_vif (const string &vif_name)
XrlCmdError mfea_0_1_enable_all_vifs (const bool &enable)
 Enable/disable/start/stop all MFEA vif interfaces.
XrlCmdError mfea_0_1_start_all_vifs ()
XrlCmdError mfea_0_1_stop_all_vifs ()
XrlCmdError mfea_0_1_enable_mfea (const bool &enable)
 Enable/disable/start/stop the MFEA.
XrlCmdError mfea_0_1_start_mfea ()
XrlCmdError mfea_0_1_stop_mfea ()
XrlCmdError mfea_0_1_enable_cli (const bool &enable)
 Enable/disable/start/stop the MFEA CLI access.
XrlCmdError mfea_0_1_start_cli ()
XrlCmdError mfea_0_1_stop_cli ()
XrlCmdError mfea_0_1_log_trace_all (const bool &enable)
 Enable/disable the MFEA trace log for all operations.

Private Member Functions

virtual void finder_connect_event ()
 Called when Finder connection is established.
virtual void finder_disconnect_event ()
 Called when Finder disconnect occurs.
int signal_message_send (const string &dst_module_instance_name, int message_type, uint32_t vif_index, const IPvX &src, const IPvX &dst, const uint8_t *rcvbuf, size_t rcvlen)
 XrlMfeaNode::signal_message_send: name: The name of the protocol instance-destination of the message.
void mfea_client_client_send_recv_kernel_signal_message_cb (const XrlError &xrl_error)
int dataflow_signal_send (const string &dst_module_instance_name, const IPvX &source_addr, const IPvX &group_addr, uint32_t threshold_interval_sec, uint32_t threshold_interval_usec, uint32_t measured_interval_sec, uint32_t measured_interval_usec, uint32_t threshold_packets, uint32_t threshold_bytes, uint32_t measured_packets, uint32_t measured_bytes, bool is_threshold_in_packets, bool is_threshold_in_bytes, bool is_geq_upcall, bool is_leq_upcall)
 Send a signal that a dataflow-related pre-condition is true.
void mfea_client_client_send_recv_dataflow_signal_cb (const XrlError &xrl_error)
int add_cli_command_to_cli_manager (const char *command_name, const char *command_help, bool is_command_cd, const char *command_cd_prompt, bool is_command_processor)
 Add a CLI command to the CLI manager.
void cli_manager_client_send_add_cli_command_cb (const XrlError &xrl_error)
int delete_cli_command_from_cli_manager (const char *command_name)
 Delete a CLI command from the CLI manager.
void cli_manager_client_send_delete_cli_command_cb (const XrlError &xrl_error)
int family () const
 Get the address family.

Private Attributes

EventLoop_eventloop
const string _finder_target
XrlMfeaClientV0p1Client _xrl_mfea_client_client
XrlCliManagerV0p1Client _xrl_cli_manager_client
XrlFinderEventNotifierV0p1Client _xrl_finder_client
LibFeaClientBridge _lib_mfea_client_bridge
bool _is_finder_alive

Member Function Documentation

int XrlMfeaNode::add_cli_command_to_cli_manager ( const char *  command_name,
const char *  command_help,
bool  is_command_cd,
const char *  command_cd_prompt,
bool  is_command_processor 
) [private, virtual]

Add a CLI command to the CLI manager.

This is a pure virtual function, and it must be implemented by the particular protocol node class that inherits this base class.

Parameters:
command_namethe command name to add.
command_helpthe help message for the command.
is_command_cdif true, this is a directory level that allows user to "cd" to that directory.
command_cd_promptif this is a directory user can "cd" to it, the prompt to appear after the "cd".
is_command_processorif true, this is an oridinary command that can be invoked for processing rather than a directory level.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements ProtoNodeCli.

XrlCmdError XrlMfeaNode::cli_processor_0_1_process_command ( const string &  processor_name,
const string &  cli_term_name,
const uint32_t &  cli_session_id,
const string &  command_name,
const string &  command_args,
string &  ret_processor_name,
string &  ret_cli_term_name,
uint32_t &  ret_cli_session_id,
string &  ret_command_output 
) [protected, virtual]

Process a CLI command.

Parameters:
processor_namethe processor name for this command.
cli_term_namethe terminal name the command was entered from.
cli_session_idthe CLI session ID the command was entered from.
command_namethe command name to process.
command_argsthe command arguments to process.
ret_processor_namethe processor name to return back to the CLI.
ret_cli_term_namethe terminal name to return back.
ret_cli_session_idthe CLI session ID to return back.
ret_command_outputthe command output to return back.

Implements XrlMfeaTargetBase.

XrlCmdError XrlMfeaNode::common_0_1_startup ( ) [inline, protected, virtual]

Pure-virtual function that needs to be implemented to:

Request a startup of Xrl Target

Implements XrlMfeaTargetBase.

int XrlMfeaNode::dataflow_signal_send ( const string &  dst_module_instance_name,
const IPvX source_addr,
const IPvX group_addr,
uint32_t  threshold_interval_sec,
uint32_t  threshold_interval_usec,
uint32_t  measured_interval_sec,
uint32_t  measured_interval_usec,
uint32_t  threshold_packets,
uint32_t  threshold_bytes,
uint32_t  measured_packets,
uint32_t  measured_bytes,
bool  is_threshold_in_packets,
bool  is_threshold_in_bytes,
bool  is_geq_upcall,
bool  is_leq_upcall 
) [private, virtual]

Send a signal that a dataflow-related pre-condition is true.

This is a pure virtual function, and it must be implemented by the communication-wrapper class that inherits this base class.

Note: either is_threshold_in_packets or is_threshold_in_bytes (or both) must be true. Note: either is_geq_upcall or is_leq_upcall (but not both) must be true.

Parameters:
dst_module_instance_namethe module instance name of the module-recepient of the message.
source_addrthe source address of the dataflow.
group_addrthe group address of the dataflow.
threshold_interval_secthe number of seconds in the interval requested for measurement.
threshold_interval_usecthe number of microseconds in the interval requested for measurement.
measured_interval_secthe number of seconds in the last measured interval that has triggered the signal.
measured_interval_usecthe number of microseconds in the last measured interval that has triggered the signal.
threshold_packetsthe threshold value to trigger a signal (in number of packets).
threshold_bytesthe threshold value to trigger a signal (in bytes).
measured_packetsthe number of packets measured within the measured_interval.
measured_bytesthe number of bytes measured within the measured_interval.
is_threshold_in_packetsif true, threshold_packets is valid.
is_threshold_in_bytesif true, threshold_bytes is valid.
is_geq_upcallif true, the operation for comparison is ">=".
is_leq_upcallif true, the operation for comparison is "<=".
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements MfeaNode.

int XrlMfeaNode::delete_cli_command_from_cli_manager ( const char *  command_name) [private, virtual]

Delete a CLI command from the CLI manager.

This is a pure virtual function, and it must be implemented by the particular protocol node class that inherits this base class.

Parameters:
command_namethe command name to delete.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements ProtoNodeCli.

int XrlMfeaNode::family ( ) const [inline, private]

Get the address family.

Returns:
the address family (e.g., AF_INET or AF_INET6 for IPv4 and IPv6 respectively).

Reimplemented from ProtoUnit.

void XrlMfeaNode::finder_connect_event ( ) [private, virtual]

Called when Finder connection is established.

Note that this method overwrites an XrlRouter virtual method.

Reimplemented from XrlRouter.

void XrlMfeaNode::finder_disconnect_event ( ) [private, virtual]

Called when Finder disconnect occurs.

Note that this method overwrites an XrlRouter virtual method.

Reimplemented from XrlRouter.

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

Announce target birth to observer.

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

Implements XrlMfeaTargetBase.

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

Announce target death to observer.

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

Implements XrlMfeaTargetBase.

XrlCmdError XrlMfeaNode::mfea_0_1_add_dataflow_monitor4 ( const string &  xrl_sender_name,
const IPv4 source_address,
const IPv4 group_address,
const uint32_t &  threshold_interval_sec,
const uint32_t &  threshold_interval_usec,
const uint32_t &  threshold_packets,
const uint32_t &  threshold_bytes,
const bool &  is_threshold_in_packets,
const bool &  is_threshold_in_bytes,
const bool &  is_geq_upcall,
const bool &  is_leq_upcall 
) [protected, virtual]

Add/delete a dataflow monitor with the MFEA.

Parameters:
xrl_sender_namethe XRL name of the originator of this XRL.
source_addressthe source address of the dataflow to start/stop monitoring.
group_addressthe group address of the dataflow to start/stop monitoring.
threshold_interval_secthe number of seconds in the interval to measure.
threshold_interval_usecthe number of microseconds in the interval to measure.
threshold_packetsthe threshold (in number of packets) to compare against.
threshold_bytesthe threshold (in number of bytes) to compare against.
is_threshold_in_packetsif true, threshold_packets is valid.
is_threshold_in_bytesif true, threshold_bytes is valid.
is_geq_upcallif true, the operation for comparison is ">=".
is_leq_upcallif true, the operation for comparison is "<=".

Implements XrlMfeaTargetBase.

XrlCmdError XrlMfeaNode::mfea_0_1_add_mfc4 ( const string &  xrl_sender_name,
const IPv4 source_address,
const IPv4 group_address,
const uint32_t &  iif_vif_index,
const vector< uint8_t > &  oiflist,
const vector< uint8_t > &  oiflist_disable_wrongvif,
const uint32_t &  max_vifs_oiflist,
const IPv4 rp_address 
) [protected, virtual]

Add/delete a Multicast Forwarding Cache with the kernel.

Parameters:
xrl_sender_namethe XRL name of the originator of this XRL.
source_addressthe source address of the MFC to add/delete.
group_addressthe group address of the MFC to add/delete.
iif_vif_indexthe index of the vif that is the incoming interface.
oiflistthe bit-vector with the set of outgoing interfaces.
oiflist_disable_wrongvifthe bit-vector with the set of outgoing interfaces to disable WRONGVIF kernel signal.
max_vifs_oiflistthe number of vifs covered by oiflist or oiflist_disable_wrongvif .
rp_addressthe RP address of the MFC to add.

Implements XrlMfeaTargetBase.

XrlCmdError XrlMfeaNode::mfea_0_1_enable_all_vifs ( const bool &  enable) [protected, virtual]

Enable/disable/start/stop all MFEA vif interfaces.

Parameters:
enableif true, then enable the vifs, otherwise disable them.

Implements XrlMfeaTargetBase.

XrlCmdError XrlMfeaNode::mfea_0_1_enable_cli ( const bool &  enable) [protected, virtual]

Enable/disable/start/stop the MFEA CLI access.

Parameters:
enableif true, then enable the MFEA CLI access, otherwise disable it.

Implements XrlMfeaTargetBase.

XrlCmdError XrlMfeaNode::mfea_0_1_enable_mfea ( const bool &  enable) [protected, virtual]

Enable/disable/start/stop the MFEA.

Parameters:
enableif true, then enable the MFEA, otherwise disable it.

Implements XrlMfeaTargetBase.

XrlCmdError XrlMfeaNode::mfea_0_1_enable_vif ( const string &  vif_name,
const bool &  enable 
) [protected, virtual]

Enable/disable/start/stop a MFEA vif interface.

Parameters:
vif_namethe name of the vif to enable/disable/start/stop.
enableif true, then enable the vif, otherwise disable it.

Implements XrlMfeaTargetBase.

XrlCmdError XrlMfeaNode::mfea_0_1_have_multicast_routing4 ( bool &  result) [protected, virtual]

Test if the underlying system supports IPv4 multicast routing.

Parameters:
resulttrue if the underlying system supports IPv4 multicast routing, otherwise false.

Implements XrlMfeaTargetBase.

XrlCmdError XrlMfeaNode::mfea_0_1_log_trace_all ( const bool &  enable) [protected, virtual]

Enable/disable the MFEA trace log for all operations.

Parameters:
enableif true, then enable the trace log, otherwise disable it.

Implements XrlMfeaTargetBase.

XrlCmdError XrlMfeaNode::mfea_0_1_register_protocol4 ( const string &  xrl_sender_name,
const string &  if_name,
const string &  vif_name,
const uint32_t &  ip_protocol 
) [protected, virtual]

Register a protocol on an interface in the Multicast FEA.

There could be only one registered protocol per interface/vif.

Parameters:
xrl_sender_namethe XRL name of the originator of this XRL.
if_namethe name of the interface to register for the particular protocol.
vif_namethe name of the vif to register for the particular protocol.
ip_protocolthe IP protocol number. It must be between 1 and 255.

Implements XrlMfeaTargetBase.

XrlCmdError XrlMfeaNode::mfea_0_1_unregister_protocol4 ( const string &  xrl_sender_name,
const string &  if_name,
const string &  vif_name 
) [protected, virtual]

Unregister a protocol on an interface in the Multicast FEA.

There could be only one registered protocol per interface/vif.

Parameters:
xrl_sender_namethe XRL name of the originator of this XRL.
if_namethe name of the interface to unregister for the particular protocol.
vif_namethe name of the vif to unregister for the particular protocol.

Implements XrlMfeaTargetBase.

int XrlMfeaNode::shutdown ( ) [virtual]

Shutdown the node operation.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoState.

int XrlMfeaNode::signal_message_send ( const string &  dst_module_instance_name,
int  message_type,
uint32_t  vif_index,
const IPvX src,
const IPvX dst,
const uint8_t *  sndbuf,
size_t  sndlen 
) [private, virtual]

XrlMfeaNode::signal_message_send: name: The name of the protocol instance-destination of the message.

: The message type of the kernel signal. At this moment, one of the following: MFEA_KERNEL_MESSAGE_NOCACHE (if a cache-miss in the kernel) MFEA_KERNEL_MESSAGE_WRONGVIF (multicast packet received on wrong vif) MFEA_KERNEL_MESSAGE_WHOLEPKT (typically, a packet that should be encapsulated as a PIM-Register). MFEA_KERNEL_MESSAGE_BW_UPCALL (the bandwidth of a predefined source-group flow is above or below a given threshold). (XXX: The above types correspond to IGMPMSG_* or MRT6MSG_*). : The vif index of the related interface (message-specific relation). : The source address in the message. : The destination address in the message. : The data buffer with the additional information in the message. : The data length in .

Send a kernel signal to an user-level protocol that expects it.

Return value: XORP_OK on success, otherwise XORP_ERROR.

Implements ProtoNode< MfeaVif >.

int XrlMfeaNode::startup ( ) [virtual]

Startup the node operation.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoState.

const XrlRouter& XrlMfeaNode::xrl_router ( ) const [inline]

Get a const reference to the XrlRouter instance.

Returns:
a const reference to the XrlRouter (XrlRouter) instance.
XrlRouter& XrlMfeaNode::xrl_router ( ) [inline]

Get a reference to the XrlRouter instance.

Returns:
a reference to the XrlRouter (XrlRouter) instance.

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