[Olsr-dev] olsrd mdns plugin for the impatients

ZioPRoTo (Saverio Proto) (spam-protected)
Sat Mar 7 21:30:51 CET 2009


So, here is some bad written code and a new plugin:

hg clone http://aquila.netgroup.uniroma2.it:8000/ olsrd-mdns

(it is just a "hg serve" left running, is it safe? we will move the
code somewhere more stable monday when we are back to work)

Look at the branch "adaptbmf"

What I did is copy the bmf folder and starting to comment out things I
did not need.

When the plugin starts looks in the config file for:

LoadPlugin "olsrd_mdns.so.1.0.0"
{
PlParam     "NonOlsrIf"  "eth1"
PlParam     "NonOlsrIf"  "eth2"
}

and creates a file descriptor for the specified interfaces.

After that it launches a thread (like bmf) and waits for some descript
to change (new packet). When a new multicast packet on port 5353
arrives it is created and sent a new olsr message that encapsulates
the packet.

At the receiver a olsr_parser function is registered to handle the
arrival of olsr messages of mdns type. This function gets the
encapsulated packet from the olsr message and sends this IP packet in
the interfaces specified in the config file.

It works... but I have done some error somewhere because packets are
missing their tail when they are decapsulated from a OLSR message.

I tested the plugin on netkit (www.netkit.org) with the following topology:

pc1 ----  r1 ---- r2 ----p2

where pc1 sends avahi messages, r1 and r2 speak OLSR and p2 is my tcpdump probe
here is the script of my netkit lab
http://aquila.netgroup.uniroma2.it/~saverio/mdnstesting.tar.bz2

we will also work to make this plugin fully IPv4/IPv6 compatible, but
right now it is just a big mess :)

Saverio




More information about the Olsr-dev mailing list