pim_base.hh
来自「BCAST Implementation for NS2」· HH 代码 · 共 2,220 行 · 第 1/5 页
HH
2,220 行
/** * Pure-virtual function that needs to be implemented to: * * Configure PIM Join/Prune-related metrics. The 'set_foo' XRLs set the * particular values. The 'reset_foo' XRLs reset the metrics to their * default values. * * @param vif_name the name of the vif to configure. * * @param join_prune_period the period between Join/Prune messages. */ virtual XrlCmdError pim_0_1_get_vif_join_prune_period( // Input values, const string& vif_name, // Output values, uint32_t& join_prune_period) = 0; virtual XrlCmdError pim_0_1_set_vif_join_prune_period( // Input values, const string& vif_name, const uint32_t& join_prune_period) = 0; virtual XrlCmdError pim_0_1_reset_vif_join_prune_period( // Input values, const string& vif_name) = 0; /** * Pure-virtual function that needs to be implemented to: * * Configure SPT-switch threshold. The 'set_foo' XRLs set the particular * values. The 'reset_foo' XRLs reset the metrics to their default values. * * @param is_enabled if true, enable SPT-switch, otherwise disable it. * * @param interval_sec if the SPT-switch is enabled, the interval (in * number of seconds) to measure the bandwidth to consider whether to * switch to the SPT. */ virtual XrlCmdError pim_0_1_get_switch_to_spt_threshold( // Output values, bool& is_enabled, uint32_t& interval_sec, uint32_t& bytes) = 0; virtual XrlCmdError pim_0_1_set_switch_to_spt_threshold( // Input values, const bool& is_enabled, const uint32_t& interval_sec, const uint32_t& bytes) = 0; virtual XrlCmdError pim_0_1_reset_switch_to_spt_threshold() = 0; /** * Pure-virtual function that needs to be implemented to: * * Enable/disable the PIM trace log. */ virtual XrlCmdError pim_0_1_enable_log_trace() = 0; virtual XrlCmdError pim_0_1_disable_log_trace() = 0; /** * Pure-virtual function that needs to be implemented to: * * Test-related methods: add Join/Prune entries, and send them to a * neighbor. */ virtual XrlCmdError pim_0_1_add_test_jp_entry4( // Input values, const IPv4& source_addr, const IPv4& group_addr, const uint32_t& group_mask_len, const string& mrt_entry_type, const string& action_jp, const uint32_t& holdtime, const bool& new_group_bool) = 0; virtual XrlCmdError pim_0_1_add_test_jp_entry6( // Input values, const IPv6& source_addr, const IPv6& group_addr, const uint32_t& group_mask_len, const string& mrt_entry_type, const string& action_jp, const uint32_t& holdtime, const bool& new_group_bool) = 0; virtual XrlCmdError pim_0_1_send_test_jp_entry4( // Input values, const IPv4& nbr_addr) = 0; virtual XrlCmdError pim_0_1_send_test_jp_entry6( // Input values, const IPv6& nbr_addr) = 0; /** * Pure-virtual function that needs to be implemented to: * * Test-related methods: send an Assert message on an interface. * * @param vif_name the name of the vif to send the Assert on. * * @param source_addr the source address inside the Assert message. * * @param group_addr the group address inside the Assert message. * * @param rpt_bit the RPT-bit inside the Assert message. * * @param metric_preference the metric preference inside the Assert * message. * * @param metric the metric inside the Assert message. */ virtual XrlCmdError pim_0_1_send_test_assert4( // Input values, const string& vif_name, const IPv4& source_addr, const IPv4& group_addr, const bool& rpt_bit, const uint32_t& metric_preference, const uint32_t& metric) = 0; virtual XrlCmdError pim_0_1_send_test_assert6( // Input values, const string& vif_name, const IPv6& source_addr, const IPv6& group_addr, const bool& rpt_bit, const uint32_t& metric_preference, const uint32_t& metric) = 0; /** * Pure-virtual function that needs to be implemented to: * * Test-related methods: send Bootstrap and Cand-RP-Adv messages. * * @param zone_id_scope_zone_prefix the zone prefix of the zone ID. * * @param zone_id_is_scope_zone true if the zone is scoped. * * @param bsr_addr the address of the Bootstrap router. * * @param bsr_priority the priority of the Bootstrap router. * * @param hash_mask_len the hash mask length inside the Bootstrap * messages. * * @param fragment_tag the fragment tag inside the Bootstrap messages. */ virtual XrlCmdError pim_0_1_add_test_bsr_zone4( // Input values, const IPv4Net& zone_id_scope_zone_prefix, const bool& zone_id_is_scope_zone, const IPv4& bsr_addr, const uint32_t& bsr_priority, const uint32_t& hash_mask_len, const uint32_t& fragment_tag) = 0; virtual XrlCmdError pim_0_1_add_test_bsr_zone6( // Input values, const IPv6Net& zone_id_scope_zone_prefix, const bool& zone_id_is_scope_zone, const IPv6& bsr_addr, const uint32_t& bsr_priority, const uint32_t& hash_mask_len, const uint32_t& fragment_tag) = 0; virtual XrlCmdError pim_0_1_add_test_bsr_group_prefix4( // Input values, const IPv4Net& zone_id_scope_zone_prefix, const bool& zone_id_is_scope_zone, const IPv4Net& group_prefix, const bool& is_scope_zone, const uint32_t& expected_rp_count) = 0; virtual XrlCmdError pim_0_1_add_test_bsr_group_prefix6( // Input values, const IPv6Net& zone_id_scope_zone_prefix, const bool& zone_id_is_scope_zone, const IPv6Net& group_prefix, const bool& is_scope_zone, const uint32_t& expected_rp_count) = 0; virtual XrlCmdError pim_0_1_add_test_bsr_rp4( // Input values, const IPv4Net& zone_id_scope_zone_prefix, const bool& zone_id_is_scope_zone, const IPv4Net& group_prefix, const IPv4& rp_addr, const uint32_t& rp_priority, const uint32_t& rp_holdtime) = 0; virtual XrlCmdError pim_0_1_add_test_bsr_rp6( // Input values, const IPv6Net& zone_id_scope_zone_prefix, const bool& zone_id_is_scope_zone, const IPv6Net& group_prefix, const IPv6& rp_addr, const uint32_t& rp_priority, const uint32_t& rp_holdtime) = 0; virtual XrlCmdError pim_0_1_send_test_bootstrap( // Input values, const string& vif_name) = 0; virtual XrlCmdError pim_0_1_send_test_bootstrap_by_dest4( // Input values, const string& vif_name, const IPv4& dest_addr) = 0; virtual XrlCmdError pim_0_1_send_test_bootstrap_by_dest6( // Input values, const string& vif_name, const IPv6& dest_addr) = 0; virtual XrlCmdError pim_0_1_send_test_cand_rp_adv() = 0; /** * Pure-virtual function that needs to be implemented to: * * Retrieve information about all PIM neighbors. * * @param nbrs_number the number of PIM neighbors * * @param vifs the list of vif names for all neighbors (one vif name per * neighbor). * * @param pim_versions the list of PIM protocol versions for all neighbors * (one number per neighbor). * * @param dr_priorities the list of DR priorities of all neighbors (one * number per neighbor). * * @param holdtimes the list of configured holdtimes (in seconds) of all * neighbors (one number per neighbor). * * @param timeouts the list of timeout values (in seconds) of all * neighbors (one number per neighbor). * * @param uptimes the list of uptime values (in seconds) of all neighbors * (one number per neighbor). */ virtual XrlCmdError pim_0_1_pimstat_neighbors4( // Output values, uint32_t& nbrs_number, XrlAtomList& vifs, XrlAtomList& addresses, XrlAtomList& pim_versions, XrlAtomList& dr_priorities, XrlAtomList& holdtimes, XrlAtomList& timeouts, XrlAtomList& uptimes) = 0; virtual XrlCmdError pim_0_1_pimstat_neighbors6( // Output values, uint32_t& nbrs_number, XrlAtomList& vifs, XrlAtomList& addresses, XrlAtomList& pim_versions, XrlAtomList& dr_priorities, XrlAtomList& holdtimes, XrlAtomList& timeouts, XrlAtomList& uptimes) = 0; /** * Pure-virtual function that needs to be implemented to: * * Retrieve information about PIM interfaces. * * @param vif_name the name of the vif to retrieve information about. * * @param pim_version the PIM protocol version on that vif. * * @param is_dr true if this router is the DR for the subnet the vif is * connected to. * * @param dr_priority the DR priority configured on that vif. * * @param dr_address the address of the DR for the subnet the vif is * connected to. * * @param pim_nbrs_number the number of PIM neighbors on the subnet the * vif is connected to. */ virtual XrlCmdError pim_0_1_pimstat_interface4( // Input values, const string& vif_name, // Output values, uint32_t& pim_version, bool& is_dr, uint32_t& dr_priority, IPv4& dr_address, uint32_t& pim_nbrs_number) = 0; virtual XrlCmdError pim_0_1_pimstat_interface6( // Input values, const string& vif_name, // Output values, uint32_t& pim_version, bool& is_dr, uint32_t& dr_priority, IPv6& dr_address, uint32_t& pim_nbrs_number) = 0; /** * Pure-virtual function that needs to be implemented to: * * Retrieve information about the RP-Set. * * @param rps_number the number of RPs in the RP-Set. * * @param addresses the list of addresses of all RPs (one IPv4 or IPv6 * address per RP). * * @param types the list of textual description about the origin of each * RP (one keyword per RP: "bootstrap", "static" or "unknown"). * * @param priorities the list of RP priorities of all RPs (one number per * RP). * * @param holdtimes the list of configured holdtimes (in seconds) of all * RPs (one number per RP). * * @param timeouts the list of timeout values (in seconds) of all RPs (one * number per RP). * * @param group_prefixes the list of all group prefixes (one network * IPv4Net or IPv6Net address per RP). Note that if an RP is configured * for more than one group prefixes, there will be a number of entries for * that RP: one per group prefix. */ virtual XrlCmdError pim_0_1_pimstat_rps4( // Output values, uint32_t& rps_number, XrlAtomList& addresses, XrlAtomList& types, XrlAtomList& priorities, XrlAtomList& holdtimes, XrlAtomList& timeouts, XrlAtomList& group_prefixes) = 0; virtual XrlCmdError pim_0_1_pimstat_rps6( // Output values, uint32_t& rps_number, XrlAtomList& addresses, XrlAtomList& types, XrlAtomList& priorities, XrlAtomList& holdtimes, XrlAtomList& timeouts, XrlAtomList& group_prefixes) = 0; /** * Pure-virtual function that needs to be implemented to: * * Clear all statistics */ virtual XrlCmdError pim_0_1_clear_pim_statistics() = 0; /** * Pure-virtual function that needs to be implemented to: * * Clear all statistics on a specific interface. * * @param vif_name the interface to clear the statistics of. */ virtual XrlCmdError pim_0_1_clear_pim_statistics_per_vif( // Input values, const string& vif_name) = 0; /** * Pure-virtual function that needs to be implemented to: * * Statistics-related counters and values */ virtual XrlCmdError pim_0_1_pimstat_hello_messages_received( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_hello_messages_sent( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_hello_messages_rx_errors( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_register_messages_received( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_register_messages_sent( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_register_messages_rx_errors( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_register_stop_messages_received( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_register_stop_messages_sent( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_register_stop_messages_rx_errors( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_join_prune_messages_received( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_join_prune_messages_sent( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_join_prune_messages_rx_errors( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_bootstrap_messages_received( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_bootstrap_messages_sent( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_bootstrap_messages_rx_errors( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_assert_messages_received( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_assert_messages_sent( // Output values, uint32_t& value) = 0; virtual XrlCmdError pim_0_1_pimstat_assert_messages_rx_errors( // Output values,
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?