<div dir="ltr"><div>Hi everybody!</div><div><br></div><div>I need your help in developing the proper method to iterate over sources :) For instance for routes, some time ago M. Boutier helped me highlighting this piece of code</div><div>    </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">You must iterate over all the routing entries with "route streams" and search<br>the one you want (or write your own function). For example:<br>    struct babel_route * rt = NULL;<br>    struct route_stream * stream = NULL;<br>    stream = route_stream (ROUTE_INSTALLED); / * Or _ALL, or _SS_INSTALLED * /<br>    while (1) {<br>        rt = route_stream_next (stream);<br>        if (rt == NULL) break;<br>        / * Your code * /<br>        min = min_route (rt, min);<br>    }<br>    route_stream_done (stream);</blockquote><div><br></div><div>Now I need something very similar but for sources, even better if it is possible to iterate over ALL_KNOWN sources and INSTALLED sources. With INSTALLED sources I mean only sources related to INSTALLED routes.</div><div><br></div><div>I tried to get all the "installed sources" iterating over installed routes and retrieving the related src, but I got lots of duplicates (when different routes share the same src). I would like to avoid duplicates and write a more elegant method consistent with the rest of the code :)</div><div><br></div><div>Any advice?</div><div><br></div><div>Thank you and regards,</div><div><br></div><div>Lorenzo</div></div>