[OLSR-users] How do you use OLSR within a custom application?
Roar Bjørgum Rotvik
(spam-protected)
Tue Jan 17 09:39:21 CET 2006
AGF wrote:
>
> Hi there,
>
> I am currently trying that is to route data on an ad hoc network.
>
> Once I have installed the protocol, how would I go about writing an
> application in JAVA (or any other language) that is to use OLSR (or any
> other routing protocol)?
Applications do not need to know of or use the routing protocol. OLSRD
maintains the in kernel routing table (inside the operating system) and
it is this routing table that is used by the OS to route packets.
A very short description of OLSR routing:
So when you start OLSRD on each ad hoc node and they are connected by IP
(check with ping), OLSRD on each node will start to broadcast HELLO
packets (from the OLSR standard). When a OLSR node "hears" another OLSR
node (both ways) they will add a route entry to each other.
Each node also shares information about what other nodes it can hear, so
that the routing information also covers nodes many hops away.
Any application wanting to send to the other node may do so after the
routing is established by OLSRD, but the application does not need to
know anything about the routing protocol.
> For instance, do I send and receive the packets/data from within my
> appliaction to port 654? And do I also listen on this same port? Or is
> there another allocated port?
Your application may send/receive on any port for the application
spesific traffic, but your application does not need to speak to OLSRD
at all.
OLSR is allocated UDP port 698 by the way, but as long as your
application does not implement the OLSR protocol, it should not
communicate on this port to the OLSRD implementation :)
> Also, once I have installed OLSR, is there a simple way to test if the
> protocol is working?
Start OLSRD on two machines with IP connection and check by ping that
the connection works and double check that the other machine IP address
exist in the routing table ("route -n" on Linux).
Add more nodes and see that they also appear in the routing table after
a while.
> A hint or two would be greatly appreciated.
I cannot tell you any more spesific thing unless you tries to explain
better what you are trying to do?
- Do you just want routing in an ad hoc network so your application can
work amongst the nodes?
- Do you need to access routing information from your application
(normally you would not need this just for communication between your
application instances in different nodes)?
- Do you want to create a OLSRD plugin that may "flood" information in
the ad hoc network (probably not)?
--
Roar Bjørgum Rotvik
More information about the Olsr-users
mailing list