hi ,<br><br>&nbsp;&nbsp;&nbsp;&nbsp; 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&nbsp; managed to enable_bidir&nbsp; per Vif&nbsp; ( gmake worked :) ) ...... But now we tried to make it for Per PIMSM node (changes were made as per node&nbsp; ) but there is error !! Also 
<br><br>&nbsp;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?&nbsp;&nbsp;&nbsp;&nbsp; pim_bidir_name:txt -&gt; enabled:bool
<br>set_pim_bidir&nbsp;&nbsp; &nbsp;?&nbsp; pim_bidir_name:txt &amp; enable:bool<br>reset_pim_bidir&nbsp;&nbsp; &nbsp;?&nbsp; pim_bidir_name:txt<br><br><br>=============================================================<br><br><br><br>=============================================================================
<br>IN xorp/etc/templates/pimsm4.tp<br>-------------------------------<br><br>protocols {<br>&nbsp;&nbsp;&nbsp; pimsm4 {<br>&nbsp;&nbsp; &nbsp;targetname:&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;txt = &quot;PIMSM_4&quot;;<br>&nbsp;&nbsp; &nbsp;disable:&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;toggle = false;<br>&nbsp;&nbsp; &nbsp;enabled:&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;bool;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/* %deprecated */
<br><br><br>&nbsp;&nbsp; &nbsp;enable-pim-bidir:&nbsp;&nbsp; &nbsp;bool = false;<br><br><br>&nbsp;&nbsp; &nbsp;interface @: txt {<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; vif @: txt {<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; disable:&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;toggle = false;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; enabled:&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;bool;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;/* %deprecated */<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; enable-ip-router-alert-option-check:&nbsp;&nbsp; &nbsp;bool = false;
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; dr-priority:&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;u32 = 1;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; hello-period:&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;u32 = 30;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; hello-triggered-delay:&nbsp;&nbsp; &nbsp;u32 = 5;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; alternative-subnet @: ipv4net {<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; &nbsp;}<br><br>&nbsp;&nbsp; &nbsp;<br>
<br><br>&nbsp;&nbsp; &nbsp;<br>}<br><br>protocols {<br>&nbsp;&nbsp;&nbsp; pimsm4 {<br><br>&nbsp;&nbsp; &nbsp;-----<br>&nbsp;&nbsp; &nbsp;-----<br>&nbsp;&nbsp; &nbsp;-----<br><br><br>enable-pim-bidir {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %help: short &quot;Enable PIM-Bidir&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %create: xrl &quot;$(pimsm4.targetname
)/pim/0.1/enable_pim_bidir?pim_bidir_name:txt=$(@) enable:bool=$(@)&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %set: xrl &quot;$(pimsm4.targetname)/pim/0.1/enable_pim_bidir?pim_bidir_name:txt=$(@)enable:bool=$(@)&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %delete: xrl &quot;$(
pimsm4.targetname)/pim/0.1/enable_pim_bidir?pim_bidir_name:txt=$(@)enable:bool=$(DEFAULT)&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>---------------<br>---------------<br>---------------<br>}<br>===============================================================================
<br><br>we also wrote the required functions in the xrl_pim_node.cc &amp;.hh files.<br>also the changes are made in file pim_node.cc by referring flag&nbsp; _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>&nbsp;&nbsp;&nbsp; // Input values,<br>&nbsp;&nbsp;&nbsp; const string&amp;&nbsp;&nbsp; &nbsp;pim_bidir_name,
<br>&nbsp;&nbsp;&nbsp; // Output values,<br>&nbsp;&nbsp;&nbsp; bool&amp;&nbsp;&nbsp; &nbsp;enabled)<br>{<br>&nbsp;&nbsp;&nbsp; string error_msg;<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; bool v;<br>&nbsp;&nbsp;&nbsp; if (PimNode::get_pim_bidir(pim_bidir_name, v, error_msg)<br>&nbsp;&nbsp; &nbsp;!= XORP_OK) {<br>&nbsp;&nbsp; &nbsp;return XrlCmdError::COMMAND_FAILED(error_msg);
<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; enabled = v;<br>&nbsp;&nbsp;&nbsp; return XrlCmdError::OKAY();<br>}<br><br>XrlCmdError<br>XrlPimNode::pim_0_1_set_pim_bidir(<br>&nbsp;&nbsp;&nbsp; // Input values,<br>&nbsp;&nbsp;&nbsp; const string&amp;&nbsp;&nbsp; &nbsp;pim_bidir_name,<br>&nbsp;&nbsp;&nbsp; const bool&amp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;enable)
<br>{<br>&nbsp;&nbsp;&nbsp; string error_msg;<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; if (PimNode::set_pim_bidir(pim_bidir_name, enable,<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; error_msg)<br>&nbsp;&nbsp; &nbsp;!= XORP_OK) {<br>&nbsp;&nbsp; &nbsp;return XrlCmdError::COMMAND_FAILED(error_msg);<br>&nbsp;&nbsp;&nbsp; }
<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; return XrlCmdError::OKAY();<br>}<br><br>XrlCmdError<br>XrlPimNode::pim_0_1_reset_pim_bidir(<br>&nbsp;&nbsp;&nbsp; // Input values,<br>&nbsp;&nbsp;&nbsp; const string&amp;&nbsp;&nbsp; &nbsp;pim_bidir_name)<br>{<br>&nbsp;&nbsp;&nbsp; string error_msg;<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; if (PimNode::reset_pim_bidir(pim_bidir_name, error_msg)
<br>&nbsp;&nbsp; &nbsp;!= XORP_OK) {<br>&nbsp;&nbsp; &nbsp;return XrlCmdError::COMMAND_FAILED(error_msg);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;EventLoop&amp; eventloop)<br>&nbsp;&nbsp;&nbsp; : ProtoNode&lt;PimVif&gt;(family, module_id, eventloop),<br>&nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _pim_mrt(*this),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _pim_mrib_table(*this),
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _rp_table(*this),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _pim_bidir(false),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _pim_scope_zone_table(*this),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _pim_bsr(*this),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _is_switch_to_spt_enabled(false),&nbsp;&nbsp; &nbsp;// XXX: disabled by defailt<br>&nbsp;&nbsp; &nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _switch_to_spt_threshold_interval_sec(0),
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _switch_to_spt_threshold_bytes(0),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _is_log_trace(false)<br>..<br>..<br>..<br><br>IN file pim_node.hh<br><br>/*------------------------------------------------------*/<br>/*modification for pim bidir*/<br>
<br>int&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;get_pim_bidir(const string&amp; pim_bidir_name,<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; bool&amp; enabled,<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; string&amp; error_msg);<br><br><br><br>int&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;set_pim_bidir(const string&amp; pim_bidir_name,
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; bool enable,<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; string&amp; error_msg);<br><br><br><br>int&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;reset_pim_bidir(const string&amp; pim_bidir_name,<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string&amp; 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&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)&#39;:
<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&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;)&#39;
<br>./.libs/libpim.a(xrl_pim_node.o): In function `XrlPimNode::pim_0_1_set_pim_bidir(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, bool const&amp;)&#39;:<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&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, bool, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;)&#39;
<br>./.libs/libpim.a(xrl_pim_node.o): In function `XrlPimNode::pim_0_1_get_pim_bidir(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, bool&amp;)&#39;:<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&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, bool&amp;, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;)&#39;
<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&#39;<br>gmake[1]: *** [all-recursive] Error 1<br>gmake[1]: Leaving directory `/home/xorp/Desktop/project/bidir-enable/xorp-
1.3&#39;<br>gmake: *** [all] Error 2<br><br><br>can anyone let us know where might be the problem? !!!&nbsp; : ) <br><br>Also which flag we should we use as refrence for&nbsp; 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>