Menu [hide]

Forum: DCCP-TP

Forums->DCCP-TP->getCurrentRTO

gillbrent
getCurrentRTO


Hello,

I am looking the code and in "DctpRawApi.c" in function "dctpiCloseConnection" you are using function "getCurrentRTO"
which is defined in "struct _dctpCcidSenderFuncs" in "dctpcore.c".

But where does the defination i found text written by tom as Comments "Interfaces to CCIDs" then if its interface then defination must not be exists. but wonder then what does this functin do ?

BR
Sami G.


 
on: Wed 28 of May, 2008 [17:57 UTC] reads: 3246

Posted messages

author message
trphelan
Re: getCurrentRTO
on: Wed 28 of May, 2008 [19:21 UTC]
Hi Sami,

That's an indirect call — getCurrentRTO is a pointer to a function, not a function. The function that actually gets called is ccid2SenderGetCurrentRTT in ccid2Sender.c.

Basically, the dctpCcidSenderFuncs structure allows the core DCCP code to work with various CCIDs without changing it for each new CCID. In the version R0.00 code there's only one CCID, and the sender and receiver function pointer structures are initialized at compile time. In the next version (coming out real soon now :-)), which has CCID 3, there have been some slight changes that allow the function pointers to be set up at run time (and some checks in the DCCP code to be sure not to use NULL pointers), but the same basic interface applies.

Tom P.




Show posts: