xorp

PimVif Class Reference

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

#include <pim_vif.hh>

Inheritance diagram for PimVif:
ProtoUnit Vif ProtoState ServiceBase BugCatcher

List of all members.

Public Member Functions

 PimVif (PimNode *pim_node, const Vif &vif)
 Constructor for a given PIM node and a generic virtual interface.
virtual ~PimVif ()
 Destructor.
void set_default_config ()
 Set configuration to default values.
int set_proto_version (int proto_version)
 Set the current protocol version.
int start (string &error_msg)
 Start PIM on a single virtual interface.
void notifyUpdated ()
 Attempt deferred start.
int stop (string &error_msg)
 Gracefully stop PIM on a single virtual interface.
int final_stop (string &error_msg)
 Completely stop PIM on a single virtual interface.
void enable ()
 Enable PIM on a single virtual interface.
void disable ()
 Disable PIM on a single virtual interface.
int pim_recv (const IPvX &src, const IPvX &dst, buffer_t *buffer)
 Receive a protocol message.
string flags_string () const
 Get the string with the flags about the vif status.
PimNodepim_node () const
 Get the PIM node (PimNode).
PimMrtpim_mrt () const
 Get the PIM Multicast Routing Table (PimMrt).
PimNbrpim_nbr_me ()
 Get the PIM neighbor information (PimNbr) about myself.
void pim_hello_start ()
 Start the PIM Hello operation.
void pim_hello_stop ()
 Stop the PIM Hello operation.
void pim_dr_elect ()
 Elect a Designated Router on this interface.
bool i_may_become_dr (const IPvX &exclude_addr)
 Compute if I may become the Designated Router on this interface if one of the PIM neighbor addresses is not considered.
const IPvXprimary_addr () const
 Get my primary address on this interface.
const IPvXdomain_wide_addr () const
 Get my domain-wide reachable address on this interface.
void set_domain_wide_addr (const IPvX &v)
 Set my domain-wide reachable address on this interface.
int update_primary_and_domain_wide_address (string &error_msg)
 Update the primary and the domain-wide reachable addresses.
const IPvXdr_addr () const
 Get the address of the Designated Router on this interface.
ConfigParam< uint16_t > & hello_triggered_delay ()
ConfigParam< uint16_t > & hello_period ()
ConfigParam< uint16_t > & hello_holdtime ()
ConfigParam< uint32_t > & dr_priority ()
ConfigParam< uint16_t > & propagation_delay ()
ConfigParam< uint16_t > & override_interval ()
ConfigParam< bool > & is_tracking_support_disabled ()
ConfigParam< bool > & accept_nohello_neighbors ()
ConfigParam< uint32_t > & genid ()
ConfigParam< uint16_t > & join_prune_period ()
ConfigParam< uint16_t > & join_prune_holdtime ()
ConfigParam< uint32_t > & assert_time ()
ConfigParam< uint32_t > & assert_override_interval ()
int pim_send (const IPvX &src, const IPvX &dst, uint8_t message_type, buffer_t *buffer, string &error_msg)
 PimVif::pim_send: : The message source address.
int pim_hello_send (string &error_msg)
int pim_hello_first_send ()
int pim_join_prune_send (PimNbr *pim_nbr, PimJpHeader *jp_header, string &error_msg)
int pim_assert_mre_send (PimMre *pim_mre, const IPvX &assert_source_addr, string &error_msg)
int pim_assert_cancel_send (PimMre *pim_mre, string &error_msg)
int pim_assert_send (const IPvX &assert_source_addr, const IPvX &assert_group_addr, bool rpt_bit, uint32_t metric_preference, uint32_t metric, string &error_msg)
int pim_register_send (const IPvX &rp_addr, const IPvX &source_addr, const IPvX &group_addr, const uint8_t *rcvbuf, size_t rcvlen, string &error_msg)
int pim_register_null_send (const IPvX &rp_addr, const IPvX &source_addr, const IPvX &group_addr, string &error_msg)
int pim_register_stop_send (const IPvX &dr_addr, const IPvX &source_addr, const IPvX &group_addr, string &error_msg)
int pim_bootstrap_send (const IPvX &dst_addr, const BsrZone &bsr_zone, string &error_msg)
buffer_tpim_bootstrap_send_prepare (const IPvX &src_addr, const IPvX &dst_addr, const BsrZone &bsr_zone, bool is_first_fragment)
int pim_cand_rp_adv_send (const IPvX &bsr_addr, const BsrZone &bsr_zone)
void hello_timer_start (uint32_t sec, uint32_t usec)
void hello_timer_start_random (uint32_t sec, uint32_t usec)
bool is_lan_delay_enabled () const
const TimeValeffective_propagation_delay () const
const TimeValeffective_override_interval () const
bool is_lan_suppression_state_enabled () const
const TimeValupstream_join_timer_t_suppressed () const
const TimeValupstream_join_timer_t_override () const
const TimeValjp_override_interval () const
list< PimNbr * > & pim_nbrs ()
size_t pim_nbrs_number () const
bool i_am_dr () const
 PimVif::i_am_dr: @:
void set_i_am_dr (bool v)
 PimVif::set_i_am_dr: : If true, set the PIM_VIF_DR flag, otherwise reset it.
PimNbrpim_nbr_find (const IPvX &nbr_addr)
 PimVif::pim_nbr_find: : The address of the neighbor to search for.
void add_pim_nbr (PimNbr *pim_nbr)
int delete_pim_nbr (PimNbr *pim_nbr)
void delete_pim_nbr_from_nbr_list (PimNbr *pim_nbr)
const list< IPvXNet > & alternative_subnet_list () const
void add_alternative_subnet (const IPvXNet &subnet)
void delete_alternative_subnet (const IPvXNet &subnet)
void remove_all_alternative_subnets ()
size_t usage_by_pim_mre_task () const
void incr_usage_by_pim_mre_task ()
void decr_usage_by_pim_mre_task ()
uint16_t calculate_ipv6_pseudo_header_checksum (const IPvX &src, const IPvX &dst, size_t len, uint8_t protocol)
 Calculate the checksum of an IPv6 "pseudo-header" as described in RFC 2460.
buffer_tbuffer_send_prepare ()
 PimVif::buffer_send_prepare: @:
buffer_tbuffer_send_prepare (buffer_t *buffer)
 PimVif::buffer_send_prepare: : The buffer to prepare.
void clear_pim_statistics ()
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

Private Types

enum  { PIM_VIF_DR = 1 << 0 }

Private Member Functions

void hello_timer_timeout ()
void hello_once_timer_timeout ()
void set_hello_period_callback (uint16_t v)
void set_hello_holdtime_callback (uint16_t v)
void set_dr_priority_callback (uint32_t v)
void set_propagation_delay_callback (uint16_t v)
void set_override_interval_callback (uint16_t v)
void set_is_tracking_support_disabled_callback (bool v)
void set_genid_callback (uint32_t v)
void set_join_prune_period_callback (uint16_t v)
int jp_entry_add (const IPvX &source_addr, const IPvX &group_addr, mrt_entry_type_t mrt_entry_type, action_jp_t action_jp, uint16_t holdtime)
int jp_entry_flush ()
bool is_send_unicast_bootstrap () const
void add_send_unicast_bootstrap_nbr (const IPvX &nbr_addr)
const list< IPvX > & send_unicast_bootstrap_nbr_list () const
void delete_send_unicast_bootstrap_nbr_list ()
bool should_send_pim_hello () const
void set_should_send_pim_hello (bool v)
int pim_hello_recv (PimNbr *pim_nbr, const IPvX &src, const IPvX &dst, buffer_t *buffer, int nbr_proto_version)
 PimVif::pim_hello_recv: : The PIM neighbor message originator (or NULL if not a neighbor).
int pim_register_recv (PimNbr *pim_nbr, const IPvX &src, const IPvX &dst, buffer_t *buffer)
 PimVif::pim_register_recv: : The PIM neighbor message originator (or NULL if not a neighbor).
int pim_register_stop_recv (PimNbr *pim_nbr, const IPvX &src, const IPvX &dst, buffer_t *buffer)
 PimVif::pim_register_stop_recv: : The PIM neighbor message originator (or NULL if not a neighbor).
int pim_join_prune_recv (PimNbr *pim_nbr, const IPvX &src, const IPvX &dst, buffer_t *buffer, uint8_t message_type)
 PimVif::pim_join_prune_recv: : The PIM neighbor message originator (or NULL if not a neighbor).
int pim_bootstrap_recv (PimNbr *pim_nbr, const IPvX &src, const IPvX &dst, buffer_t *buffer)
 PimVif::pim_bootstrap_recv: : The PIM neighbor message originator (or NULL if not a neighbor).
int pim_assert_recv (PimNbr *pim_nbr, const IPvX &src, const IPvX &dst, buffer_t *buffer)
 PimVif::pim_assert_recv: : The PIM neighbor message originator (or NULL if not a neighbor).
int pim_graft_recv (PimNbr *pim_nbr, const IPvX &src, const IPvX &dst, buffer_t *buffer)
 PimVif::pim_graft_recv: : The PIM neighbor message originator (or NULL if not a neighbor).
int pim_graft_ack_recv (PimNbr *pim_nbr, const IPvX &src, const IPvX &dst, buffer_t *buffer)
 PimVif::pim_graft_ack_recv: : The PIM neighbor message originator (or NULL if not a neighbor).
int pim_cand_rp_adv_recv (PimNbr *pim_nbr, const IPvX &src, const IPvX &dst, buffer_t *buffer)
 PimVif::pim_cand_rp_adv_recv: : The PIM neighbor message originator (or NULL if not a neighbor).
int pim_process (const IPvX &src, const IPvX &dst, buffer_t *buffer)
 PimVif::pim_process: : The message source address.
int pim_assert_process (PimNbr *pim_nbr, const IPvX &src, const IPvX &dst, const IPvX &assert_source_addr, const IPvX &assert_group_addr, uint8_t assert_group_mask_len, AssertMetric *assert_metric)
int pim_register_stop_process (const IPvX &rp_addr, const IPvX &source_addr, const IPvX &group_addr, uint8_t group_mask_len)

Private Attributes

PimNode_pim_node
buffer_t_buffer_send
buffer_t_buffer_send_hello
buffer_t_buffer_send_bootstrap
uint32_t _proto_flags
IPvX _dr_addr
XorpTimer _hello_timer
XorpTimer _hello_once_timer
list< PimNbr * > _pim_nbrs
PimNbr _pim_nbr_me
IPvX _domain_wide_addr
list< IPvX_send_unicast_bootstrap_nbr_list
list< IPvXNet_alternative_subnet_list
ConfigParam< uint16_t > _hello_triggered_delay
ConfigParam< uint16_t > _hello_period
ConfigParam< uint16_t > _hello_holdtime
ConfigParam< uint32_t > _dr_priority
ConfigParam< uint16_t > _propagation_delay
ConfigParam< uint16_t > _override_interval
ConfigParam< bool > _is_tracking_support_disabled
ConfigParam< bool > _accept_nohello_neighbors
ConfigParam< uint32_t > _genid
ConfigParam< uint16_t > _join_prune_period
ConfigParam< uint16_t > _join_prune_holdtime
ConfigParam< uint32_t > _assert_time
ConfigParam< uint32_t > _assert_override_interval
bool _should_send_pim_hello
ConfigParam< uint32_t > _pimstat_hello_messages_received
ConfigParam< uint32_t > _pimstat_hello_messages_sent
ConfigParam< uint32_t > _pimstat_hello_messages_rx_errors
ConfigParam< uint32_t > _pimstat_register_messages_received
ConfigParam< uint32_t > _pimstat_register_messages_sent
ConfigParam< uint32_t > _pimstat_register_messages_rx_errors
ConfigParam< uint32_t > _pimstat_register_stop_messages_received
ConfigParam< uint32_t > _pimstat_register_stop_messages_sent
ConfigParam< uint32_t > _pimstat_register_stop_messages_rx_errors
ConfigParam< uint32_t > _pimstat_join_prune_messages_received
ConfigParam< uint32_t > _pimstat_join_prune_messages_sent
ConfigParam< uint32_t > _pimstat_join_prune_messages_rx_errors
ConfigParam< uint32_t > _pimstat_bootstrap_messages_received
ConfigParam< uint32_t > _pimstat_bootstrap_messages_sent
ConfigParam< uint32_t > _pimstat_bootstrap_messages_rx_errors
ConfigParam< uint32_t > _pimstat_assert_messages_received
ConfigParam< uint32_t > _pimstat_assert_messages_sent
ConfigParam< uint32_t > _pimstat_assert_messages_rx_errors
ConfigParam< uint32_t > _pimstat_graft_messages_received
ConfigParam< uint32_t > _pimstat_graft_messages_sent
ConfigParam< uint32_t > _pimstat_graft_messages_rx_errors
ConfigParam< uint32_t > _pimstat_graft_ack_messages_received
ConfigParam< uint32_t > _pimstat_graft_ack_messages_sent
ConfigParam< uint32_t > _pimstat_graft_ack_messages_rx_errors
ConfigParam< uint32_t > _pimstat_candidate_rp_messages_received
ConfigParam< uint32_t > _pimstat_candidate_rp_messages_sent
ConfigParam< uint32_t > _pimstat_candidate_rp_messages_rx_errors
ConfigParam< uint32_t > _pimstat_unknown_type_messages
ConfigParam< uint32_t > _pimstat_unknown_version_messages
ConfigParam< uint32_t > _pimstat_neighbor_unknown_messages
ConfigParam< uint32_t > _pimstat_bad_length_messages
ConfigParam< uint32_t > _pimstat_bad_checksum_messages
ConfigParam< uint32_t > _pimstat_bad_receive_interface_messages
ConfigParam< uint32_t > _pimstat_rx_interface_disabled_messages
ConfigParam< uint32_t > _pimstat_rx_register_not_rp
ConfigParam< uint32_t > _pimstat_rp_filtered_source
ConfigParam< uint32_t > _pimstat_unknown_register_stop
ConfigParam< uint32_t > _pimstat_rx_join_prune_no_state
ConfigParam< uint32_t > _pimstat_rx_graft_graft_ack_no_state
ConfigParam< uint32_t > _pimstat_rx_graft_on_upstream_interface
ConfigParam< uint32_t > _pimstat_rx_candidate_rp_not_bsr
ConfigParam< uint32_t > _pimstat_rx_bsr_when_bsr
ConfigParam< uint32_t > _pimstat_rx_bsr_not_rpf_interface
ConfigParam< uint32_t > _pimstat_rx_unknown_hello_option
ConfigParam< uint32_t > _pimstat_rx_data_no_state
ConfigParam< uint32_t > _pimstat_rx_rp_no_state
ConfigParam< uint32_t > _pimstat_rx_aggregate
ConfigParam< uint32_t > _pimstat_rx_malformed_packet
ConfigParam< uint32_t > _pimstat_no_rp
ConfigParam< uint32_t > _pimstat_no_route_upstream
ConfigParam< uint32_t > _pimstat_rp_mismatch
ConfigParam< uint32_t > _pimstat_rpf_neighbor_unknown
ConfigParam< uint32_t > _pimstat_rx_join_rp
ConfigParam< uint32_t > _pimstat_rx_prune_rp
ConfigParam< uint32_t > _pimstat_rx_join_wc
ConfigParam< uint32_t > _pimstat_rx_prune_wc
ConfigParam< uint32_t > _pimstat_rx_join_sg
ConfigParam< uint32_t > _pimstat_rx_prune_sg
ConfigParam< uint32_t > _pimstat_rx_join_sg_rpt
ConfigParam< uint32_t > _pimstat_rx_prune_sg_rpt
size_t _usage_by_pim_mre_task
bool wants_to_be_started

Detailed Description

A class for PIM-specific virtual interface.


Constructor & Destructor Documentation

PimVif::PimVif ( PimNode pim_node,
const Vif vif 
)

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

PimVif::PimVif: : The PIM node this interface belongs to.

Parameters:
pim_nodethe PimNode this interface belongs to.
vifthe generic Vif interface that contains various information.

: The generic Vif interface that contains various information.

PIM protocol vif constructor.

PimVif::~PimVif ( ) [virtual]

Destructor.

PimVif::~PimVif: @:

PIM protocol vif destructor.


Member Function Documentation

buffer_t * PimVif::buffer_send_prepare ( )

PimVif::buffer_send_prepare: @:

Reset and prepare the default buffer for sending data.

Return value: The prepared buffer.

buffer_t * PimVif::buffer_send_prepare ( buffer_t buffer)

PimVif::buffer_send_prepare: : The buffer to prepare.

Reset and prepare buffer for sendign data.

Return value: The prepared buffer.

uint16_t PimVif::calculate_ipv6_pseudo_header_checksum ( const IPvX src,
const IPvX dst,
size_t  len,
uint8_t  protocol 
)

Calculate the checksum of an IPv6 "pseudo-header" as described in RFC 2460.

Parameters:
srcthe source address of the pseudo-header.
dstthe destination address of the pseudo-header.
lenthe upper-layer packet length of the pseudo-header (in host-order).
protocolthe upper-layer protocol number.
Returns:
the checksum of the IPv6 "pseudo-header".
void PimVif::disable ( )

Disable PIM on a single virtual interface.

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

Reimplemented from ProtoState.

const IPvX& PimVif::domain_wide_addr ( ) const [inline]

Get my domain-wide reachable address on this interface.

Returns:
my domain-wide reachable address on this interface.
const IPvX& PimVif::dr_addr ( ) const [inline]

Get the address of the Designated Router on this interface.

Returns:
the address of the Designated Router on this interface.
void PimVif::enable ( )

Enable PIM on a single virtual interface.

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

Reimplemented from ProtoState.

int PimVif::final_stop ( string &  error_msg)

Completely stop PIM on a single virtual interface.

PimVif::final_stop: : The error message (if error).

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

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

Completely stop PIM on a single virtual interface.

Return value: XORP_OK on success, otherwise XORP_ERROR.

string PimVif::flags_string ( ) const

Get the string with the flags about the vif status.

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

Returns:
the C++ style string with the flags about the vif status (e.g., UP/DOWN/DISABLED, etc).
bool PimVif::i_am_dr ( ) const

PimVif::i_am_dr: @:

Test if the protocol instance is a DR (Designated Router) on a virtual interface.

Return value: True if the protocol instance is DR on a virtual interface, otherwise false.

bool PimVif::i_may_become_dr ( const IPvX exclude_addr)

Compute if I may become the Designated Router on this interface if one of the PIM neighbor addresses is not considered.

PimVif::i_may_become_dr: : The address to exclude in the computation.

Compute if I may become the DR on this interface if exclude_addr is excluded.

Parameters:
exclude_addrthe address to exclude in the computation.
Returns:
true if I may become the DR on this interface, otherwise false.

Compute if I may become the DR on this interface if is excluded.

Return value: True if I may become the DR on this interface, otherwise false.

void PimVif::notifyUpdated ( )

Attempt deferred start.

System detected some change.

int PimVif::pim_assert_recv ( PimNbr pim_nbr,
const IPvX src,
const IPvX dst,
buffer_t buffer 
) [private]

PimVif::pim_assert_recv: : The PIM neighbor message originator (or NULL if not a neighbor).

: The message source address. : The message destination address. : The buffer with the message.

Receive PIM_ASSERT message.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimVif::pim_bootstrap_recv ( PimNbr pim_nbr,
const IPvX src,
const IPvX dst,
buffer_t buffer 
) [private]

PimVif::pim_bootstrap_recv: : The PIM neighbor message originator (or NULL if not a neighbor).

: The message source address. : The message destination address. : The buffer with the message.

Receive PIM_BOOTSTRAP message.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimVif::pim_cand_rp_adv_recv ( PimNbr pim_nbr,
const IPvX src,
const IPvX dst,
buffer_t buffer 
) [private]

PimVif::pim_cand_rp_adv_recv: : The PIM neighbor message originator (or NULL if not a neighbor).

: The message source address. : The message destination address. : The buffer with the message.

Receive PIM_CAND_RP_ADV message.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimVif::pim_graft_ack_recv ( PimNbr pim_nbr,
const IPvX src,
const IPvX dst,
buffer_t buffer 
) [private]

PimVif::pim_graft_ack_recv: : The PIM neighbor message originator (or NULL if not a neighbor).

: The message source address. : The message destination address. : The buffer with the message.

Receive PIM_GRAFT_ACK message.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimVif::pim_graft_recv ( PimNbr pim_nbr,
const IPvX src,
const IPvX dst,
buffer_t buffer 
) [private]

PimVif::pim_graft_recv: : The PIM neighbor message originator (or NULL if not a neighbor).

: The message source address. : The message destination address. : The buffer with the message.

Receive PIM_GRAFT message.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimVif::pim_hello_recv ( PimNbr pim_nbr,
const IPvX src,
const IPvX dst,
buffer_t buffer,
int  nbr_proto_version 
) [private]

PimVif::pim_hello_recv: : The PIM neighbor message originator (or NULL if not a neighbor).

: The message source address. : The message destination address. : The buffer with the message. : The protocol version from this heighbor.

Receive PIM_HELLO message.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimVif::pim_join_prune_recv ( PimNbr pim_nbr,
const IPvX src,
const IPvX dst,
buffer_t buffer,
uint8_t  message_type 
) [private]

PimVif::pim_join_prune_recv: : The PIM neighbor message originator (or NULL if not a neighbor).

: The message source address. : The message destination address. : The buffer with the message. : The message type (should be either PIM_JOIN_PRUNE or PIM_GRAFT.

Receive PIM_JOIN_PRUNE message. XXX: PIM_GRAFT message has the same format as the PIM_JOIN_PRUNE message, hence we use the PIM_JOIN_PRUNE processing function to process PIM_GRAFT as well. TODO: for now ignore PIM_GRAFT messages logic; will need to come back to it later.

Return value: XORP_OK on success, otherwise XORP_ERROR.

PimMrt & PimVif::pim_mrt ( ) const

Get the PIM Multicast Routing Table (PimMrt).

PimVif::pim_mrt: @:

Returns:
a reference to the PIM Multicast Routing Table (PimMrt).

Get the PIM Multicast Routing Table.

Return value: A reference to the PIM Multicast Routing Table.

PimNbr * PimVif::pim_nbr_find ( const IPvX nbr_addr)

PimVif::pim_nbr_find: : The address of the neighbor to search for.

Find a PIM neighbor by its address.

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

PimNbr& PimVif::pim_nbr_me ( ) [inline]

Get the PIM neighbor information (PimNbr) about myself.

Returns:
a reference to the PIM neighbor information (PimNbr) about myself.
PimNode* PimVif::pim_node ( ) const [inline]

Get the PIM node (PimNode).

Returns:
a reference to the PIM node (PimNode).
int PimVif::pim_process ( const IPvX src,
const IPvX dst,
buffer_t buffer 
) [private]

PimVif::pim_process: : The message source address.

: The message destination address. : The buffer with the message.

Process PIM message and pass the control to the type-specific functions.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimVif::pim_recv ( const IPvX src,
const IPvX dst,
buffer_t buffer 
)

Receive a protocol message.

PimVif::pim_recv: : The message source address.

Parameters:
srcthe source address of the message.
dstthe destination address of the message.
bufferthe data buffer with the received message.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

: The message destination address. : The buffer with the received message.

Receive PIM message and pass it for processing.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimVif::pim_register_recv ( PimNbr pim_nbr,
const IPvX src,
const IPvX dst,
buffer_t buffer 
) [private]

PimVif::pim_register_recv: : The PIM neighbor message originator (or NULL if not a neighbor).

: The message source address. : The message destination address. : The buffer with the message.

Receive PIM_REGISTER message.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimVif::pim_register_stop_recv ( PimNbr pim_nbr,
const IPvX src,
const IPvX dst,
buffer_t buffer 
) [private]

PimVif::pim_register_stop_recv: : The PIM neighbor message originator (or NULL if not a neighbor).

: The message source address. : The message destination address. : The buffer with the message.

Receive PIM_REGISTER_STOP message.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimVif::pim_send ( const IPvX src,
const IPvX dst,
uint8_t  message_type,
buffer_t buffer,
string &  error_msg 
)

PimVif::pim_send: : The message source address.

: The message destination address. : The PIM type of the message. : The buffer with the rest of the message. : The error message (if error).

Send PIM message. XXX: The beginning of the must have been reserved for the PIM header.

Return value: XORP_OK on success, otherwise XORP_ERROR.

const IPvX& PimVif::primary_addr ( ) const [inline]

Get my primary address on this interface.

Returns:
my primary address on this interface.
void PimVif::set_default_config ( )

Set configuration to default values.

PimVif::set_default_config: @:

void PimVif::set_domain_wide_addr ( const IPvX v) [inline]

Set my domain-wide reachable address on this interface.

Parameters:
vthe value of the domain-wide reachable address.
void PimVif::set_i_am_dr ( bool  v)

PimVif::set_i_am_dr: : If true, set the PIM_VIF_DR flag, otherwise reset it.

Set/reset the PIM_VIF_DR (Designated Router) flag on a virtual interface.

int PimVif::set_proto_version ( int  proto_version)

Set the current protocol version.

PimVif::set_proto_version: : The protocol version to set.

The protocol version must be in the interval [PIM_VERSION_MIN, PIM_VERSION_MAX].

Parameters:
proto_versionthe protocol version to set.
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Set protocol version.

Return value: XORP_OK is is valid, otherwise XORP_ERROR.

Reimplemented from ProtoUnit.

int PimVif::start ( string &  error_msg)

Start PIM on a single virtual interface.

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

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

Start PIM on a single virtual interface.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimVif::stop ( string &  error_msg)

Gracefully stop PIM on a single virtual interface.

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

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, PimVif::final_stop() is called to complete the job.

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

Gracefully stop PIM on a single virtual interface. 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, PimVif::final_stop() is called to complete the job.

Return value: XORP_OK on success, otherwise XORP_ERROR.

int PimVif::update_primary_and_domain_wide_address ( string &  error_msg)

Update the primary and the domain-wide reachable addresses.

PimVif::update_primary_and_domain_wide_address: : The error message (if error).

The primary address should be a link-local unicast address, and is used for transmitting the multicast control packets on the LAN. The domain-wide reachable address is the address that should be reachable by all PIM-SM routers in the domain (e.g., the Cand-BSR, or the Cand-RP address).

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

Update the primary and the domain-wide reachable addresses.

The primary address should be a link-local unicast address, and is used for transmitting the multicast control packets on the LAN. The domain-wide reachable address is the address that should be reachable by all PIM-SM routers in the domain (e.g., the Cand-BSR, or the Cand-RP address).

Return value: XORP_OK on success, otherwise XORP_ERROR.


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