hi ,<br><br> Due to previous discussion now we have decided to implement enable_bidir flag per PIMSM node !! For this purpose we used same ip_router_alert_option_check as reference !! Before this we had successfully managed to enable_bidir per Vif ( gmake worked :) ) ...... But now we tried to make it for Per PIMSM node (changes were made as per node ) but there is error !! Also
<br><br> we made the following changes in the file pim.xif to configure the pim_bidir flag<br>per node.<br><br>=============================================================<br>IN pim.xif<br>---------------<br><br><br>get_pim_bidir? pim_bidir_name:txt -> enabled:bool
<br>set_pim_bidir ? pim_bidir_name:txt & enable:bool<br>reset_pim_bidir ? pim_bidir_name:txt<br><br><br>=============================================================<br><br><br><br>=============================================================================
<br>IN xorp/etc/templates/pimsm4.tp<br>-------------------------------<br><br>protocols {<br> pimsm4 {<br> targetname: txt = "PIMSM_4";<br> disable: toggle = false;<br> enabled: bool; /* %deprecated */
<br><br><br> enable-pim-bidir: bool = false;<br><br><br> interface @: txt {<br> vif @: txt {<br> disable: toggle = false;<br> enabled: bool; /* %deprecated */<br> enable-ip-router-alert-option-check: bool = false;
<br> dr-priority: u32 = 1;<br> hello-period: u32 = 30;<br> hello-triggered-delay: u32 = 5;<br> alternative-subnet @: ipv4net {<br> }<br> }<br> }<br><br> <br>
<br><br> <br>}<br><br>protocols {<br> pimsm4 {<br><br> -----<br> -----<br> -----<br><br><br>enable-pim-bidir {<br> %help: short "Enable PIM-Bidir";<br> %create: xrl "$(pimsm4.targetname
)/pim/0.1/enable_pim_bidir?pim_bidir_name:txt=$(@) enable:bool=$(@)";<br> %set: xrl "$(pimsm4.targetname)/pim/0.1/enable_pim_bidir?pim_bidir_name:txt=$(@)enable:bool=$(@)";<br> %delete: xrl "$(
pimsm4.targetname)/pim/0.1/enable_pim_bidir?pim_bidir_name:txt=$(@)enable:bool=$(DEFAULT)";<br> }<br><br>---------------<br>---------------<br>---------------<br>}<br>===============================================================================
<br><br>we also wrote the required functions in the xrl_pim_node.cc &.hh files.<br>also the changes are made in file pim_node.cc by referring flag _ip_router_flag_check.but we take in the consideration that this flag is per node the changes are as follows.
<br><br><br>IN file xrl_pim_node.cc<br>*-----------------------------------------------------*/<br>/*Modification for pim bidir*/<br><br><br>XrlCmdError<br>XrlPimNode::pim_0_1_get_pim_bidir(<br> // Input values,<br> const string& pim_bidir_name,
<br> // Output values,<br> bool& enabled)<br>{<br> string error_msg;<br> <br> bool v;<br> if (PimNode::get_pim_bidir(pim_bidir_name, v, error_msg)<br> != XORP_OK) {<br> return XrlCmdError::COMMAND_FAILED(error_msg);
<br> }<br> <br> enabled = v;<br> return XrlCmdError::OKAY();<br>}<br><br>XrlCmdError<br>XrlPimNode::pim_0_1_set_pim_bidir(<br> // Input values,<br> const string& pim_bidir_name,<br> const bool& enable)
<br>{<br> string error_msg;<br> <br> if (PimNode::set_pim_bidir(pim_bidir_name, enable,<br> error_msg)<br> != XORP_OK) {<br> return XrlCmdError::COMMAND_FAILED(error_msg);<br> }
<br> <br> return XrlCmdError::OKAY();<br>}<br><br>XrlCmdError<br>XrlPimNode::pim_0_1_reset_pim_bidir(<br> // Input values,<br> const string& pim_bidir_name)<br>{<br> string error_msg;<br> <br> if (PimNode::reset_pim_bidir(pim_bidir_name, error_msg)
<br> != XORP_OK) {<br> return XrlCmdError::COMMAND_FAILED(error_msg);<br> }<br> <br> return XrlCmdError::OKAY();<br>}<br><br><br>/*-----------------------------------------------------*/<br><br>IN file pim_node.cc
<br><br>PimNode::PimNode(int family, xorp_module_id module_id,<br> EventLoop& eventloop)<br> : ProtoNode<PimVif>(family, module_id, eventloop),<br> <br> _pim_mrt(*this),<br> _pim_mrib_table(*this),
<br> _rp_table(*this),<br> _pim_bidir(false),<br> _pim_scope_zone_table(*this),<br> _pim_bsr(*this),<br> _is_switch_to_spt_enabled(false), // XXX: disabled by defailt<br> <br> _switch_to_spt_threshold_interval_sec(0),
<br> _switch_to_spt_threshold_bytes(0),<br> _is_log_trace(false)<br>..<br>..<br>..<br><br>IN file pim_node.hh<br><br>/*------------------------------------------------------*/<br>/*modification for pim bidir*/<br>
<br>int get_pim_bidir(const string& pim_bidir_name,<br> bool& enabled,<br> string& error_msg);<br><br><br><br>int set_pim_bidir(const string& pim_bidir_name,
<br> bool enable,<br> string& error_msg);<br><br><br><br>int reset_pim_bidir(const string& pim_bidir_name,<br> string& error_msg);
<br><br>/*------------------------------------------------------*/<br><br><br>Error after gmake :-<br>------------------------------------------------<br>/.libs/libpim.a(xrl_pim_node.o): In function `XrlPimNode::pim_0_1_reset_pim_bidir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
<br>/home/xorp/Desktop/project/bidir-enable/xorp-1.3/pim/xrl_pim_node.cc:5200: undefined reference to `PimNode::reset_pim_bidir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
<br>./.libs/libpim.a(xrl_pim_node.o): In function `XrlPimNode::pim_0_1_set_pim_bidir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool const&)':<br>/home/xorp/Desktop/project/bidir-enable/xorp-
1.3/pim/xrl_pim_node.cc:5184: undefined reference to `PimNode::set_pim_bidir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
<br>./.libs/libpim.a(xrl_pim_node.o): In function `XrlPimNode::pim_0_1_get_pim_bidir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool&)':<br>/home/xorp/Desktop/project/bidir-enable/xorp-
1.3/pim/xrl_pim_node.cc:5167: undefined reference to `PimNode::get_pim_bidir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
<br>collect2: ld returned 1 exit status<br>gmake[2]: *** [xorp_pimsm4] Error 1<br>gmake[2]: Leaving directory `/home/xorp/Desktop/project/bidir-enable/xorp-1.3/pim'<br>gmake[1]: *** [all-recursive] Error 1<br>gmake[1]: Leaving directory `/home/xorp/Desktop/project/bidir-enable/xorp-
1.3'<br>gmake: *** [all] Error 2<br><br><br>can anyone let us know where might be the problem? !!! : ) <br><br>Also which flag we should we use as refrence for per PIMSM node flags instead of ip_router_flag_check which is per Vif.
<br><br><br><br>Thank you,<br>Ashish <br><br><br><br>