Thank you for your answer. I will check that. <br><br>By the way, may I apply the patch you mentioned after having applied the MCoA patch?.<br><br><br><div class="gmail_quote">2009/9/18 Arnaud Ebalard <span dir="ltr">&lt;<a href="mailto:arno@natisbad.org">arno@natisbad.org</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<div><div></div><div class="h5"><br>
Angel Bartomeu Bonillo &lt;<a href="mailto:angelbartomeu@gmail.com">angelbartomeu@gmail.com</a>&gt; writes:<br>
<br>
&gt; I installed a piece of code in the movement.c file (some kind of back door)<br>
&gt; so I can manipulate some of the behaviour of the Mobile Router from another<br>
&gt; software I wrote.<br>
&gt; Since I do not know exactly the details of this implementation, I am trying<br>
&gt; not to touch the data structures by just trying to fake some events that<br>
&gt; lead to what I need the code to do for me.<br>
&gt; So far, my code is able to fake the arrival of a Router Advertisement (by<br>
&gt; calling the md_recv_ra funtion) so the mip6d register a binding with the HA<br>
&gt; and one tunnel is created.<br>
&gt; However, I am stuck trying to make the code to expire the binding (which<br>
&gt; should lead to the tunnel removal) when I wish.<br>
&gt;<br>
&gt; Basically, what I do now is to call the function &quot;md_expire_coa(iface, coa)&quot;<br>
&gt; and then calling &quot;__md_trigger_movement_event(ME_COA_EXPIRED, 0, iface,<br>
&gt; coa)&quot;<br>
&gt; but thought apparently the CoA is removed from the iface, the binding is<br>
&gt; still active in both the Mobile Router and the HA. I also tried to use the<br>
&gt; funtion md_free_router(rtr) but, since the default route is removed, no<br>
&gt; communication with the HA is possible.<br>
&gt;<br>
&gt; What am I missing? what else should I do to make the Mobile Router code send<br>
&gt; the Binding de-registration and deleting the tunnel corresponding to the CoA<br>
&gt; I want to stop using?<br>
<br>
</div></div>I think using &quot;__md_trigger_movement_event(ME_COA_EXPIRED, 0, iface,<br>
coa)&quot; should work. Take a look at process_del_addr() to see what else is<br>
needed.<br>
<br>
That been said, if you externally remove the address from the iface<br>
(like with &quot;ip addr del 2001:db8::1 dev eth0&quot;), umip will detect the<br>
change and switch to another address (if one is available). Is there any<br>
particular reason to do that from inside umip.<br>
<br>
For the fake arrival of a RA, can&#39;t you use the tunnel patch I have and<br>
do things outside UMIP: it allows using interfaces which are externally<br>
configured (like teredo ifaces, ppp ifaces, 6to4 ifaces, ...), i.e. for<br>
which UMIP does not need to send RS and process RA :<br>
<br>
<a href="http://hg.natisbad.org/migrate2_patches_umip_nemo/file/0d825828357e/tunnel_support.patch" target="_blank">http://hg.natisbad.org/migrate2_patches_umip_nemo/file/0d825828357e/tunnel_support.patch</a><br>
<br>
It works with NEMO (for sure) but has never been tested with mcoa, though.<br>
<br>
Cheers,<br>
<font color="#888888"><br>
a+<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Ángel Bartomeu Bonillo.<br>C/ Federico García Lorca 28º Esc1 Bajo  B<br>30009 Murcia (España)<br>