[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/ctp
CtpForwardingEngineP.nc, 1.9, 1.10
Omprakash Gnawali
gnawali at users.sourceforge.net
Tue Jan 1 20:02:47 PST 2008
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/ctp
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv28019
Modified Files:
CtpForwardingEngineP.nc
Log Message:
<= will detect loops in which all the nodes have the same metric to the root
Index: CtpForwardingEngineP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.nc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** CtpForwardingEngineP.nc 5 Dec 2007 22:30:57 -0000 1.9
--- CtpForwardingEngineP.nc 2 Jan 2008 04:02:45 -0000 1.10
***************
*** 685,691 ****
if (call CtpInfo.getEtx(&gradient) == SUCCESS) {
// We only check for loops if we know our own metric
! if (call CtpPacket.getEtx(m) < gradient) {
! // The incoming packet's metric (gradient) is less than our
! // own gradient. Trigger a route update and backoff.
call CtpInfo.triggerImmediateRouteUpdate();
startRetxmitTimer(LOOPY_WINDOW, LOOPY_OFFSET);
--- 685,693 ----
if (call CtpInfo.getEtx(&gradient) == SUCCESS) {
// We only check for loops if we know our own metric
! if (call CtpPacket.getEtx(m) <= gradient) {
! // If our etx metric is less than or equal to the etx value
! // on the packet (etx of the previous hop node), then we believe
! // we are in a loop.
! // Trigger a route update and backoff.
call CtpInfo.triggerImmediateRouteUpdate();
startRetxmitTimer(LOOPY_WINDOW, LOOPY_OFFSET);
More information about the Tinyos-2-commits
mailing list