<br><br><div class="gmail_quote">On Thu, Apr 12, 2012 at 11:55 AM, Mitar <span dir="ltr"><<a href="mailto:mmitar@gmail.com">mmitar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi!<br>
<div class="im"><br>
On Thu, Apr 12, 2012 at 11:15 AM, Markus Kittenberger<br>
<<a href="mailto:Markus.Kittenberger@gmx.at">Markus.Kittenberger@gmx.at</a>> wrote:<br>
> is to define many interfaces in olsrd.conf that do not exist,.. (-;<br>
><br>
> e.g. put a interface list of e.g. tap0 .. tap100 into olsrd.conf<br>
<br>
</div>There is no way to specify for example "tap+" like any interface which<br>
starts with "tap"?<br></blockquote><div>nice idea,..</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> so maybe the olsrd interface polling will slow down quadratically, as olsrd<br>
> has an interface list, and the kernel too. (and uses it for for name to ID<br>
> translations of interfaces)<br>
<br>
</div>Yes, and it probably has to map from name to ID all the time, because<br>
interface could change in mean-time (replaced with some other tunnel),<br>
but with the same name.<br></blockquote><div>with the netlink listener this is no issue anyways (not sure if it was one before) </div><div><br></div><div>imho the best (for sane performance on really many interfaces) would be to remove the polling, and make sure the netlink listeners alone really handle all possible changes.</div>
<div>(handling adding and removing of interfaces is easy via netlink events, but polling also checks for addresses (is easy via netlink too) and some other settings, and i guess they are (beside just keeping polling in olsrd for safety) the reason why we still poll the interfaces)</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
How does it "subscribe" to changes?</blockquote><div>olsrd more or less listens to the netlink events u can listen to in shell with:</div><div>ip monitor link </div><div><br></div><div>it could subscribe to more (e.g. ip monitor all)</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> By interface name or interface ID?<br></blockquote><div>afair it just subscribes to all interface (=RTMGRP_LINK) events </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Does Linux API provides some way of saying to listen for all such and<br>
such interfaces?<br></blockquote><div>don't think so. (a listener can just select which multicast groups it wants to join, e.g. RTMGRP_LINK or ROUTE or NEIGH or IFADDR ...)<br>but filtering the events in olsrd after receive is not that hard.</div>
</div><div><br></div><div>Markus<br></div>