now i am trying to think how to write a function, that take two param a 1)big subnet where to look for free ips and 2)the number of contiguous ips needed, and return the small subnet assigned to that node<br>when used may look something like this:<br>
<br>mysubnet=getFreeSpace("<a href="http://100.0.0.0/6">100.0.0.0/6</a>", 32);<br><br>"<a href="http://100.0.0.0/6">100.0.0.0/6</a>" is the big subnet where look for a free space, and 32 is the number of contiguous ip needed after this mysubnet will contain something like "<a href="http://102.0.0.32/27">102.0.0.32/27</a>"<br>
<br>the function will look for already used ipv4 address on olsr hna6 that match ipv4 mapped pattern and then return a non used subnet that will used for auto configuration<br>"<a href="http://100.0.0.0/6">100.0.0.0/6</a>" and 32 are in plugin configuration that may look like:<br>
<br>LoadPlugin "olsrd_auto64conf.so.0.1"<br>{<br> PlParam "interface" "eth0"<br> PlParam "bigsubnet" "<a href="http://100.0.0.0/6">100.0.0.0/6</a>"<br> PlParam "clientnumber" "16"<br>
<br> PlParam "interface" "ath0"<br>
PlParam "bigsubnet" "<a href="http://100.0.0.0/6">100.0.0.0/6</a>"<br>
PlParam "clientnumber" "32"<br>}<br><br>this should tell to the plugin to auto configure eth0 to take a subnet for 16 client and ath0 to take a subnet for 32 client<br><br><div class="gmail_quote">
2010/6/19 ZioPRoTo (Saverio Proto) <span dir="ltr"><<a href="mailto:zioproto@gmail.com">zioproto@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">> There is also possible to change interface ip from inside an olsrd plugin ?<br>
> Or is more convenient to do an external script for this type of thing and<br>
> call it from osrd when needed?<br>
<br>
</div>premature optimization ! :)<br>
<br>
try to have something that works calling some system("ifconfig") first :)<br>
<font color="#888888"><br>
Saverio<br>
</font></blockquote></div><br>