[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: metric? procedure
Hello,
My question to the ns-users newgroup on Nov.23 was about metric? procedure
that exists in rtObject class but not in RouteLogic class.
Kannan answered how to get metric function for the static routing:
>The routine that compute the static routes uses an array hopcnt_
>internally that it destroys after the route computation is done.
>You could change that to be a statically allocated array, and fix
>RouteLogic::compute_routes() in route.cc. Then, you need to add
>to the RouteLogic::command() routine to read a src/dst, and return
>the hopcnt_ value.
I havent't succeeded to manage this. Do I get metric between given source "i"
and destination "j" with hopcnt_(INDEX(i, j, size_))? Where I can read the
right value of hopcnt_ (that represents metric) in the
RouteLogic::compute_routes() function? If I read the hopcnt_ at the end of the
function (before it is originally destroyed) I got that the metric is always
INFINITY.
Kannan could you please help me?
Thanks in advance,
Ljubica