Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Aug 2006 15:00:21 -0500
From:      "Amit Mondal" <amit.freebsd@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   Adding new timer in FreeBSD TCP..help
Message-ID:  <a6cf19a10608181300r35a8b62fmf7c038ef70ac5c8a@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a6cf19a10608181300r35a8b62fmf7c038ef70ac5c8a>