|
nodes[i].outgoing[j] = j; |
Set this as nodes[i].outgoing[j] = 1; which should be the initial value of number of hops.
|
nodes[i].outgoing[j] = k; |
Here, every time a new path is chosen, increase the number of hops by 1 by doing nodes[i].outgoing[j] += 1;
Computer-Networks/C Programs/DistanceVectorRouting.c
Line 17 in 32e1682
Set this as
nodes[i].outgoing[j] = 1;which should be the initial value of number of hops.Computer-Networks/C Programs/DistanceVectorRouting.c
Line 34 in 32e1682
Here, every time a new path is chosen, increase the number of hops by 1 by doing
nodes[i].outgoing[j] += 1;