xorp

PimNode Class Reference

The PIM node class. More...

#include <pim_node.hh>

Inheritance diagram for PimNode:
ProtoNode< PimVif > IfMgrHintObserver ServiceChangeObserverBase ProtoUnit ProtoState ServiceBase BugCatcher XrlPimNode

List of all members.

Public Member Functions

 PimNode (int family, xorp_module_id module_id, EventLoop &eventloop)
 Constructor for a given address family, module ID, and event loop.
virtual ~PimNode ()
 Destructor.
virtual void destruct_me ()
 Does manual destruction work.
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.
uint8_t ip_protocol_number () const
 Get the IP protocol number.
int add_vif (const Vif &vif, string &error_msg)
 Install a new PIM vif.
int add_vif (const string &vif_name, uint32_t vif_index, string &error_msg)
 Install a new PIM vif.
int delete_vif (const string &vif_name, string &error_msg)
 Delete an existing PIM vif.
int set_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 flags to a vif.
int add_vif_addr (const string &vif_name, const IPvX &addr, const IPvXNet &subnet_addr, const IPvX &broadcast_addr, const IPvX &peer_addr, bool &should_send_pim_hello, string &error_msg)
 Add a new address to a vif, or update an existing address.
int delete_vif_addr (const string &vif_name, const IPvX &addr, bool &should_send_pim_hello, string &error_msg)
 Delete an address from a vif.
int enable_vif (const string &vif_name, string &error_msg)
 Enable an existing PIM vif.
int disable_vif (const string &vif_name, string &error_msg)
 Disable an existing PIM vif.
int start_vif (const string &vif_name, string &error_msg)
 Start an existing PIM vif.
int stop_vif (const string &vif_name, string &error_msg)
 Stop an existing PIM vif.
int start_all_vifs ()
 Start PIM on all enabled interfaces.
int stop_all_vifs ()
 Stop PIM on all interfaces it was running on.
int enable_all_vifs ()
 Enable PIM on all interfaces.
int disable_all_vifs ()
 Disable PIM on all interfaces.
void delete_all_vifs ()
 Delete all PIM vifs.
void vif_shutdown_completed (const string &vif_name)
 A method called when a vif has completed its shutdown.
int proto_recv (const string &if_name, const string &vif_name, const IPvX &src_address, const IPvX &dst_address, uint8_t ip_protocol, int32_t ip_ttl, int32_t ip_tos, bool ip_router_alert, bool ip_internet_control, const vector< uint8_t > &payload, string &error_msg)
 Receive a protocol packet.
int pim_send (const string &if_name, const string &vif_name, const IPvX &src_address, const IPvX &dst_address, uint8_t ip_protocol, int32_t ip_ttl, int32_t ip_tos, bool ip_router_alert, bool ip_internet_control, buffer_t *buffer, string &error_msg)
 Send a protocol packet.
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)
 Receive a signal message from the kernel.
int signal_message_send (const string &, int, uint32_t, const IPvX &, const IPvX &, const uint8_t *, size_t)
 Send signal message: not used by PIM.
virtual int register_receiver (const string &if_name, const string &vif_name, uint8_t ip_protocol, bool enable_multicast_loopback)=0
 Register as a receiver to receive packets.
virtual int unregister_receiver (const string &if_name, const string &vif_name, uint8_t ip_protocol)=0
 Unregister as a receiver to receive packets.
virtual int register_protocol (const string &if_name, const string &vif_name, uint8_t ip_protocol)=0
 Register a protocol on an interface in the Multicast FEA.
virtual int unregister_protocol (const string &if_name, const string &vif_name)=0
 Unregister a protocol on an interface in the Multicast FEA.
virtual int join_multicast_group (const string &if_name, const string &vif_name, uint8_t ip_protocol, const IPvX &group_address)=0
 Join a multicast group on an interface.
virtual int leave_multicast_group (const string &if_name, const string &vif_name, uint8_t ip_protocol, const IPvX &group_address)=0
 Leave a multicast group on an interface.
virtual int add_mfc_to_kernel (const PimMfc &pim_mfc)=0
 Add a Multicast Forwarding Cache to the kernel.
virtual int delete_mfc_from_kernel (const PimMfc &pim_mfc)=0
 Delete a Multicast Forwarding Cache to the kernel.
virtual int add_dataflow_monitor (const IPvX &source_addr, const IPvX &group_addr, uint32_t threshold_interval_sec, uint32_t threshold_interval_usec, 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)=0
 Add a dataflow monitor to the MFEA.
virtual int delete_dataflow_monitor (const IPvX &source_addr, const IPvX &group_addr, uint32_t threshold_interval_sec, uint32_t threshold_interval_usec, 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)=0
 Delete a dataflow monitor from the MFEA.
virtual int delete_all_dataflow_monitor (const IPvX &source_addr, const IPvX &group_addr)=0
 Delete all dataflow monitors for a given source and group address from the MFEA.
virtual int add_protocol_mld6igmp (uint32_t vif_index)=0
 Register this protocol with the MLD/IGMP module.
virtual int delete_protocol_mld6igmp (uint32_t vif_index)=0
 Deregister this protocol with the MLD/IGMP module.
int add_membership (uint32_t vif_index, const IPvX &source, const IPvX &group)
 Receive "add membership" from the MLD/IGMP module.
int delete_membership (uint32_t vif_index, const IPvX &source, const IPvX &group)
 Receive "delete membership" from the MLD/IGMP module.
bool is_directly_connected (const PimVif &pim_vif, const IPvX &ipaddr_test) const
 Test if an address is directly connected to a specified virtual interface.
PimVifvif_find_pim_register () const
 Get the PIM-Register virtual interface.
uint32_t pim_register_vif_index () const
 Get the vif index of the PIM-Register virtual interface.
PimMrtpim_mrt ()
 Get the PIM Multicast Routing Table.
PimMribTablepim_mrib_table ()
 Get the table with the Multicast Routing Information Base used by PIM.
PimBsrpim_bsr ()
 Get the PIM Bootstrap entity.
RpTablerp_table ()
 Get the PIM RP table.
PimScopeZoneTablepim_scope_zone_table ()
 Get the PIM Scope-Zone table.
Mifset & pim_vifs_dr ()
 Get the set of vifs for which this PIM note is a Designated Router.
void set_pim_vifs_dr (uint32_t vif_index, bool v)
 Set/reset a virtual interface as a Designated Router.
PimVifpim_vif_rpf_find (const IPvX &dst_addr)
 Find the RPF virtual interface for a given destination address.
PimNbrpim_nbr_rpf_find (const IPvX &dst_addr)
 Find the RPF PIM neighbor for a given destination address.
PimNbrpim_nbr_rpf_find (const IPvX &dst_addr, const Mrib *mrib)
 Find the RPF PIM neighbor for a given destination address, and already known Mrib entry.
PimNbrpim_nbr_find_global (const IPvX &nbr_addr)
 Find a PIM neighbor by its address.
void enable_bsr ()
 Enable the PIM Bootstrap mechanism.
void disable_bsr ()
 Disable the PIM Bootstrap mechanism.
int start_bsr ()
 Start the Bootstrap mechanism.
int stop_bsr ()
 Stop the Bootstrap mechanism.
int apply_bsr_changes (string &error_msg)
 Apply BSR configuration changes.
int set_config_all_vifs_done (string &error_msg)
 Complete the set of vif configuration changes.
int get_vif_proto_version (const string &vif_name, int &proto_version, string &error_msg)
 Get the protocol version on an interface.
int set_vif_proto_version (const string &vif_name, int proto_version, string &error_msg)
 Set the protocol version on an interface.
int reset_vif_proto_version (const string &vif_name, string &error_msg)
 Reset the protocol version on an interface to its default value.
int get_vif_hello_triggered_delay (const string &vif_name, uint16_t &hello_triggered_delay, string &error_msg)
int set_vif_hello_triggered_delay (const string &vif_name, uint16_t hello_triggered_delay, string &error_msg)
int reset_vif_hello_triggered_delay (const string &vif_name, string &error_msg)
int get_vif_hello_period (const string &vif_name, uint16_t &hello_period, string &error_msg)
int set_vif_hello_period (const string &vif_name, uint16_t hello_period, string &error_msg)
int reset_vif_hello_period (const string &vif_name, string &error_msg)
int get_vif_hello_holdtime (const string &vif_name, uint16_t &hello_holdtime, string &error_msg)
int set_vif_hello_holdtime (const string &vif_name, uint16_t hello_holdtime, string &error_msg)
int reset_vif_hello_holdtime (const string &vif_name, string &error_msg)
int get_vif_dr_priority (const string &vif_name, uint32_t &dr_priority, string &error_msg)
int set_vif_dr_priority (const string &vif_name, uint32_t dr_priority, string &error_msg)
int reset_vif_dr_priority (const string &vif_name, string &error_msg)
int get_vif_propagation_delay (const string &vif_name, uint16_t &propagation_delay, string &error_msg)
int set_vif_propagation_delay (const string &vif_name, uint16_t propagation_delay, string &error_msg)
int reset_vif_propagation_delay (const string &vif_name, string &error_msg)
int get_vif_override_interval (const string &vif_name, uint16_t &override_interval, string &error_msg)
int set_vif_override_interval (const string &vif_name, uint16_t override_interval, string &error_msg)
int reset_vif_override_interval (const string &vif_name, string &error_msg)
int get_vif_is_tracking_support_disabled (const string &vif_name, bool &is_tracking_support_disabled, string &error_msg)
int set_vif_is_tracking_support_disabled (const string &vif_name, bool is_tracking_support_disabled, string &error_msg)
int reset_vif_is_tracking_support_disabled (const string &vif_name, string &error_msg)
int get_vif_accept_nohello_neighbors (const string &vif_name, bool &accept_nohello_neighbors, string &error_msg)
int set_vif_accept_nohello_neighbors (const string &vif_name, bool accept_nohello_neighbors, string &error_msg)
int reset_vif_accept_nohello_neighbors (const string &vif_name, string &error_msg)
int get_vif_join_prune_period (const string &vif_name, uint16_t &join_prune_period, string &error_msg)
int set_vif_join_prune_period (const string &vif_name, uint16_t join_prune_period, string &error_msg)
int reset_vif_join_prune_period (const string &vif_name, string &error_msg)
int get_switch_to_spt_threshold (bool &is_enabled, uint32_t &interval_sec, uint32_t &bytes, string &error_msg)
int set_switch_to_spt_threshold (bool is_enabled, uint32_t interval_sec, uint32_t bytes, string &error_msg)
int reset_switch_to_spt_threshold (string &error_msg)
int add_config_scope_zone_by_vif_name (const IPvXNet &scope_zone_id, const string &vif_name, string &error_msg)
int add_config_scope_zone_by_vif_addr (const IPvXNet &scope_zone_id, const IPvX &vif_addr, string &error_msg)
int delete_config_scope_zone_by_vif_name (const IPvXNet &scope_zone_id, const string &vif_name, string &error_msg)
int delete_config_scope_zone_by_vif_addr (const IPvXNet &scope_zone_id, const IPvX &vif_addr, string &error_msg)
int add_config_cand_bsr (const IPvXNet &scope_zone_id, bool is_scope_zone, const string &vif_name, const IPvX &vif_addr, uint8_t bsr_priority, uint8_t hash_mask_len, string &error_msg)
int delete_config_cand_bsr (const IPvXNet &scope_zone_id, bool is_scope_zone, string &error_msg)
int add_config_cand_rp (const IPvXNet &group_prefix, bool is_scope_zone, const string &vif_name, const IPvX &vif_addr, uint8_t rp_priority, uint16_t rp_holdtime, string &error_msg)
int delete_config_cand_rp (const IPvXNet &group_prefix, bool is_scope_zone, const string &vif_name, const IPvX &vif_addr, string &error_msg)
int add_config_static_rp (const IPvXNet &group_prefix, const IPvX &rp_addr, uint8_t rp_priority, uint8_t hash_mask_len, string &error_msg)
int delete_config_static_rp (const IPvXNet &group_prefix, const IPvX &rp_addr, string &error_msg)
int delete_config_all_static_group_prefixes_rp (const IPvX &rp_addr, string &error_msg)
int delete_config_all_static_rps (string &error_msg)
int config_static_rp_done (string &error_msg)
int add_alternative_subnet (const string &vif_name, const IPvXNet &subnet, string &error_msg)
int delete_alternative_subnet (const string &vif_name, const IPvXNet &subnet, string &error_msg)
int remove_all_alternative_subnets (const string &vif_name, string &error_msg)
bool is_log_trace () const
 Test if trace log is enabled.
void set_log_trace (bool is_enabled)
 Enable/disable trace log.
int add_test_jp_entry (const IPvX &source_addr, const IPvX &group_addr, uint8_t group_mask_len, mrt_entry_type_t mrt_entry_type, action_jp_t action_jp, uint16_t holdtime, bool is_new_group)
int send_test_jp_entry (const string &vif_name, const IPvX &nbr_addr, string &error_msg)
int send_test_assert (const string &vif_name, const IPvX &source_addr, const IPvX &group_addr, bool rpt_bit, uint32_t metric_preference, uint32_t metric, string &error_msg)
int add_test_bsr_zone (const PimScopeZoneId &zone_id, const IPvX &bsr_addr, uint8_t bsr_priority, uint8_t hash_mask_len, uint16_t fragment_tag)
int add_test_bsr_group_prefix (const PimScopeZoneId &zone_id, const IPvXNet &group_prefix, bool is_scope_zone, uint8_t expected_rp_count)
int add_test_bsr_rp (const PimScopeZoneId &zone_id, const IPvXNet &group_prefix, const IPvX &rp_addr, uint8_t rp_priority, uint16_t rp_holdtime)
int send_test_bootstrap (const string &vif_name, string &error_msg)
int send_test_bootstrap_by_dest (const string &vif_name, const IPvX &dest_addr, string &error_msg)
int send_test_cand_rp_adv ()
void add_pim_mre_no_pim_nbr (PimMre *pim_mre)
void delete_pim_mre_no_pim_nbr (PimMre *pim_mre)
list< PimNbr * > & processing_pim_nbr_list ()
void init_processing_pim_mre_rp (uint32_t vif_index, const IPvX &pim_nbr_addr)
void init_processing_pim_mre_wc (uint32_t vif_index, const IPvX &pim_nbr_addr)
void init_processing_pim_mre_sg (uint32_t vif_index, const IPvX &pim_nbr_addr)
void init_processing_pim_mre_sg_rpt (uint32_t vif_index, const IPvX &pim_nbr_addr)
PimNbrfind_processing_pim_mre_rp (uint32_t vif_index, const IPvX &pim_nbr_addr)
PimNbrfind_processing_pim_mre_wc (uint32_t vif_index, const IPvX &pim_nbr_addr)
PimNbrfind_processing_pim_mre_sg (uint32_t vif_index, const IPvX &pim_nbr_addr)
PimNbrfind_processing_pim_mre_sg_rpt (uint32_t vif_index, const IPvX &pim_nbr_addr)
ConfigParam< bool > & is_switch_to_spt_enabled ()
ConfigParam< uint32_t > & switch_to_spt_threshold_interval_sec ()
ConfigParam< uint32_t > & switch_to_spt_threshold_bytes ()
void clear_pim_statistics ()
int clear_pim_statistics_per_vif (const string &vif_name, string &error_msg)
uint32_t pimstat_hello_messages_received () const
uint32_t pimstat_hello_messages_sent () const
uint32_t pimstat_hello_messages_rx_errors () const
uint32_t pimstat_register_messages_received () const
uint32_t pimstat_register_messages_sent () const
uint32_t pimstat_register_messages_rx_errors () const
uint32_t pimstat_register_stop_messages_received () const
uint32_t pimstat_register_stop_messages_sent () const
uint32_t pimstat_register_stop_messages_rx_errors () const
uint32_t pimstat_join_prune_messages_received () const
uint32_t pimstat_join_prune_messages_sent () const
uint32_t pimstat_join_prune_messages_rx_errors () const
uint32_t pimstat_bootstrap_messages_received () const
uint32_t pimstat_bootstrap_messages_sent () const
uint32_t pimstat_bootstrap_messages_rx_errors () const
uint32_t pimstat_assert_messages_received () const
uint32_t pimstat_assert_messages_sent () const
uint32_t pimstat_assert_messages_rx_errors () const
uint32_t pimstat_graft_messages_received () const
uint32_t pimstat_graft_messages_sent () const
uint32_t pimstat_graft_messages_rx_errors () const
uint32_t pimstat_graft_ack_messages_received () const
uint32_t pimstat_graft_ack_messages_sent () const
uint32_t pimstat_graft_ack_messages_rx_errors () const
uint32_t pimstat_candidate_rp_messages_received () const
uint32_t pimstat_candidate_rp_messages_sent () const
uint32_t pimstat_candidate_rp_messages_rx_errors () const
uint32_t pimstat_unknown_type_messages () const
uint32_t pimstat_unknown_version_messages () const
uint32_t pimstat_neighbor_unknown_messages () const
uint32_t pimstat_bad_length_messages () const
uint32_t pimstat_bad_checksum_messages () const
uint32_t pimstat_bad_receive_interface_messages () const
uint32_t pimstat_rx_interface_disabled_messages () const
uint32_t pimstat_rx_register_not_rp () const
uint32_t pimstat_rp_filtered_source () const
uint32_t pimstat_unknown_register_stop () const
uint32_t pimstat_rx_join_prune_no_state () const
uint32_t pimstat_rx_graft_graft_ack_no_state () const
uint32_t pimstat_rx_graft_on_upstream_interface () const
uint32_t pimstat_rx_candidate_rp_not_bsr () const
uint32_t pimstat_rx_bsr_when_bsr () const
uint32_t pimstat_rx_bsr_not_rpf_interface () const
uint32_t pimstat_rx_unknown_hello_option () const
uint32_t pimstat_rx_data_no_state () const
uint32_t pimstat_rx_rp_no_state () const
uint32_t pimstat_rx_aggregate () const
uint32_t pimstat_rx_malformed_packet () const
uint32_t pimstat_no_rp () const
uint32_t pimstat_no_route_upstream () const
uint32_t pimstat_rp_mismatch () const
uint32_t pimstat_rpf_neighbor_unknown () const
uint32_t pimstat_rx_join_rp () const
uint32_t pimstat_rx_prune_rp () const
uint32_t pimstat_rx_join_wc () const
uint32_t pimstat_rx_prune_wc () const
uint32_t pimstat_rx_join_sg () const
uint32_t pimstat_rx_prune_sg () const
uint32_t pimstat_rx_join_sg_rpt () const
uint32_t pimstat_rx_prune_sg_rpt () const
int pimstat_hello_messages_received_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_hello_messages_sent_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_hello_messages_rx_errors_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_register_messages_received_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_register_messages_sent_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_register_messages_rx_errors_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_register_stop_messages_received_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_register_stop_messages_sent_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_register_stop_messages_rx_errors_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_join_prune_messages_received_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_join_prune_messages_sent_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_join_prune_messages_rx_errors_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_bootstrap_messages_received_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_bootstrap_messages_sent_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_bootstrap_messages_rx_errors_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_assert_messages_received_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_assert_messages_sent_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_assert_messages_rx_errors_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_graft_messages_received_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_graft_messages_sent_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_graft_messages_rx_errors_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_graft_ack_messages_received_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_graft_ack_messages_sent_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_graft_ack_messages_rx_errors_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_candidate_rp_messages_received_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_candidate_rp_messages_sent_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_candidate_rp_messages_rx_errors_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_unknown_type_messages_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_unknown_version_messages_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_neighbor_unknown_messages_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_bad_length_messages_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_bad_checksum_messages_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_bad_receive_interface_messages_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_interface_disabled_messages_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_register_not_rp_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rp_filtered_source_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_unknown_register_stop_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_join_prune_no_state_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_graft_graft_ack_no_state_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_graft_on_upstream_interface_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_candidate_rp_not_bsr_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_bsr_when_bsr_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_bsr_not_rpf_interface_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_unknown_hello_option_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_data_no_state_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_rp_no_state_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_aggregate_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_malformed_packet_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_no_rp_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_no_route_upstream_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rp_mismatch_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rpf_neighbor_unknown_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_join_rp_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_prune_rp_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_join_wc_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_prune_wc_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_join_sg_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_prune_sg_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_join_sg_rpt_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const
int pimstat_rx_prune_sg_rpt_per_vif (const string &vif_name, uint32_t &result, string &error_msg) const

Protected Member Functions

void tree_complete ()
void updates_made ()

Private Member Functions

void status_change (ServiceBase *service, ServiceStatus old_status, ServiceStatus new_status)
 A method invoked when the status of a service changes.
virtual const ServiceBaseifmgr_mirror_service_base () const =0
 Get a reference to the service base of the interface manager.
virtual const IfMgrIfTreeifmgr_iftree () const =0
 Get a reference to the interface manager tree.
virtual void fea_register_startup ()=0
 Initiate registration with the FEA.
virtual void mfea_register_startup ()=0
 Initiate registration with the MFEA.
virtual void rib_register_startup ()=0
 Initiate registration with the RIB.
virtual void fea_register_shutdown ()=0
 Initiate de-registration with the FEA.
virtual void mfea_register_shutdown ()=0
 Initiate de-registration with the MFEA.
virtual void rib_register_shutdown ()=0
 Initiate de-registration with the RIB.

Private Attributes

PimMrt _pim_mrt
PimMribTable _pim_mrib_table
RpTable _rp_table
PimScopeZoneTable _pim_scope_zone_table
PimBsr _pim_bsr
uint32_t _pim_register_vif_index
Mifset _pim_vifs_dr
buffer_t_buffer_recv
list< PimNbr * > _processing_pim_nbr_list
ConfigParam< bool > _is_switch_to_spt_enabled
ConfigParam< uint32_t > _switch_to_spt_threshold_interval_sec
ConfigParam< uint32_t > _switch_to_spt_threshold_bytes
IfMgrIfTree _iftree
bool _is_log_trace
list< PimJpHeader_test_jp_headers_list

Detailed Description

The PIM node class.

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


Constructor & Destructor Documentation

PimNode::PimNode ( int  family,
xorp_module_id  module_id,
EventLoop eventloop 
)

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

PimNode::PimNode: : The address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).

Parameters:
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
module_idthe module ID (xorp_module_id). Should be XORP_MODULE_PIMSM Note: if/after PIM-DM is implemented, XORP_MODULE_PIMDM would be allowed as well.
eventloopthe event loop to use.

: The module ID (must be either XORP_MODULE_PIMSM or XORP_MODULE_PIMDM). TODO: XXX: XORP_MODULE_PIMDM is not implemented yet. : The event loop.

PIM node constructor.

PimNode::~PimNode ( ) [virtual]

Destructor.

PimNode::~PimNode: @:

PIM node destructor.


Member Function Documentation

virtual int PimNode::add_dataflow_monitor ( const IPvX source_addr,
const IPvX group_addr,
uint32_t  threshold_interval_sec,
uint32_t  threshold_interval_usec,
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 
) [pure virtual]

Add a dataflow monitor to the MFEA.

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:
sourcethe source address.
groupthe group address.
threshold_interval_secthe dataflow threshold interval (seconds).
threshold_interval_usecthe dataflow threshold interval (microseconds).
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.

Implemented in XrlPimNode.

int PimNode::add_membership ( uint32_t  vif_index,
const IPvX source,
const IPvX group 
)

Receive "add membership" from the MLD/IGMP module.

PimNode::add_membership: : The vif_index of the interface to add membership.

Parameters:
vif_indexthe vif index of the interface with membership change.
sourcethe source address of the (S,G) or (*,G) entry that has changed membership. In case of Any-Source Multicast, it is IPvX::ZERO().
groupthe group address.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The source address to add membership for (IPvX::ZERO() for IGMPv1,2 and MLDv1). : The group address to add membership for.

Add multicast membership on vif with vif_index of for source address of and group address of .

Return value: XORP_OK on success, otherwise XORP_ERROR.

virtual int PimNode::add_mfc_to_kernel ( const PimMfc pim_mfc) [pure virtual]

Add a Multicast Forwarding Cache to the kernel.

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

Parameters:
pim_mfcthe PimMfc entry to add.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlPimNode.

virtual int PimNode::add_protocol_mld6igmp ( uint32_t  vif_index) [pure virtual]

Register this protocol with the MLD/IGMP module.

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

By registering this protocol with the MLD/IGMP module, it will be notified about multicast group membership events.

Parameters:
vif_indexthe vif index of the interface to register with the MLD/IGMP module.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlPimNode.

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

Install a new PIM vif.

PimNode::add_vif: : Information about the new PimVif to install.

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

: The error message (if error).

Install a new PIM vif.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimNode::add_vif ( const string &  vif_name,
uint32_t  vif_index,
string &  error_msg 
)

Install a new PIM vif.

PimNode::add_vif: : The name of the new vif.

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

: The vif index of the new vif. : The error message (if error).

Install a new PIM vif. If the vif exists, nothing is installed.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimNode::add_vif_addr ( const string &  vif_name,
const IPvX addr,
const IPvXNet subnet_addr,
const IPvX broadcast_addr,
const IPvX peer_addr,
bool &  should_send_pim_hello,
string &  error_msg 
)

Add a new address to a vif, or update an existing address.

Parameters:
vif_namethe name of the vif.
addrthe unicast address to add.
subnet_addrthe subnet address to add.
broadcast_addrthe broadcast address (when applicable).
peer_addrthe peer address (when applicable).
should_send_pim_helloa return-by-reference flag that is set to true if the caller should send a PIM Hello message.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int PimNode::apply_bsr_changes ( string &  error_msg) [inline]

Apply BSR configuration changes.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
virtual int PimNode::delete_all_dataflow_monitor ( const IPvX source_addr,
const IPvX group_addr 
) [pure virtual]

Delete all dataflow monitors for a given source and group address from the MFEA.

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

Parameters:
source_addrthe source address.
group_addrthe group address.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlPimNode.

void PimNode::delete_all_vifs ( )

Delete all PIM vifs.

PimNode::delete_all_vifs: @:

virtual int PimNode::delete_dataflow_monitor ( const IPvX source_addr,
const IPvX group_addr,
uint32_t  threshold_interval_sec,
uint32_t  threshold_interval_usec,
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 
) [pure virtual]

Delete a dataflow monitor from the MFEA.

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:
sourcethe source address.
groupthe group address.
threshold_interval_secthe dataflow threshold interval (seconds).
threshold_interval_usecthe dataflow threshold interval (microseconds).
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.

Implemented in XrlPimNode.

int PimNode::delete_membership ( uint32_t  vif_index,
const IPvX source,
const IPvX group 
)

Receive "delete membership" from the MLD/IGMP module.

PimNode::delete_membership: : The vif_index of the interface to delete membership.

Parameters:
vif_indexthe vif index of the interface with membership change.
sourcethe source address of the (S,G) or (*,G) entry that has changed membership. In case of Any-Source Multicast, it is IPvX::ZERO().
groupthe group address.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The source address to delete membership for (IPvX::ZERO() for IGMPv1,2 and MLDv1). : The group address to delete membership for.

Delete multicast membership on vif with vif_index of for source address of and group address of .

Return value: XORP_OK on success, otherwise XORP_ERROR.

virtual int PimNode::delete_mfc_from_kernel ( const PimMfc pim_mfc) [pure virtual]

Delete a Multicast Forwarding Cache to the kernel.

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

Parameters:
pim_mfcthe PimMfc entry to delete.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlPimNode.

virtual int PimNode::delete_protocol_mld6igmp ( uint32_t  vif_index) [pure virtual]

Deregister this protocol with the MLD/IGMP module.

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

Parameters:
vif_indexthe vif index of the interface to deregister with the MLD/IGMP module.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlPimNode.

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

Delete an existing PIM vif.

PimNode::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 PIM vif.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimNode::delete_vif_addr ( const string &  vif_name,
const IPvX addr,
bool &  should_send_pim_hello,
string &  error_msg 
)

Delete an address from a vif.

Parameters:
vif_namethe name of the vif.
addrthe unicast address to delete.
should_send_pim_helloa return-by-reference flag that is set to true if the caller should send a PIM Hello message.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
void PimNode::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 PimNode::disable_all_vifs ( )

Disable PIM on all interfaces.

PimNode::disable_all_vifs: @:

Returns:
XORP_OK on success, otherwise XORP_ERROR.

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

Return value: XORP_OK on success, otherwise XORP_ERROR.

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

Disable an existing PIM vif.

PimNode::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 PIM vif.

Return value: XORP_OK on success, otherwise XORP_ERROR.

void PimNode::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 PimNode::enable_all_vifs ( )

Enable PIM on all interfaces.

PimNode::enable_all_vifs: @:

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Enable PIM on all interfaces.

Return value: XORP_OK on success, otherwise XORP_ERROR.

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

Enable an existing PIM vif.

PimNode::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 PIM vif.

Return value: XORP_OK on success, otherwise XORP_ERROR.

virtual void PimNode::fea_register_shutdown ( ) [private, pure virtual]

Initiate de-registration with the FEA.

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

Implemented in XrlPimNode.

virtual void PimNode::fea_register_startup ( ) [private, pure virtual]

Initiate registration with the FEA.

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

Implemented in XrlPimNode.

int PimNode::final_start ( )

Completely start the node operation.

PimNode::final_start: @:

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

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Complete the start-up of the PIM protocol.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimNode::final_stop ( )

Completely stop the node operation.

PimNode::final_stop: @:

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

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Completely stop the PIM protocol.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimNode::get_vif_proto_version ( const string &  vif_name,
int &  proto_version,
string &  error_msg 
)

Get the protocol version on an interface.

Parameters:
vif_namethe name of the vif to get the protocol version of.
proto_versionthe return-by-reference protocol version.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
virtual const IfMgrIfTree& PimNode::ifmgr_iftree ( ) const [private, pure virtual]

Get a reference to the interface manager tree.

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

Returns:
a reference to the interface manager tree.

Implemented in XrlPimNode.

virtual const ServiceBase* PimNode::ifmgr_mirror_service_base ( ) const [private, pure virtual]

Get a reference to the service base of the interface manager.

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

Returns:
a reference to the service base of the interface manager.

Implemented in XrlPimNode.

uint8_t PimNode::ip_protocol_number ( ) const

Get the IP protocol number.

Returns:
the IP protocol number.
bool PimNode::is_directly_connected ( const PimVif pim_vif,
const IPvX ipaddr_test 
) const

Test if an address is directly connected to a specified virtual interface.

PimNode::is_directly_connected: : The virtual interface to test against.

Note that the virtual interface the address is directly connected to must be UP.

Parameters:
pim_vifthe virtual interface to test against.
ipaddr_testthe address to test.
Returns:
true if ipaddr_test is directly connected to vif, otherwise false.

: The address to test.

Note that the virtual interface the address is directly connected to must be UP.

Return value: True if is directly connected to , otherwise false.

bool PimNode::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.
virtual int PimNode::join_multicast_group ( const string &  if_name,
const string &  vif_name,
uint8_t  ip_protocol,
const IPvX group_address 
) [pure virtual]

Join a multicast group on an interface.

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

TODO: add a source address as well!!

Parameters:
if_namethe interface name to join.
vif_namethe vif name to join.
ip_protocolthe IP protocol number that the receiver is interested in.
group_addressthe multicast group address to join.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlPimNode.

virtual int PimNode::leave_multicast_group ( const string &  if_name,
const string &  vif_name,
uint8_t  ip_protocol,
const IPvX group_address 
) [pure virtual]

Leave a multicast group on an interface.

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

TODO: add a source address as well!!

Parameters:
if_namethe interface name to leave.
vif_namethe vif name to leave.
ip_protocolthe IP protocol number that the receiver is not interested in anymore.
group_addressthe multicast group address to leave.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlPimNode.

virtual void PimNode::mfea_register_shutdown ( ) [private, pure virtual]

Initiate de-registration with the MFEA.

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

Implemented in XrlPimNode.

virtual void PimNode::mfea_register_startup ( ) [private, pure virtual]

Initiate registration with the MFEA.

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

Implemented in XrlPimNode.

PimBsr& PimNode::pim_bsr ( ) [inline]

Get the PIM Bootstrap entity.

Returns:
a reference to the PIM Bootstrap entity (PimBsr).
PimMribTable& PimNode::pim_mrib_table ( ) [inline]

Get the table with the Multicast Routing Information Base used by PIM.

Returns:
a reference to the table with the Multicast Routing Information Base used by PIM (PimMribTable).
PimMrt& PimNode::pim_mrt ( ) [inline]

Get the PIM Multicast Routing Table.

Returns:
a reference to the PIM Multicast Routing Table (PimMrt).
PimNbr * PimNode::pim_nbr_find_global ( const IPvX nbr_addr)

Find a PIM neighbor by its address.

PimNode::pim_nbr_find_global: : The address of the neighbor to search for.

Note: this method should be used in very limited cases, because in case of IPv6 a neighbor's IP address may be non-unique within the PIM neighbor database due to scope issues.

Parameters:
nbr_addrthe address of the PIM neighbor.
Returns:
the PIM neighbor (PimNbr) if found, otherwise NULL.

Find a PIM neighbor by its address.

Note: this method should be used in very limited cases, because in case of IPv6 a neighbor's IP address may not be unique within the PIM neighbor database due to scope issues.

Return value: The PimNbr entry for the neighbor if found, otherwise NULL.

PimNbr * PimNode::pim_nbr_rpf_find ( const IPvX dst_addr)

Find the RPF PIM neighbor for a given destination address.

PimNode::pim_nbr_rpf_find: : The address of the destination to search for.

Parameters:
dst_addrthe destination address to lookup.
Returns:
the RPF PIM neighbor (PimNbr) toward dst_addr if found, otherwise NULL.

Find the RPF PIM neighbor for a destination address.

Return value: The PimNbr entry for the RPF neighbor to if found, otherwise NULL.

PimNbr * PimNode::pim_nbr_rpf_find ( const IPvX dst_addr,
const Mrib mrib 
)

Find the RPF PIM neighbor for a given destination address, and already known Mrib entry.

PimNode::pim_nbr_rpf_find: : The address of the destination to search for.

Parameters:
dst_addrthe destination address to lookup.
mribthe already known Mrib entry.
Returns:
the RPF PIM neighbor (PimNbr) toward dst_addr if found, otherwise NULL.

: The MRIB information that was lookup already.

Find the RPF PIM neighbor for a destination address by using the information in a pre-lookup MRIB.

Return value: The PimNbr entry for the RPF neighbor to if found, otherwise NULL.

uint32_t PimNode::pim_register_vif_index ( ) const [inline]

Get the vif index of the PIM-Register virtual interface.

Returns:
the vif index of the PIM-Register virtual interface if exists, otherwise Vif::VIF_INDEX_INVALID.
PimScopeZoneTable& PimNode::pim_scope_zone_table ( ) [inline]

Get the PIM Scope-Zone table.

Returns:
a reference to the PIM Scope-Zone table.
int PimNode::pim_send ( const string &  if_name,
const string &  vif_name,
const IPvX src_address,
const IPvX dst_address,
uint8_t  ip_protocol,
int32_t  ip_ttl,
int32_t  ip_tos,
bool  ip_router_alert,
bool  ip_internet_control,
buffer_t buffer,
string &  error_msg 
)

Send a protocol packet.

Parameters:
if_namethe interface to send the packet on. It is essential for multicast. In the unicast case this field may be empty.
vif_namethe vif to send the packet on. It is essential for multicast. In the unicast case this field may be empty.
src_addressthe IP source address.
dst_addressthe IP destination address.
ip_protocolthe IP protocol number. It must be between 1 and 255.
ip_ttlthe IP TTL (hop-limit). If it has a negative value, the TTL will be set internally before transmission.
ip_tosthe Type Of Service (Diffserv/ECN bits for IPv4). If it has a negative value, the TOS will be set internally before transmission.
ip_router_alertif true, then add the IP Router Alert option to the IP packet.
ip_internet_controlif true, then this is IP control traffic.
bufferthe data buffer with the packet to send.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
PimVif * PimNode::pim_vif_rpf_find ( const IPvX dst_addr)

Find the RPF virtual interface for a given destination address.

PimNode::pim_vif_rpf_find: : The address of the destination to search for.

Parameters:
dst_addrthe destination address to lookup.
Returns:
the RPF virtual interface (PimVif) toward dst_addr if found, otherwise NULL.

Find the RPF virtual interface for a destination address.

Return value: The PimVif entry for the RPF virtual interface to if found, otherwise NULL.

Mifset& PimNode::pim_vifs_dr ( ) [inline]

Get the set of vifs for which this PIM note is a Designated Router.

Returns:
the Mifset indicating the vifs for which this PIM node is a Designated Router.
int PimNode::proto_recv ( const string &  if_name,
const string &  vif_name,
const IPvX src_address,
const IPvX dst_address,
uint8_t  ip_protocol,
int32_t  ip_ttl,
int32_t  ip_tos,
bool  ip_router_alert,
bool  ip_internet_control,
const vector< uint8_t > &  payload,
string &  error_msg 
) [virtual]

Receive a protocol packet.

Parameters:
if_namethe interface name the packet arrived on.
vif_namethe vif name the packet arrived on.
src_addressthe IP source address.
dst_addressthe IP destination address.
ip_protocolthe IP protocol number.
ip_ttlthe IP TTL (hop-limit). If it has a negative value, then the received value is unknown.
ip_tosthe Type of Service (Diffserv/ECN bits for IPv4). If it has a negative value, then the received value is unknown.
ip_router_alertif true, the IP Router Alert option was included in the IP packet.
ip_internet_controlif true, then this is IP control traffic.
payloadthe payload, everything after the IP header and options.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements ProtoNode< PimVif >.

virtual int PimNode::register_protocol ( const string &  if_name,
const string &  vif_name,
uint8_t  ip_protocol 
) [pure virtual]

Register a protocol on an interface in the Multicast FEA.

Parameters:
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.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlPimNode.

virtual int PimNode::register_receiver ( const string &  if_name,
const string &  vif_name,
uint8_t  ip_protocol,
bool  enable_multicast_loopback 
) [pure virtual]

Register as a receiver to receive packets.

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

Parameters:
if_namethe interface through which packets should be accepted.
vif_namethe vif through which packets should be accepted.
ip_protocolthe IP protocol number that the receiver is interested in. It must be between 0 and 255. A protocol number of 0 is used to specify all protocols.
enable_multicast_loopbackif true then enable delivering of multicast datagrams back to this host (assuming the host is a member of the same multicast group).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlPimNode.

int PimNode::reset_vif_proto_version ( const string &  vif_name,
string &  error_msg 
)

Reset the protocol version on an interface to its default value.

Parameters:
vif_namethe name of the vif to reset the protocol version of to its default value.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
virtual void PimNode::rib_register_shutdown ( ) [private, pure virtual]

Initiate de-registration with the RIB.

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

Implemented in XrlPimNode.

virtual void PimNode::rib_register_startup ( ) [private, pure virtual]

Initiate registration with the RIB.

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

Implemented in XrlPimNode.

RpTable& PimNode::rp_table ( ) [inline]

Get the PIM RP table.

Returns:
a reference to the PIM RP table (RpTable).
int PimNode::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.
void PimNode::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.
void PimNode::set_pim_vifs_dr ( uint32_t  vif_index,
bool  v 
)

Set/reset a virtual interface as a Designated Router.

PimNode::set_pim_vifs_dr: : The vif index to set/reset the DR flag.

Parameters:
vif_indexthe vif index of the virtual interface to set/reset as a Designated Router.
vif true, set the virtual interface as a Designated Router, otherwise reset it.

: true if set the DR flag, otherwise false.

Set/reset the DR flag for vif index .

int PimNode::set_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 flags to a vif.

Parameters:
vif_namethe name of the vif.
is_pim_registertrue if this is a PIM Register vif.
is_p2ptrue if this is a point-to-point vif.
is_loopbacktrue if this is a loopback interface.
is_multicastrue if the vif is multicast-capable.
is_broadcasttrue if the vif is broadcast-capable.
is_uptrue if the vif is UP and running.
mtuthe MTU of the vif.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int PimNode::set_vif_proto_version ( const string &  vif_name,
int  proto_version,
string &  error_msg 
)

Set the protocol version on an interface.

Parameters:
vif_namethe name of the vif to set the protocol version of.
proto_versionthe new protocol version.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int PimNode::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]

Receive a signal message from the kernel.

PimNode::signal_message_recv: : The module instance name of the module-origin of the message.

Parameters:
src_module_instance_namethe module instance name of the module-origin of the message.
message_typethe message type. Currently, the type of messages received from the kernel are:
#define MFEA_KERNEL_MESSAGE_NOCACHE        1
#define MFEA_KERNEL_MESSAGE_WRONGVIF       2
#define MFEA_KERNEL_MESSAGE_WHOLEPKT       3
Parameters:
vif_indexthe vif index of the related interface (message-specific relation).
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. 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). : 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 .

Receive a signal from the kernel (e.g., NOCACHE, WRONGVIF, WHOLEPKT).

Return value: XORP_OK on success, otherwise XORP_ERROR.

Implements ProtoNode< PimVif >.

int PimNode::start ( )

Start the node operation.

PimNode::start: @:

Start the PIM protocol. After the startup operations are completed, PimNode::final_start() is called internally to complete the job.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

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

Return value: XORP_OK on success, otherwize XORP_ERROR.

Reimplemented from ProtoState.

int PimNode::start_all_vifs ( )

Start PIM on all enabled interfaces.

PimNode::start_all_vifs: @:

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Start PIM on all enabled interfaces.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimNode::start_bsr ( ) [inline]

Start the Bootstrap mechanism.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented in XrlPimNode.

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

Start an existing PIM vif.

PimNode::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 PIM vif.

Return value: XORP_OK on success, otherwise XORP_ERROR.

void PimNode::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 PimNode::stop ( )

Stop the node operation.

PimNode::stop: @:

Gracefully stop the PIM protocol. The graceful stop will attempt to send Join/Prune, Assert, etc. messages for all multicast routing entries to gracefully clean-up state with neighbors. After the multicast routing entries cleanup is completed, PimNode::final_stop() is called internally to complete the job. This method, unlike start(), will stop the protocol operation on all interfaces.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Gracefully stop the PIM protocol. XXX: The graceful stop will attempt to send Join/Prune, Assert, etc. messages for all multicast routing entries to gracefully clean-up state with neighbors. XXX: After the multicast routing entries cleanup is completed, PimNode::final_stop() is called to complete the job. XXX: This function, unlike start(), will stop the protocol operation on all interfaces.

Return value: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from ProtoState.

int PimNode::stop_all_vifs ( )

Stop PIM on all interfaces it was running on.

PimNode::stop_all_vifs: @:

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Stop PIM on all interfaces it was running on.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimNode::stop_bsr ( ) [inline]

Stop the Bootstrap mechanism.

Returns:
XORP_OK on success, otherwise XORP_ERROR.

Reimplemented in XrlPimNode.

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

Stop an existing PIM vif.

PimNode::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 PIM vif.

Return value: XORP_OK on success, otherwise XORP_ERROR.

virtual int PimNode::unregister_protocol ( const string &  if_name,
const string &  vif_name 
) [pure virtual]

Unregister a protocol on an interface in the Multicast FEA.

Parameters:
if_namethe name of the interface to unregister for the particular protocol.
vif_namethe name of the vif to unregister for the particular protocol.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlPimNode.

virtual int PimNode::unregister_receiver ( const string &  if_name,
const string &  vif_name,
uint8_t  ip_protocol 
) [pure virtual]

Unregister as a receiver to receive packets.

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

Parameters:
if_namethe interface through which packets should not be accepted.
vif_namethe vif through which packets should not be accepted.
ip_protocolthe IP Protocol number that the receiver is not interested in anymore. It must be between 0 and 255. A protocol number of 0 is used to specify all protocols.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implemented in XrlPimNode.

PimVif * PimNode::vif_find_pim_register ( ) const

Get the PIM-Register virtual interface.

PimNode::vif_find_pim_register: @:

Returns:
the PIM-Register virtual interface if exists, otherwise NULL.

Return the PIM Register virtual interface.

Return value: The PIM Register virtual interface if exists, otherwise NULL.

void PimNode::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