Ethereal-dev: [Ethereal-dev] To sleep or not sleep

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Sofia Altieri" <sofiaaltieri@xxxxxxxxxxx>
Date: Fri, 24 Mar 2006 11:45:04 +0000
'Morning List,

I've written a routine that checks whether my proto packets are retransmitted or not. My routine assumes that if an ACK was received for packet P there's no reason why P should be retransmitted.

So, my routine stores P and when ACKP is received P is freed.

Unluckily it's not rare the case here presented:

-P
.
.
-ACKP
-P resent

This is because ACKP arrives after timer is out.

So my routine doesn't work properly because 'resent P' *IS* not labelled as RESENT (since previous P has been freed, ACKP being received).

So, either I never free stored P or I *WAIT* to free P. This means that my routine must "sleep".

Isn't it 'inefficient' to use sleep(), precisely in live captures? Thanks

_________________________________________________________________
Ricerche online più semplici e veloci con MSN Toolbar! http://toolbar.msn.it/