class MfeaNode

The MFEA node class. More...

Contains pure virtuals
Definition#include <mfea_node.hh>
InheritsProtoNode (libproto) [public ]
Inherited byXrlMfeaNode
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

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

 MfeaNode (int family, xorp_module_id module_id, EventLoop& eventloop, FtiConfig& ftic)

MfeaNode

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

Parameters:
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.
fticthe FtiConfig entry to use to obtain the routing table (NOTE: this parameter is only temporary here, and will be removed in the near future).

 ~MfeaNode ()

~MfeaNode

[virtual]

Destructor

int  start ()

start

Start the node operation.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode.

int  stop ()

stop

Stop the node operation.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode.

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

add_vif

Install a new MFEA vif.

Parameters:
vifvif information about new MfeaVif to install.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode.

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

delete_vif

Delete an existing MFEA vif.

Parameters:
vif_namethe name of the vif to delete.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode.

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

add_config_vif

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.

int  add_config_vif (const string& vif_name, uint16_t vif_index, string& error_msg)

add_config_vif

Add a configured vif.

Parameters:
vif_namethe name of the vif to add.
vif_indexthe vif index of the vif to add.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode.

int  delete_config_vif (const string& vif_name, string& error_msg)

delete_config_vif

Delete a configured vif.

Parameters:
vif_namethe name of the vif to delete.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode.

int  add_config_vif_addr (const string& vif_name, const IPvX& addr, const IPvXNet& subnet, const IPvX& broadcast, const IPvX& peer, string& error_msg)

add_config_vif_addr

Add an address to a configured vif.

Parameters:
vif_namethe name of the vif.
addrthe address to add.
subnetthe subnet address to add.
broadcastthe broadcast address to add.
peerthe peer address to add.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode.

int  delete_config_vif_addr (const string& vif_name, const IPvX& addr, string& error_msg)

delete_config_vif_addr

Delete an address from a configured vif.

Parameters:
vif_namethe name of the vif.
addrthe address to delete.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode.

int  set_config_pif_index (const string& vif_name, uint16_t pif_index, string& error_msg)

set_config_pif_index

Set the pif_index to a configured vif.

Parameters:
vif_namethe name of the vif.
pif_indexthe physical interface index.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode.

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

set_config_vif_flags

Set the vif flags to 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.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode.

int  set_config_all_vifs_done (string& error_msg)

set_config_all_vifs_done

Complete the set of vif configuration changes.

Parameters:
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  send_add_config_vif (const string& dst_module_instance_name, xorp_module_id dst_module_id, const string& vif_name, uint16_t vif_index)

send_add_config_vif

[pure virtual]

Send to a client to add a configured vif.

Parameters:
dst_module_instance_namethe name of the protocol instance-destination of the message.
dst_module_idthe module ID of the protocol-destination of the message.
vif_namethe name of the vif to add.
vif_indexthe vif index of the vif to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  send_delete_config_vif (const string& dst_module_instance_name, xorp_module_id dst_module_id, const string& vif_name)

send_delete_config_vif

[pure virtual]

Send to a client to delete a configured vif.

Parameters:
dst_module_instance_namethe name of the protocol instance-destination of the message.
dst_module_idthe module ID of the protocol-destination of the message.
vif_namethe name of the vif to delete.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  send_add_config_vif_addr (const string& dst_module_instance_name, xorp_module_id dst_module_id, const string& vif_name, const IPvX& addr, const IPvXNet& subnet, const IPvX& broadcast, const IPvX& peer)

send_add_config_vif_addr

[pure virtual]

Send to a client to add an address to a configured vif.

Parameters:
dst_module_instance_namethe name of the protocol instance-destination of the message.
dst_module_idthe module ID of the protocol-destination of the message.
vif_namethe name of the vif.
addrthe address to add.
subnetthe subnet address to add.
broadcastthe broadcast address to add.
peerthe peer address to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  send_delete_config_vif_addr (const string& dst_module_instance_name, xorp_module_id dst_module_id, const string& vif_name, const IPvX& addr)

send_delete_config_vif_addr

[pure virtual]

Send to a client to delete an address from a configured vif.

Parameters:
dst_module_instance_namethe name of the protocol instance-destination of the message.
dst_module_idthe module ID of the protocol-destination of the message.
vif_namethe name of the vif.
addrthe address to delete.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  send_set_config_vif_flags (const string& dst_module_instance_name, xorp_module_id dst_module_id, const string& vif_name, bool is_pim_register, bool is_p2p, bool is_loopback, bool is_multicast, bool is_broadcast, bool is_up)

send_set_config_vif_flags

[pure virtual]

Send to a client to set the vif flags to a configured vif.

Parameters:
dst_module_instance_namethe name of the protocol instance-destination of the message.
dst_module_idthe module ID of the protocol-destination of the message.
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.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  send_set_config_all_vifs_done (const string& dst_module_instance_name, xorp_module_id dst_module_id)

send_set_config_all_vifs_done

[pure virtual]

Send to a client to complete the set of vif configuration changes.

Parameters:
dst_module_instance_namethe name of the protocol instance-destination of the message.
dst_module_idthe module ID of the protocol-destination of the message.

Returns: XORP_OK on success, otherwise XORP_ERROR.

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

enable_vif

Enable an existing MFEA vif.

Parameters:
vif_namethe name of the vif to enable.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

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

disable_vif

Disable an existing MFEA vif.

Parameters:
vif_namethe name of the vif to disable.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

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

start_vif

Start an existing MFEA vif.

Parameters:
vif_namethe name of the vif to start.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

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

stop_vif

Stop an existing MFEA vif.

Parameters:
vif_namethe name of the vif to start.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  start_all_vifs ()

start_all_vifs

Start MFEA on all enabled interfaces.

Returns: the number of virtual interfaces MFEA was started on, or XORP_ERROR if error occured.

int  stop_all_vifs ()

stop_all_vifs

Stop MFEA on all interfaces it was running on.

Returns: the number of virtual interfaces MFEA was stopped on, or XORP_ERROR if error occured.

int  enable_all_vifs ()

enable_all_vifs

Enable MFEA on all interfaces.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  disable_all_vifs ()

disable_all_vifs

Disable MFEA on all interfaces.

All running interfaces are stopped first.

Returns: XORP_OK on success, otherwise XORP_ERROR.

void  delete_all_vifs ()

delete_all_vifs

Delete all MFEA vifs.

int  start_protocol (xorp_module_id module_id)

start_protocol

Start operation for a given protocol.

Parameters:
module_idthe module ID (xorp_module_id) of the protocol to start.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  stop_protocol (xorp_module_id module_id)

stop_protocol

Stop operation for a given protocol.

Parameters:
module_idthe module ID (xorp_module_id) of the protocol to stop.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  add_protocol (const string& module_instance_name, xorp_module_id module_id)

add_protocol

A method used by a protocol instance to register with this MfeaNode.

Parameters:
module_instance_namethe module instance name of the protocol to add.
module_idthe module ID (xorp_module_id) of the protocol to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_protocol (const string& module_instance_name, xorp_module_id module_id)

delete_protocol

A method used by a protocol instance to deregister with this MfeaNode.

Parameters:
module_instance_namethe module instance name of the protocol to delete.
module_idthe module ID (xorp_module_id) of the protocol to delete.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  start_protocol_vif (const string& module_instance_name, xorp_module_id module_id, uint16_t vif_index)

start_protocol_vif

Start a protocol on an interface.

Parameters:
module_instance_namethe module instance name of the protocol to start on the interface.
module_idthe module ID (xorp_module_id) of the protocol to start on the interface.
vif_indexthe vif index of the interface to start the protocol on.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  stop_protocol_vif (const string& module_instance_name, xorp_module_id module_id, uint16_t vif_index)

stop_protocol_vif

Stop a protocol on an interface.

Parameters:
module_instance_namethe module instance name of the protocol to stop on the interface.
module_idthe module ID (xorp_module_id) of the protocol to stop on the interface.
vif_indexthe vif index of the interface to stop the protocol on.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  add_allow_kernel_signal_messages (const string& module_instance_name, xorp_module_id module_id)

add_allow_kernel_signal_messages

Add a protocol to receive kernel signal messages.

Add a protocol to the set of protocols that are interested in receiving kernel signal messages.

Parameters:
module_instance_namethe module instance name of the protocol to add.
module_idthe module ID (xorp_module_id) of the protocol to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_allow_kernel_signal_messages (const string& module_instance_name, xorp_module_id module_id)

delete_allow_kernel_signal_messages

Delete a protocol from receiving kernel signal messages.

Delete a protocol from the set of protocols that are interested in receiving kernel signal messages.

Parameters:
module_instance_namethe module instance name of the protocol to delete.
module_idthe module ID (xorp_module_id) of the protocol to delete.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  add_allow_mrib_messages (const string& module_instance_name, xorp_module_id module_id)

add_allow_mrib_messages

Add a protocol to receive MRIB messages.

Add a protocol to the set of protocols that are interested in receiving MRIB (see Mrib) messages.

The MRIB (see Mrib) messages contain (unicast) routing information that can be used for obtaining the RPF (Reverse-Path Forwarding) information.

Parameters:
module_instance_namethe module instance name of the protocol to add.
module_idthe module ID (xorp_module_id) of the protocol to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_allow_mrib_messages (const string& module_instance_name, xorp_module_id module_id)

delete_allow_mrib_messages

Delete a protocol from receiving MRIB messages.

Delete a protocol to the set of protocols that are interested in receiving MRIB (see Mrib) messages.

The MRIB (see Mrib) messages contain (unicast) routing information that can be used for obtaining the RPF (Reverse-Path Forwarding) information.

Parameters:
module_instance_namethe module instance name of the protocol to delete.
module_idthe module ID (xorp_module_id) of the protocol to delete.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  send_add_mrib (const Mrib& mrib)

send_add_mrib

Add a Mrib entry to user-level protocols.

Add a Mrib entry to all user-level protocols that are interested in receiving MRIB messages.

Parameters:
mribthe Mrib entry to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  send_delete_mrib (const Mrib& mrib)

send_delete_mrib

Delete a Mrib entry from user-level protocols.

Delete a Mrib entry from all user-level protocols that are interested in receiving MRIB messages.

Parameters:
mribthe Mrib entry to delete.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  send_set_mrib_done ()

send_set_mrib_done

Complete a transaction of add/delete Mrib entries.

Complete a transaction of add/delete Mrib entries with all user-level protocols that are interested in receiving MRIB messages.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  send_add_mrib (const string& dst_module_instance_name, xorp_module_id dst_module_id, const Mrib& mrib)

send_add_mrib

[pure virtual]

Add a Mrib entry to an user-level protocol.

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

Parameters:
dst_module_instance_namethe module instance name of the module-recepient of the message.
dst_module_idthe module ID (xorp_module_id) of the module-recepient of the message.
mribthe Mrib entry to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  send_delete_mrib (const string& dst_module_instance_name, xorp_module_id dst_module_id, const Mrib& mrib)

send_delete_mrib

[pure virtual]

Delete a Mrib entry from an user-level protocol.

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

Parameters:
dst_module_instance_namethe module instance name of the module-recepient of the message.
dst_module_idthe module ID (xorp_module_id) of the module-recepient of the message.
mribthe Mrib entry to delete.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  send_set_mrib_done (const string& dst_module_instance_name, xorp_module_id dst_module_id)

send_set_mrib_done

[pure virtual]

Signal completion of a transaction of add/delete Mrib entries to an user-level protocol.

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

Parameters:
dst_module_instance_namethe module instance name of the module-recepient of the message.
dst_module_idthe module ID (xorp_module_id) of the module-recepient of the message.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  proto_recv (const string& src_module_instance_name, xorp_module_id src_module_id, uint16_t vif_index, const IPvX& src, const IPvX& dst, int ip_ttl, int ip_tos, bool router_alert_bool, const uint8_t *rcvbuf, size_t rcvlen)

proto_recv

Receive a protocol message from an user-level protocol.

Parameters:
src_module_instance_namethe module instance name of the module-origin of the message.
src_module_idthe module ID (xorp_module_id) of the module-origin of the message.
vif_indexthe vif index of the interface used to receive this message.
srcthe source address of the message.
dstthe destination address of the message.
ip_ttlthe IP TTL of the message. If it has a negative value, the TTL will be set by the lower layers (including the MFEA).
ip_tosthe IP TOS of the message. If it has a negative value, the TOS will be set by the lower layers (including the MFEA).
router_alert_boolif true, set the Router Alert IP option for the IP packet of the outgoung message.
rcvbufthe data buffer with the received message.
rcvlenthe data length in rcvbuf.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoNode.

int  proto_comm_recv (xorp_module_id dst_module_id, uint16_t vif_index, const IPvX& src, const IPvX& dst, int ip_ttl, int ip_tos, bool router_alert_bool, const uint8_t *rcvbuf, size_t rcvlen)

proto_comm_recv

Process an incoming message from the kernel.

This method sends the protocol message to an user-level protocol module. Note: it uses the pure virtual ProtoNode::proto_send() method that is implemented somewhere else (at a class that inherits this one).

Parameters:
dst_module_idthe module ID (xorp_module_id) of the module-recepient of the message.
vif_indexthe vif index of the interface used to receive this message.
srcthe source address of the message.
dstthe destination address of the message.
ip_ttlthe IP TTL (Time To Live) of the message. If it has a negative value, it should be ignored.
ip_tosthe IP TOS (Type of Service) of the message. If it has a negative value, it should be ignored.
router_alert_boolif true, the Router Alert IP option for the IP packet of the incoming message was set.
rcvbufthe data buffer with the received message.
rcvlenthe data length in rcvbuf.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  signal_message_recv (const string& src_module_instance_name, xorp_module_id src_module_id, int message_type, uint16_t vif_index, const IPvX& src, const IPvX& dst, const uint8_t *rcvbuf, size_t rcvlen)

signal_message_recv

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

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


#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:
src_module_instance_nameunused.
src_module_idthe xorp_module_id module ID of the associated ProtoComm entry. Note: in the future it may become irrelevant.
message_typethe message type of the kernel signal (for IPv4 and IPv6 respectively):
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.

Reimplemented from ProtoNode.

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)

signal_dataflow_message_recv

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

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.

int  dataflow_signal_send (const string& dst_module_instance_name, xorp_module_id dst_module_id, 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)

dataflow_signal_send

[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.
dst_module_idthe module ID (xorp_module_id) 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.

int  join_multicast_group (const string& module_instance_name, xorp_module_id module_id, uint16_t vif_index, const IPvX& group)

join_multicast_group

Join a multicast group.

Parameters:
module_instance_namethe module instance name of the protocol to join the multicast group.
module_idthe module ID (xorp_module_id) of the protocol to join the multicast group.
vif_indexthe vif index of the interface to join.
groupthe multicast group to join.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  leave_multicast_group (const string& module_instance_name, xorp_module_id module_id, uint16_t vif_index, const IPvX& group)

leave_multicast_group

Leave a multicast group.

Parameters:
module_instance_namethe module instance name of the protocol to leave the multicast group.
module_idthe module ID (xorp_module_id) of the protocol to leave the multicast group.
vif_indexthe vif index of the interface to leave.
groupthe multicast group to leave.

Returns: XORP_OK on success, otherwise XORP_ERROR.

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

add_mfc

Add Multicast Forwarding Cache (MFC) to the kernel.

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.

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

delete_mfc

Delete Multicast Forwarding Cache (MFC) from the kernel.

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.

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)

add_dataflow_monitor

Add a 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 "<=".

Returns: XORP_OK on success, otherwise XORP_ERROR.

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)

delete_dataflow_monitor

Delete a 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 "<=".

Returns: XORP_OK on success, otherwise XORP_ERROR.

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

delete_all_dataflow_monitor

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

Parameters:
module_instance_namethe module instance name of the protocol that deletes the dataflow monitor entry.
sourcethe source address.
groupthe group address.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  add_multicast_vif (uint16_t vif_index)

add_multicast_vif

Add a multicast vif to the kernel.

Parameters:
vif_indexthe vif index of the interface to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_multicast_vif (uint16_t vif_index)

delete_multicast_vif

Delete a multicast vif from the kernel.

Parameters:
vif_indexthe vif index of the interface to delete.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  get_sg_count (const IPvX& source, const IPvX& group, SgCount& sg_count)

get_sg_count

Get MFC multicast forwarding statistics from the kernel.

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.

int  get_vif_count (uint16_t vif_index, VifCount& vif_count)

get_vif_count

Get interface multicast forwarding statistics from the kernel.

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.

MribTable&  mrib_table ()

mrib_table

Get a reference to the local copy of the MRIB table (MribTable).

Returns: a reference to the local copy of the MRIB table (MribTable).

ConfigParam<uint32_t>&  mrib_table_default_metric_preference ()

mrib_table_default_metric_preference

Get a reference to the default metric preference for the MRIB table.

Note that this is a configurable parameter.

Returns: a reference to the default metric preference for the MRIB table.

int  set_mrib_table_default_metric_preference (uint32_t metric_preference)

set_mrib_table_default_metric_preference

Set the default metric preference for the MRIB table.

Parameters:
metric_preferencethe new value for the default metric preference.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  reset_mrib_table_default_metric_preference ()

reset_mrib_table_default_metric_preference

Reset the default metric preference for the MRIB table to its original value.

Returns: XORP_OK on success, otherwise XORP_ERROR.

ConfigParam<uint32_t>&  mrib_table_default_metric ()

mrib_table_default_metric

Get a reference to the default metric for the MRIB table.

Note that this is a configurable parameter.

Returns: a reference to the default metric for the MRIB table.

int  set_mrib_table_default_metric (uint32_t metric)

set_mrib_table_default_metric

Set the default metric for the MRIB table.

Parameters:
metricthe new value for the default metric.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  reset_mrib_table_default_metric ()

reset_mrib_table_default_metric

Reset the default metric for the MRIB table to its original value.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  get_mrib_table (Mrib **mrib_table)

get_mrib_table

Get a copy of the kernel MRIB (Mrib) information.

Parameters:
mrib_tablea pointer to the routing table array composed of Mrib elements.

Returns: The number of entries in mrib_table, or XORP_ERROR if there was an error.

MfeaMrouter&  mfea_mrouter ()

mfea_mrouter

Get a reference to the mrouter (MfeaMrouter).

Returns: a reference to the mrouter (MfeaMrouter).

MfeaDft&  mfea_dft ()

mfea_dft

Get a reference to the dataflow table (MfeaDft).

Returns: a reference to the dataflow table (MfeaDft).

vector<ProtoComm *>&  proto_comms ()

proto_comms

Get a reference to the vector-array of installed ProtoComm entries.

Returns: a reference to the vector-array of installed ProtoComm entries.

ProtoCommproto_comm_find_by_module_id (xorp_module_id module_id)

proto_comm_find_by_module_id

[const]

Find an ProtoComm entry for a given module ID (xorp_module_id).

Parameters:
module_idthe module ID (xorp_module_id) to search for.

Returns: the corresponding ProtoComm entry if found, otherwise NULL.

ProtoCommproto_comm_find_by_ipproto (int ipproto)

proto_comm_find_by_ipproto

[const]

Find an ProtoComm entry for a given IP protocol number.

Parameters:
ipprotothe IP protocol number ot search for.

Returns: the corresponding ProtoComm entry if found, otherwise NULL.

bool  is_log_trace ()

is_log_trace

[const]

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.

void  set_log_trace (bool is_enabled)

set_log_trace

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.


Generated by: pavlin on possum.icir.org on Thu Aug 28 12:52:10 2003, using kdoc 2.0a54+XORP.