[Olsr-dev] getting the etx value to a destination

Henning Rogge (spam-protected)
Mon Jul 13 18:06:14 CEST 2009

Am Montag 13 Juli 2009 17:58:29 schrieb ZioPRoTo (Saverio Proto):
> > For olsrd 0.5.6 the txtinfo is the best way to do this.
> I don't like the idea of a Plugin depending on another plugin
> And btw if I'm correct with the txtinfo you get only the ETX value of
> every single link.
> What I'm looking for is:
> "the ETX of the best path from the current node to another node".
> I think this value is computed to create the routing table, isn't it ?
> I've seen this structure around... maybe is the one I'm looking for ?
> struct rt_metric {
>   olsr_linkcost cost;
>   uint32_t hops;
> };
> I need it because I'd like OBAMP to consider the distance in terms of
> ETX sum to reach another node, and not to consider just the number of
> hops.
> > For olsrd tiptip (the development branch which will become the next
> > stable one) we could implement a special "ask for linkcost value"
> > command. ETX is a floating point value, so working with raw linkcost
> > might be a good idea.
> Of course if what I need is not in the code I can try to make a patch :)
Ahh, it's another plugin ? I thought about an indipendant service.

In this case you can just use the function 
struct rt_entry *olsr_lookup_routing_table(union olsr_ip_addr *)

"rt->rt_best->rtp_metric.cost" is the value you are looking for, a 32 bit 
unsigned integer which gives you the cost (low = good, high = bad ;) ) of the 
route to the target.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20090713/3d1475c5/attachment.sig>

More information about the Olsr-dev mailing list