xorp

MfeaVif Class Reference

A class for MFEA-specific virtual interface. More...

#include <mfea_vif.hh>

Inheritance diagram for MfeaVif:
ProtoUnit Vif ProtoState ServiceBase BugCatcher

List of all members.

Public Member Functions

 MfeaVif (MfeaNode &mfea_node, const Vif &vif)
 Constructor for a given MFEA node and a generic virtual interface.
 MfeaVif (MfeaNode &mfea_node, const MfeaVif &mfea_vif)
 Copy Constructor for a given MFEA node and MFEA-specific virtual interface.
virtual ~MfeaVif ()
 Destructor.
int start (string &error_msg)
 Start MFEA on a single virtual interface.
int stop (string &error_msg)
 Stop MFEA on a single virtual interface.
void enable ()
 Enable MFEA on a single virtual interface.
void disable ()
 Disable MFEA on a single virtual interface.
void notifyUpdated ()
 System detected some change.
int register_protocol (const string &module_instance_name, uint8_t ip_protocol, string &error_msg)
 Register a protocol on a single virtual interface.
int unregister_protocol (const string &module_instance_name, string &error_msg)
 Unregister a protocol on a single virtual interface.
uint8_t min_ttl_threshold () const
 Get the minimum TTL a multicast packet must have to be forwarded on this virtual interface.
void set_min_ttl_threshold (uint8_t v)
 Set the minimum TTL a multicast packet must have to be forwarded on this virtual interface.
uint32_t max_rate_limit () const
 Get the maximum multicast bandwidth rate allowed on this virtual interface.
void set_max_rate_limit (uint32_t v)
 Set the maximum multicast bandwidth rate allowed on this virtual interface.
const string & registered_module_instance_name () const
 Get the registered module instance name.
uint8_t registered_ip_protocol () const
 Get the registered IP protocol.

Private Member Functions

MfeaNodemfea_node () const
string flags_string () const
 Get the string with the flags about the vif status.

Private Attributes

MfeaNode_mfea_node
uint8_t _min_ttl_threshold
uint32_t _max_rate_limit
string _registered_module_instance_name
uint8_t _registered_ip_protocol
bool wants_to_be_started

Detailed Description

A class for MFEA-specific virtual interface.


Constructor & Destructor Documentation

MfeaVif::MfeaVif ( MfeaNode mfea_node,
const Vif vif 
)

Constructor for a given MFEA node and a generic virtual interface.

MfeaVif::MfeaVif: : The MFEA node this interface belongs to.

Parameters:
mfea_nodethe MfeaNode this interface belongs to.
vifthe generic Vif interface that contains various information.

: The generic Vif interface that contains various information.

MFEA vif constructor.

MfeaVif::MfeaVif ( MfeaNode mfea_node,
const MfeaVif mfea_vif 
)

Copy Constructor for a given MFEA node and MFEA-specific virtual interface.

MfeaVif::MfeaVif: : The MFEA node this interface belongs to.

Parameters:
mfea_nodethe MfeaNode this interface belongs to.
mfea_vifthe origin MfeaVif interface that contains the initialization information.

: The origin MfeaVif interface that contains the initialization information.

MFEA vif copy constructor.

MfeaVif::~MfeaVif ( ) [virtual]

Destructor.

MfeaVif::~MfeaVif: @:

MFEA vif destructor.


Member Function Documentation

void MfeaVif::disable ( )

Disable MFEA on a single virtual interface.

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.

void MfeaVif::enable ( )

Enable MFEA on a single virtual interface.

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

Reimplemented from ProtoState.

string MfeaVif::flags_string ( ) const [private]

Get the string with the flags about the vif status.

TODO: temporary here. Should go to the Vif class after the Vif class starts using the Proto class.

Returns:
the C++ style string with the flags about the vif status (e.g., UP/DOWN/DISABLED, etc).
uint32_t MfeaVif::max_rate_limit ( ) const [inline]

Get the maximum multicast bandwidth rate allowed on this virtual interface.

Returns:
the maximum multicast bandwidth rate allowed on this virtual interface.
uint8_t MfeaVif::min_ttl_threshold ( ) const [inline]

Get the minimum TTL a multicast packet must have to be forwarded on this virtual interface.

Returns:
the minimum TTL a multicast packet must have to be forwarded on this virtual interface.
void MfeaVif::notifyUpdated ( )

System detected some change.

int MfeaVif::register_protocol ( const string &  module_instance_name,
uint8_t  ip_protocol,
string &  error_msg 
)

Register a protocol on a single virtual interface.

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

Parameters:
module_instance_namethe module instance name of the protocol to register.
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.
uint8_t MfeaVif::registered_ip_protocol ( ) const [inline]

Get the registered IP protocol.

Returns:
the registered IP protocol.
const string& MfeaVif::registered_module_instance_name ( ) const [inline]

Get the registered module instance name.

Returns:
the registered module instance name.
void MfeaVif::set_max_rate_limit ( uint32_t  v) [inline]

Set the maximum multicast bandwidth rate allowed on this virtual interface.

Parameters:
vthe value of the maximum multicast bandwidth rate allowed on this virtual interface.
void MfeaVif::set_min_ttl_threshold ( uint8_t  v) [inline]

Set the minimum TTL a multicast packet must have to be forwarded on this virtual interface.

Parameters:
vthe value of the minimum TTL a multicast packet must have to be forwarded on this virtual interface.
int MfeaVif::start ( string &  error_msg)

Start MFEA on a single virtual interface.

MfeaVif::start: : The error message (if error).

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Start MFEA on a single virtual interface.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaVif::stop ( string &  error_msg)

Stop MFEA on a single virtual interface.

MfeaVif::stop: : The error message (if error).

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Stop MFEA on a single virtual interface.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int MfeaVif::unregister_protocol ( const string &  module_instance_name,
string &  error_msg 
)

Unregister a protocol on a single virtual interface.

Parameters:
module_instance_namethe module instance name of the protocol to unregister.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

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