Adding new timer in FreeBSD TCP..help

Amit Mondal amit.freebsd at gmail.com
Fri Aug 18 20:00:22 UTC 2006


Hi all,
I am a newbie in FreeBSD.
I am modifying TCP to add a new timer for some security ehancement purpose.
I stuck with the following issue.

For my case, I need to associate a timer for each incoming packet. But
adding timer for each incoming packet will
significantly degrade the performance of TCP.
So what I decided to do, is that whenever a packet is received, i start a
timer with the appropriate value.
Now when the next packet comes, instead of starting another timer
immediately I wanna reuse the earlier
time. So, I wanna note down when the packet came and if I had started the
timer immediately when would it have  expried.

Now when the timer associated the first packet expires, I reassociate the
timer with the next packet with re-adjusted
timer value.

Now, the problem is that, in TCP all timer values are in *ticks* and how do
I convert the timestamps/duratuion in ticks. Also,
my timer value is a function of SRTT (which is in ticks, I guess). Again how
do I convert ticks into time duration.

I need the time stamp, when the packet is received?

Could anyone pls give some insight?


Rgds,
-Amit


More information about the freebsd-net mailing list