- From: Julio Kriger <juliokriger AT gmail.com>
- To: discussion AT sctp.de
- Subject: [SCTP-Discussion] duplicate tsn reports and process sack
- Date: Sun Jul 17 00:22:01 2005
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ikW/56/wsSBhdiGwU8Jp/rri9+dY+dtU/7nlKSNi1aOUJSrQMolFAtLyr0RCEcBILPldGPJBSXhJij8OLCxGiUgdA2tbY9Q39t2rhsmHweegtHdK9fmzDIeQ5VrCvM9TQ1g65o1thG/1Gmyq+MSOqt+P7qBVy9Y8Nr25NnL7U4s=
- List-id: SCTP Discussions <discussion.sctp.de>
Hi,
I'm working on some improvements on SCTP regarding duplicate tsn reports.
On the function "rtx_process_sack", after processing the tsn's on
the gap report, I process the tsn on the duplicate report. Well, for
simplicity, I do:
for each tsn on the duplicate report:
find the tsn initial destination or last destination
do something
Here is some code:
USHORT num_of_gaps = ntohs(sack->num_of_fragments);
USHORT num_of_dups = ntohs(sack->num_of_duplicates);
int pos = 0;
while (pos < num_of_dups) {
int index = (num_of_gaps * sizeof(fragment)) + (pos *
sizeof(duplicate));
duplicate * dup = (duplicate *) & (sack->fragments_and_dups[index]);
UINT dup_tsn = ntohl(dup->duplicate_tsn);
short destination = rrsctp_initial_destination(dup_tsn);
if (destination != -1) {
// do something !
} else {
// print ERROR
}
}
And here is the code of rrsctp_initial_destination:
short rrsctp_initial_destination(UINT tsn)
{
short ret = -1;
GList * tmp = NULL;
rtx_buffer * reliableTransfer = mdi_readReliableTransfer();
tmp = g_list_first(reliableTransfer->chunk_list);
while (tmp != NULL) {
chunk_data * data_chunk = (chunk_data *) tmp->data;
if (data_chunk->chunk_tsn == tsn) {
ret = data_chunk->initial_destination == -1 ?
data_chunk->last_destination : data_chunk->initial_destination;
break;
}
tmp = g_list_next(tmp);
}
return ret;
}
Well, I'm having a problem. The problem is that chunk_list of the
reliableTransfer don't contain the tsn on the duplicate report.
Where can I get the chunk list of tsn that de duplicate report show/reports?
Should the chunk_list of the reliableTransfer contain tsn on the
duplicate report?
When are tsn remove from the chunk_list of the reliableTransfer?
TIA
Regards,
Julio
--
----------------------------
Julio Kriger
mailto:juliokriger AT gmail.com
- [SCTP-Discussion] duplicate tsn reports and process sack, Julio Kriger, 07/17/2005
Archive powered by MHonArc 2.6.19+.