<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font face="Helvetica, Arial, sans-serif">Rilasciat<font
        face="Helvetica, Arial, sans-serif">a</font> netdiff 0.1<br>
      <br>
      <font face="Helvetica, Arial, sans-serif">Provatela! Ci vogliono 5<font
          face="Helvetica, Arial, sans-serif">-10 min.<br>
          <br>
        </font></font><font face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-freetext" href="https://github.com/ninuxorg/netdiff">https://github.com/ninuxorg/netdiff</a></font><br>
    </font>
    <div class="moz-forward-container"><br>
      <br>
      -------- Forwarded Message --------
      <table class="moz-email-headers-table" border="0" cellpadding="0"
        cellspacing="0">
        <tbody>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Subject:
            </th>
            <td>[Interop-dev] netdiff 0.1 released</td>
          </tr>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Date: </th>
            <td>Sat, 02 May 2015 21:40:14 +0200</td>
          </tr>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">From: </th>
            <td>Nemesis <a class="moz-txt-link-rfc2396E" href="mailto:nemesis@ninux.org"><nemesis@ninux.org></a></td>
          </tr>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">To: </th>
            <td><a class="moz-txt-link-abbreviated" href="mailto:interop-dev@lists.funkfeuer.at">interop-dev@lists.funkfeuer.at</a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      <div class="moz-text-html" lang="x-unicode"> <font
          face="Helvetica, Arial, sans-serif"><font face="Helvetica,
            Arial, sans-serif">Hey,<br>
            <br>
            <font face="Helvetica, Arial, sans-serif">we just released
              this very simple experimental python library</font> that
            we call<font face="Helvetica, Arial, sans-serif">ed
              "netdiff".</font><br>
            <font face="Helvetica, Arial, sans-serif"><font
                face="Helvetica, Arial, sans-serif"><font
                  face="Helvetica, Arial, sans-serif"><br>
                  <font face="Helvetica, Arial, sans-serif">What can you
                    do with it?<br>
                    <br>
                  </font><font face="Helvetica, Arial, sans-serif">Mainly

                    figure out changes to the netwo<font
                      face="Helvetica, Arial, sans-serif">r<font
                        face="Helvetica, Arial, sans-serif">k topology.
                        <br>
                        <font face="Helvetica, Arial, sans-serif"><font
                            face="Helvetica, Arial, sans-serif">Currently

                            only olsr 0.6.x and <font face="Helvetica,
                              Arial, sans-serif">batman-advanced are <font
                                face="Helvetica, Arial, sans-serif">implemented,

                                but it<font face="Helvetica, Arial,
                                  sans-serif"> should be<font
                                    face="Helvetica, Arial, sans-serif">
                                  </font></font>quite easy to implement
                                other routing protocols</font>.</font></font></font><br>
                      </font></font></font><br>
                </font></font></font></font></font>
        <pre>from netdiff import OlsrParser</pre>
        <pre>from netdiff import diff</pre>
        <pre>from time import sleep</pre>
        <pre>current = OlsrParser('<a class="moz-txt-link-freetext" href="http://127.0.0.1:2006">http://127.0.0.1:2006</a>')

# wait 2 minutes
time.sleep(120)

latest = OlsrParser('<a class="moz-txt-link-freetext" href="http://127.0.0.1:2006">http://127.0.0.1:2006</a>')
</pre>
        <pre>diff(current, latest)
</pre>
        will return something like:<br>
        <br>
        <pre>{</pre>
        <pre>    "removed": [</pre>
        <pre>        ["10.150.0.7", "10.150.0.9"]</pre>
        <pre>    ], </pre>
        <pre>    "added": [</pre>
        <pre>        ["10.150.0.5", "10.150.0.4"]</pre>
        <pre>    ]</pre>
        <pre>}</pre>
        <br>
        Another cool thing is to output a NetworkGraph json object, eg:<br>
        <br>
        <pre>from netdiff import BatmanParser</pre>
        <pre>from netdiff import diff</pre>
        <pre>batman = BatmanParser('./test/alfred-output.json')</pre>
        <pre>batman.json()</pre>
        <br>
        will output:<br>
        <br>
        <pre>{</pre>
        <pre>    "type": "NetworkGraph", </pre>
        <pre>    "protocol": "batman-adv", </pre>
        <pre>    "version": "2014.3.0", </pre>
        <pre>    "revision": null, </pre>
        <pre>    "metric": "TQ", </pre>
        <pre>    "nodes": [</pre>
        <pre>        {</pre>
        <pre>            "id": "a0:f3:c1:ac:6c:44"</pre>
        <pre>        }, </pre>
        <pre>        {</pre>
        <pre>            "id": "a0:f3:c1:96:94:06"</pre>
        <pre>        }, </pre>
        <pre>        {</pre>
        <pre>            "id": "10:fe:ed:37:3a:39"</pre>
        <pre>        }, </pre>
        <pre>        {</pre>
        <pre>            "id": "00:05:1c:06:35:8e"</pre>
        <pre>        }, </pre>
        <pre>        {</pre>
        <pre>            "id": "90:f6:52:f2:8c:2c"</pre>
        <pre>        }</pre>
        <pre>    ], </pre>
        <pre>    "links": [</pre>
        <pre>        {</pre>
        <pre>            "source": "a0:f3:c1:ac:6c:44", </pre>
        <pre>            "target": "10:fe:ed:37:3a:39", </pre>
        <pre>            "weight": "1.000"</pre>
        <pre>        }, </pre>
        <pre>        {</pre>
        <pre>            "source": "a0:f3:c1:96:94:06", </pre>
        <pre>            "target": "90:f6:52:f2:8c:2c", </pre>
        <pre>            "weight": "1.000"</pre>
        <pre>        }, </pre>
        <pre>        {</pre>
        <pre>            "source": "10:fe:ed:37:3a:39", </pre>
        <pre>            "target": "90:f6:52:f2:8c:2c", </pre>
        <pre>            "weight": "1.000"</pre>
        <pre>        }, </pre>
        <pre>        {</pre>
        <pre>            "source": "00:05:1c:06:35:8e", </pre>
        <pre>            "target": "90:f6:52:f2:8c:2c", </pre>
        <pre>            "weight": "1.000"</pre>
        <pre>        }</pre>
        <pre>    ]</pre>
        <pre>}</pre>
        <br>
        Why we separated this logic into a library?<br>
        <ul>
          <li>not tied to any particular framework or node-database,
            it's pure python</li>
          <li>easy to add more routing protocols, newcomers can work on
            it more easily compared to having to delve into a
            node-database</li>
          <li>it's possible to add some nice features that we'll
            implement in the near future thanks to the networkx library:</li>
          <ul>
            <li>calculating betweenness centrality</li>
            <li>merge topologies of different nodes of an island into
              one (union), so that if the network gets split up, it is
              possible to draw a complete topology with just the missing
              link, and not just half topology</li>
          </ul>
        </ul>
        <p>So.. there's still some hard work to do to integrate this
          into our node-db but I hope this experiment succeeds!<br>
        </p>
        <p>We are open for suggestions and improvements.<br>
        </p>
        <p>Federico<br>
        </p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <div class="moz-text-plain" wrap="true" graphical-quote="true"
        style="font-size: 16px;" lang="x-western">
        <pre wrap="">_______________________________________________
Interop-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Interop-dev@lists.funkfeuer.at">Interop-dev@lists.funkfeuer.at</a>
<a class="moz-txt-link-freetext" href="https://lists.funkfeuer.at/mailman/listinfo/interop-dev">https://lists.funkfeuer.at/mailman/listinfo/interop-dev</a>
</pre>
      </div>
    </div>
  </body>
</html>