MAC-LAYER LDA
if (DataRate ≥ 12 Mbps) then // station is closed to AP
RetryLimit =6 // default value
else if (DataRate > 6 Mbps) // possible signal failure
RetryLimit = 12 // begin to enlarge transmission window
else if (DataRate ≤ 6 Mbps) // probability of failure is max.
RetryLimit = 18 // continue to enlarge window
if (new segment) && (last segment dropped) // new TCP segment and last MAC retry failed
RetryLimit = RetryLimit+6 // enlarge again window
end if
end if.


CROSS-LAYER LDA
if (3 dup ack) then // loss indication in TCP NewReno algo.
LDA_Estimator =0 // initial value for congestion
for (i = 0; i ≤ n; i ++) // for all the not acknowledged segments
if (RetryCount = RetryLimit) then // segment is dropped, probably a short loss
LDA_Estimator =1 // set value for interferences. . .
end if
end for
end if

> Last edited by krishnakrmsccs; 11 Hours Ago at 06:19. Reason: i need c++ codes for both this algorithm
So slap in some curly braces and semicolons, and you're almost done.

What lazyness!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.