xorp

MfeaNode Class Reference

The MFEA node class. More...

#include <mfea_node.hh>

Inheritance diagram for MfeaNode:
ProtoNode< MfeaVif > IfConfigUpdateReporterBase ServiceChangeObserverBase ProtoUnit ProtoState ServiceBase BugCatcher XrlMfeaNode

List of all members.

Public Member Functions

 MfeaNode (FeaNode &fea_node, int family, xorp_module_id module_id, EventLoop &eventloop)
 Constructor for a given address family, module ID, and event loop.
virtual ~MfeaNode ()
 Destructor.
FeaNodefea_node ()
 Get the FEA node instance.
bool is_dummy () const
 Test if running in dummy mode.
int start ()
 Start the node operation.
int stop ()
 Stop the node operation.
int final_start ()
 Completely start the node operation.
int final_stop ()
 Completely stop the node operation.
void enable ()
 Enable node operation.
void disable ()
 Disable node operation.
bool have_multicast_routing4 () const
 Test if the underlying system supports IPv4 multicast routing.
int add_vif (const Vif &vif, string &error_msg)
 Install a new MFEA vif.
int delete_vif (const string &vif_name, string &error_msg)
 Delete an existing MFEA vif.
int add_config_vif (const Vif &vif, string &error_msg)
 Add a configured vif.
int set_config_vif_flags (const string &vif_name, bool is_pim_register, bool is_p2p, bool is_loopback, bool is_multicast, bool is_broadcast, bool is_up, uint32_t mtu, string &error_msg)
 Set the vif flags of a configured vif.
int set_config_all_vifs_done (string &error_msg)
 Complete the set of vif configuration changes.
int enable_vif (const string &vif_name, string &error_msg)
 Enable an existing MFEA vif.
int disable_vif (const string &vif_name, string &error_msg)
 Disable an existing MFEA vif.
int start_vif (const string &vif_name, string &error_msg)
 Start an existing MFEA vif.
int stop_vif (const string &vif_name, string &error_msg)
 Stop an existing MFEA vif.
int start_all_vifs ()
 Start MFEA on all enabled interfaces.
int stop_all_vifs ()
 Stop MFEA on all interfaces it was running on.
int enable_all_vifs ()
 Enable MFEA on all interfaces.
int disable_all_vifs ()
 Disable MFEA on all interfaces.
void delete_all_vifs ()
 Delete all MFEA vifs.
void vif_shutdown_completed (const string &vif_name)
 A method called when a vif has completed its shutdown.
int register_protocol (const string &module_instance_name, const string &if_name, const string &vif_name, uint8_t ip_protocol, string &error_msg)
 Register a protocol on an interface in the Multicast FEA.
void unregister_protocols_for_iface (const string &ifname)
 Helper method to unregister all protocols on all vifs for this interface.
void unregister_protocols_for_vif (const string &ifname, const string &vifname)
 Helper method to unregister all protocols on this vif.
int unregister_protocol (const string &module_instance_name, const string &if_name, const string &vif_name, string &error_msg)
 Unregister a protocol on an interface in the Multicast FEA.
int proto_recv (const string &, const string &, const IPvX &, const IPvX &, uint8_t, int32_t, int32_t, bool, bool, const vector< uint8_t > &, string &)
 UNUSED.
int proto_send (const string &, const string &, const IPvX &, const IPvX &, uint8_t, int32_t, int32_t, bool, bool, const uint8_t *, size_t, string &)
 UNUSED.
int signal_message_recv (const string &src_module_instance_name, int message_type, uint32_t vif_index, const IPvX &src, const IPvX &dst, const uint8_t *rcvbuf, size_t rcvlen)
 Process NOCACHE, WRONGVIF/WRONGMIF, WHOLEPKT signals from the kernel.
int signal_dataflow_message_recv (const IPvX &source, const IPvX &group, const TimeVal &threshold_interval, const TimeVal &measured_interval, 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)
 Process a dataflow upcall from the kernel or from the MFEA internal mechanism.
virtual 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)=0
 Send a signal that a dataflow-related pre-condition is true.
int add_mfc (const string &module_instance_name, const IPvX &source, const IPvX &group, uint32_t iif_vif_index, const Mifset &oiflist, const Mifset &oiflist_disable_wrongvif, uint32_t max_vifs_oiflist, const IPvX &rp_addr)
 Add Multicast Forwarding Cache (MFC) to the kernel.
int delete_mfc (const string &module_instance_name, const IPvX &source, const IPvX &group)
 Delete Multicast Forwarding Cache (MFC) from the kernel.
int add_dataflow_monitor (const string &module_instance_name, const IPvX &source, const IPvX &group, const TimeVal &threshold_interval, uint32_t threshold_packets, uint32_t threshold_bytes, bool is_threshold_in_packets, bool is_threshold_in_bytes, bool is_geq_upcall, bool is_leq_upcall, string &error_msg)
 Add a dataflow monitor entry.
int delete_dataflow_monitor (const string &module_instance_name, const IPvX &source, const IPvX &group, const TimeVal &threshold_interval, uint32_t threshold_packets, uint32_t threshold_bytes, bool is_threshold_in_packets, bool is_threshold_in_bytes, bool is_geq_upcall, bool is_leq_upcall, string &error_msg)
 Delete a dataflow monitor entry.
int delete_all_dataflow_monitor (const string &module_instance_name, const IPvX &source, const IPvX &group, string &error_msg)
 Delete all dataflow monitor entries for a given source and group address.
int add_multicast_vif (uint32_t vif_index)
 Add a multicast vif to the kernel.
int delete_multicast_vif (uint32_t vif_index)
 Delete a multicast vif from the kernel.
int get_sg_count (const IPvX &source, const IPvX &group, SgCount &sg_count)
 Get MFC multicast forwarding statistics from the kernel.
int get_vif_count (uint32_t vif_index, VifCount &vif_count)
 Get interface multicast forwarding statistics from the kernel.
MfeaMroutermfea_mrouter ()
 Get a reference to the mrouter (MfeaMrouter).
MfeaDftmfea_dft ()
 Get a reference to the dataflow table (MfeaDft).
bool is_log_trace () const
 Test if trace log is enabled.
void set_log_trace (bool is_enabled)
 Enable/disable trace log.

Protected Member Functions

IfConfigUpdateReplicatormfea_iftree_update_replicator ()

Private Member Functions

void interface_update (const string &ifname, const Update &update)
void vif_update (const string &ifname, const string &vifname, const Update &update)
void vifaddr4_update (const string &ifname, const string &vifname, const IPv4 &addr, const Update &update)
void updates_completed ()
void status_change (ServiceBase *service, ServiceStatus old_status, ServiceStatus new_status)
 A method invoked when the status of a service changes.
int add_pim_register_vif ()
 MfeaNode::add_pim_register_vif:

Private Attributes

FeaNode_fea_node
MfeaMrouter _mfea_mrouter
MfeaDft _mfea_dft
set< string > _registered_module_instance_names
set< uint8_t > _registered_ip_protocols
IfTree _mfea_iftree
IfConfigUpdateReplicator _mfea_iftree_update_replicator
bool _is_log_trace

Detailed Description

The MFEA node class.

There should be one node per MFEA instance. There should be one instance per address family.


Constructor & Destructor Documentation

MfeaNode::MfeaNode ( FeaNode fea_node,
int  family,
xorp_module_id  module_id,
EventLoop eventloop 
)

Constructor for a given address family, module ID, and event loop.

MfeaNode::MfeaNode: : The corresponding FeaNode.

Parameters:
fea_nodethe corresponding FeaNode (FeaNode).
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
module_idthe module ID (xorp_module_id). Should be equal to XORP_MODULE_MFEA.
eventloopthe event loop to use.

: The address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively). : The module ID (must be XORP_MODULE_MFEA). : The event loop.

MFEA node constructor.

MfeaNode::~MfeaNode ( ) [virtual]

Destructor.

MfeaNode::~MfeaNode: @:

MFEA node destructor.


Member Function Documentation

int MfeaNode::add_config_vif ( const Vif vif,
string &  error_msg 
)

Add a configured vif.

Parameters:
vifthe vif with the information to add.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode< MfeaVif >.

int MfeaNode::add_dataflow_monitor ( const string &  module_instance_name,
const IPvX source,
const IPvX group,
const TimeVal threshold_interval,
uint32_t  threshold_packets,
uint32_t  threshold_bytes,
bool  is_threshold_in_packets,
bool  is_threshold_in_bytes,
bool  is_geq_upcall,
bool  is_leq_upcall,
string &  error_msg 
)

Add a dataflow monitor entry.

MfeaNode::add_dataflow_monitor: : The module instance name of the protocol that adds the dataflow monitor entry.

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:
module_instance_namethe module instance name of the protocol that adds the dataflow monitor entry.
sourcethe source address.
groupthe group address.
threshold_intervalthe dataflow threshold interval.
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 "<=".
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The source address. : The group address. : The dataflow threshold interval. : The threshold (in number of packets) to compare against. : The threshold (in number of bytes) to compare against. : If true, is valid. : If true, is valid. : If true, the operation for comparison is ">=". : If true, the operation for comparison is "<=". : The error message (if error).

Add a dataflow monitor entry. Note: either or (or both) must be true. Note: either or (but not both) must be true.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::add_mfc ( const string &  module_instance_name,
const IPvX source,
const IPvX group,
uint32_t  iif_vif_index,
const Mifset &  oiflist,
const Mifset &  oiflist_disable_wrongvif,
uint32_t  max_vifs_oiflist,
const IPvX rp_addr 
)

Add Multicast Forwarding Cache (MFC) to the kernel.

MfeaNode::add_mfc: : The module instance name of the protocol that adds the MFC.

Parameters:
module_instance_namethe module instance name of the protocol that adds the MFC.
sourcethe source address.
groupthe group address.
iif_vif_indexthe vif index of the incoming interface.
oiflistthe bitset with the outgoing interfaces.
oiflist_disable_wrongvifthe bitset with the outgoing interfaces to disable the WRONGVIF signal.
max_vifs_oiflistthe number of vifs covered by oiflist or oiflist_disable_wrongvif.
rp_addrthe RP address.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The source address. : The group address. : The vif index of the incoming interface. : The bitset with the outgoing interfaces. : The bitset with the outgoing interfaces to disable the WRONGVIF signal. : The number of vifs covered by or . : The RP address.

Add Multicast Forwarding Cache (MFC) to the kernel.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::add_multicast_vif ( uint32_t  vif_index)

Add a multicast vif to the kernel.

MfeaNode::add_multicast_vif: : The vif index of the interface to add.

Parameters:
vif_indexthe vif index of the interface to add.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Add a multicast vif to the kernel.

Return value: XORP_OK on success, othewise XORP_ERROR.

int MfeaNode::add_pim_register_vif ( ) [private]

MfeaNode::add_pim_register_vif:

Install a new MFEA PIM Register vif (if needed).

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::add_vif ( const Vif vif,
string &  error_msg 
)

Install a new MFEA vif.

MfeaNode::add_vif: : Vif information about the new MfeaVif to install.

Parameters:
vifvif information about the new MfeaVif to install.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The error message (if error).

Install a new MFEA vif.

Return value: XORP_OK on success, otherwise XORP_ERROR.

virtual int MfeaNode::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 
) [pure 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.

Implemented in XrlMfeaNode.

int MfeaNode::delete_all_dataflow_monitor ( const string &  module_instance_name,
const IPvX source,
const IPvX group,
string &  error_msg 
)

Delete all dataflow monitor entries for a given source and group address.

MfeaNode::delete_all_dataflow_monitor: : The module instance name of the protocol that deletes the dataflow monitor entry.

Parameters:
module_instance_namethe module instance name of the protocol that deletes the dataflow monitor entry.
sourcethe source address.
groupthe group address.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The source address. : The group address. : The error message (if error).

Delete all dataflow monitor entries for a given and address.

Return value: XORP_OK on success, otherwise XORP_ERROR.

void MfeaNode::delete_all_vifs ( )

Delete all MFEA vifs.

MfeaNode::delete_all_vifs: @:

int MfeaNode::delete_dataflow_monitor ( const string &  module_instance_name,
const IPvX source,
const IPvX group,
const TimeVal threshold_interval,
uint32_t  threshold_packets,
uint32_t  threshold_bytes,
bool  is_threshold_in_packets,
bool  is_threshold_in_bytes,
bool  is_geq_upcall,
bool  is_leq_upcall,
string &  error_msg 
)

Delete a dataflow monitor entry.

MfeaNode::delete_dataflow_monitor: : The module instance name of the protocol that deletes the dataflow monitor entry.

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:
module_instance_namethe module instance name of the protocol that deletes the dataflow monitor entry.
sourcethe source address.
groupthe group address.
threshold_intervalthe dataflow threshold interval.
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 "<=".
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The source address. : The group address. : The dataflow threshold interval. : The threshold (in number of packets) to compare against. : The threshold (in number of bytes) to compare against. : If true, is valid. : If true, is valid. : If true, the operation for comparison is ">=". : If true, the operation for comparison is "<=". : The error message (if error).

Delete a dataflow monitor entry. Note: either or (or both) must be true. Note: either or (but not both) must be true.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::delete_mfc ( const string &  module_instance_name,
const IPvX source,
const IPvX group 
)

Delete Multicast Forwarding Cache (MFC) from the kernel.

MfeaNode::delete_mfc: : The module instance name of the protocol that deletes the MFC.

Note: all corresponding dataflow entries are also removed.

Parameters:
module_instance_namethe module instance name of the protocol that deletes the MFC.
sourcethe source address.
groupthe group address.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The source address. : The group address.

Delete Multicast Forwarding Cache (MFC) from the kernel. XXX: All corresponding dataflow entries are also removed.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::delete_multicast_vif ( uint32_t  vif_index)

Delete a multicast vif from the kernel.

MfeaNode::delete_multicast_vif: : The vif index of the interface to delete.

Parameters:
vif_indexthe vif index of the interface to delete.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Delete a multicast vif from the kernel.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::delete_vif ( const string &  vif_name,
string &  error_msg 
)

Delete an existing MFEA vif.

MfeaNode::delete_vif: : The name of the vif to delete.

Parameters:
vif_namethe name of the vif to delete.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The error message (if error).

Delete an existing MFEA vif.

Return value: XORP_OK on success, otherwise XORP_ERROR.

void MfeaNode::disable ( )

Disable node operation.

Disable the node operation.

If an unit is disabled, it cannot be start or pending-start. If the unit was runnning, it will be stop first.

Reimplemented from ProtoState.

int MfeaNode::disable_all_vifs ( )

Disable MFEA on all interfaces.

MfeaNode::disable_all_vifs: @:

All running interfaces are stopped first.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Disable MFEA on all interfaces. All running interfaces are stopped first.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::disable_vif ( const string &  vif_name,
string &  error_msg 
)

Disable an existing MFEA vif.

MfeaNode::disable_vif: : The name of the vif to disable.

Parameters:
vif_namethe name of the vif to disable.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The error message (if error).

Disable an existing MFEA vif.

Return value: XORP_OK on success, otherwise XORP_ERROR.

void MfeaNode::enable ( )

Enable node operation.

Enable the node operation.

If an unit is not enabled, it cannot be start, or pending-start.

Reimplemented from ProtoState.

int MfeaNode::enable_all_vifs ( )

Enable MFEA on all interfaces.

MfeaNode::enable_all_vifs: @:

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Enable MFEA on all interfaces.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::enable_vif ( const string &  vif_name,
string &  error_msg 
)

Enable an existing MFEA vif.

MfeaNode::enable_vif: : The name of the vif to enable.

Parameters:
vif_namethe name of the vif to enable.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The error message (if error).

Enable an existing MFEA vif.

Return value: XORP_OK on success, otherwise XORP_ERROR.

FeaNode& MfeaNode::fea_node ( ) [inline]

Get the FEA node instance.

Returns:
reference to the FEA node instance.
int MfeaNode::final_start ( )

Completely start the node operation.

MfeaNode::final_start: @:

This method should be called internally after MfeaNode::start() to complete the job.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Completely start the node operation.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::final_stop ( )

Completely stop the node operation.

MfeaNode::final_stop: @:

This method should be called internally after MfeaNode::stop() to complete the job.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Completely stop the MFEA operation.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::get_sg_count ( const IPvX source,
const IPvX group,
SgCount sg_count 
)

Get MFC multicast forwarding statistics from the kernel.

MfeaNode::get_sg_count: : The MFC source address.

Get the number of packets and bytes forwarded by a particular Multicast Forwarding Cache (MFC) entry in the kernel, and the number of packets arrived on wrong interface for that entry.

Parameters:
sourcethe MFC source address.
groupthe MFC group address.
sg_counta reference to a SgCount class to place the result: the number of packets and bytes forwarded by the particular MFC entry, and the number of packets arrived on a wrong interface.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The MFC group address. : A reference to a SgCount class to place the result: the number of packets and bytes forwarded by the particular MFC entry, and the number of packets arrived on a wrong interface.

Get the number of packets and bytes forwarded by a particular Multicast Forwarding Cache (MFC) entry in the kernel, and the number of packets arrived on wrong interface for that entry.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::get_vif_count ( uint32_t  vif_index,
VifCount vif_count 
)

Get interface multicast forwarding statistics from the kernel.

MfeaNode::get_vif_count: : The vif index of the virtual multicast interface whose statistics we need.

Get the number of packets and bytes received on, or forwarded on a particular multicast interface.

Parameters:
vif_indexthe vif index of the virtual multicast interface whose statistics we need.
vif_counta reference to a VifCount class to store the result.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: A reference to a VifCount class to store the result.

Get the number of packets and bytes received on, or forwarded on a particular multicast interface.

Return value: XORP_OK on success, otherwise XORP_ERROR.

bool MfeaNode::have_multicast_routing4 ( ) const [inline]

Test if the underlying system supports IPv4 multicast routing.

Returns:
true if the underlying system supports IPv4 multicast routing, otherwise false.
bool MfeaNode::is_dummy ( ) const

Test if running in dummy mode.

Returns:
true if running in dummy mode, otherwise false.
bool MfeaNode::is_log_trace ( ) const [inline]

Test if trace log is enabled.

This method is used to test whether to output trace log debug messges.

Returns:
true if trace log is enabled, otherwise false.
MfeaDft& MfeaNode::mfea_dft ( ) [inline]

Get a reference to the dataflow table (MfeaDft).

Returns:
a reference to the dataflow table (MfeaDft).
MfeaMrouter& MfeaNode::mfea_mrouter ( ) [inline]

Get a reference to the mrouter (MfeaMrouter).

Returns:
a reference to the mrouter (MfeaMrouter).
int MfeaNode::register_protocol ( const string &  module_instance_name,
const string &  if_name,
const string &  vif_name,
uint8_t  ip_protocol,
string &  error_msg 
)

Register a protocol on an interface in the Multicast FEA.

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

Parameters:
module_instance_namethe module instance name of the protocol to register.
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.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int MfeaNode::set_config_all_vifs_done ( string &  error_msg)

Complete the set of vif configuration changes.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int MfeaNode::set_config_vif_flags ( const string &  vif_name,
bool  is_pim_register,
bool  is_p2p,
bool  is_loopback,
bool  is_multicast,
bool  is_broadcast,
bool  is_up,
uint32_t  mtu,
string &  error_msg 
)

Set the vif flags of a configured vif.

Parameters:
vif_namethe 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.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode< MfeaVif >.

void MfeaNode::set_log_trace ( bool  is_enabled) [inline]

Enable/disable trace log.

This method is used to enable/disable trace log debug messages output.

Parameters:
is_enabledif true, trace log is enabled, otherwise is disabled.
int MfeaNode::signal_dataflow_message_recv ( const IPvX source,
const IPvX group,
const TimeVal threshold_interval,
const TimeVal measured_interval,
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 
)

Process a dataflow upcall from the kernel or from the MFEA internal mechanism.

MfeaNode::signal_dataflow_message_recv: : The source address.

The MFEA internal bandwidth-estimation mechanism is based on periodic reading of the kernel multicast forwarding statistics. The signal is sent to all user-level protocols that expect it.

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:
sourcethe source address.
groupthe group address.
threshold_intervalthe dataflow threshold interval.
measured_intervalthe dataflow measured interval.
threshold_packetsthe threshold (in number of packets) to compare against.
threshold_bytesthe threshold (in number of bytes) to compare against.
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.

: The group address. : The dataflow threshold interval. : The dataflow measured interval. : The threshold (in number of packets) to compare against. : The threshold (in number of bytes) to compare against. : The number of packets measured within the . : The number of bytes measured within the . : If true, is valid. : If true, is valid. : If true, the operation for comparison is ">=". : If true, the operation for comparison is "<=".

Process a dataflow upcall from the kernel or from the MFEA internal bandwidth-estimation mechanism (i.e., periodic reading of the kernel multicast forwarding statistics). The signal is sent to all user-level protocols that expect it.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::signal_message_recv ( const string &  src_module_instance_name,
int  message_type,
uint32_t  vif_index,
const IPvX src,
const IPvX dst,
const uint8_t *  rcvbuf,
size_t  rcvlen 
) [virtual]

Process NOCACHE, WRONGVIF/WRONGMIF, WHOLEPKT signals from the kernel.

MfeaNode::signal_message_recv: : Unused.

The signal is sent to all user-level protocols that expect it.

Parameters:
src_module_instance_nameunused.
message_typethe message type of the kernel signal (for IPv4 and IPv6 respectively):
#define IGMPMSG_NOCACHE         1
#define IGMPMSG_WRONGVIF        2
#define IGMPMSG_WHOLEPKT        3
#define MRT6MSG_NOCACHE         1
#define MRT6MSG_WRONGMIF        2
#define MRT6MSG_WHOLEPKT        3
Parameters:
vif_indexthe vif index of the related interface (message-specific).
srcthe source address in the message.
dstthe destination address in the message.
rcvbufthe data buffer with the additional information in the message.
rcvlenthe data length in rcvbuf.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The message type of the kernel signal (IGMPMSG_* or MRT6MSG_*) : The vif index of the related interface (message-specific). : 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 .

Process NOCACHE, WRONGVIF/WRONGMIF, WHOLEPKT, BW_UPCALL signals from the kernel. The signal is sent to all user-level protocols that expect it.

Return value: XORP_OK on success, otherwise XORP_ERROR.

Implements ProtoNode< MfeaVif >.

int MfeaNode::start ( )

Start the node operation.

MfeaNode::start: @:

After the startup operations are completed, MfeaNode::final_start() is called internally to complete the job.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Start the MFEA. TODO: This function should not start the operation on the interfaces. The interfaces must be activated separately. After the startup operations are completed, MfeaNode::final_start() is called to complete the job.

Return value: XORP_OK on success, otherwize XORP_ERROR.

Reimplemented from ProtoState.

int MfeaNode::start_all_vifs ( )

Start MFEA on all enabled interfaces.

MfeaNode::start_all_vifs: @:

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Start MFEA on all enabled interfaces.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::start_vif ( const string &  vif_name,
string &  error_msg 
)

Start an existing MFEA vif.

MfeaNode::start_vif: : The name of the vif to start.

Parameters:
vif_namethe name of the vif to start.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The error message (if error).

Start an existing MFEA vif.

Return value: XORP_OK on success, otherwise XORP_ERROR.

void MfeaNode::status_change ( ServiceBase service,
ServiceStatus  old_status,
ServiceStatus  new_status 
) [private, virtual]

A method invoked when the status of a service changes.

Parameters:
servicethe service whose status has changed.
old_statusthe old status.
new_statusthe new status.

Implements ServiceChangeObserverBase.

int MfeaNode::stop ( )

Stop the node operation.

MfeaNode::stop: @:

After the shutdown operations are completed, MfeaNode::final_stop() is called internally to complete the job.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Gracefully stop the MFEA. XXX: After the cleanup is completed, MfeaNode::final_stop() is called to complete the job. XXX: This function, unlike start(), will stop the MFEA operation on all interfaces.

Return value: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoState.

int MfeaNode::stop_all_vifs ( )

Stop MFEA on all interfaces it was running on.

MfeaNode::stop_all_vifs: @:

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Stop MFEA on all interfaces it was running on.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::stop_vif ( const string &  vif_name,
string &  error_msg 
)

Stop an existing MFEA vif.

MfeaNode::stop_vif: : The name of the vif to stop.

Parameters:
vif_namethe name of the vif to start.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The error message (if error).

Stop an existing MFEA vif.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaNode::unregister_protocol ( const string &  module_instance_name,
const string &  if_name,
const string &  vif_name,
string &  error_msg 
)

Unregister a protocol on an interface in the Multicast FEA.

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

Parameters:
module_instance_namethe module instance name of the protocol to unregister.
if_namethe name of the interface to unregister for the particular protocol.
vif_namethe name of the vif to unregister for the particular protocol.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
void MfeaNode::unregister_protocols_for_iface ( const string &  ifname)

Helper method to unregister all protocols on all vifs for this interface.

This needs to be called before we delete an interface to ensure the cleanup can happen properly.

void MfeaNode::unregister_protocols_for_vif ( const string &  ifname,
const string &  vifname 
)

Helper method to unregister all protocols on this vif.

This needs to be called before we delete an interface to ensure the cleanup can happen properly.

void MfeaNode::vif_shutdown_completed ( const string &  vif_name)

A method called when a vif has completed its shutdown.

Parameters:
vif_namethe name of the vif that has completed its shutdown.

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