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

ZioPRoTo (Saverio Proto) (spam-protected)
Wed Jul 15 15:54:08 CEST 2009


> Internally OLSr use a 32 bit unsigned integer for storing the "cost" of a link
> in the topology graph. In the case of ETX they are just a multiple of the ETX
> value, for other metrics it might be something else.
>
> To determine which route/link is better/worse, it's enough to compare this
> unsigned integers so you don't have to worry about ETX/linkcost
> representation.

OK, to debug I'm printing this:

OLSR_DEBUG(LOG_PLUGINS,"ROUTING TO node %s costs
%u",ip4_to_string(&buf,tmp->neighbor_ip_addr.v4),rt->rt_best->rtp_metric.cost);

and I get as output some value like:

13:42:38.975 DEBUG(plugins) src/obamp.c 421: ROUTING TO node
172.16.100.1 costs 131072
13:42:38.983 DEBUG(plugins) src/obamp.c 421: ROUTING TO node
172.16.100.4 costs 65536

are this numbers reasonable or I'm getting the wrong numbers ??

Saverio




More information about the Olsr-dev mailing list