rohc team mailing list archive
-
rohc team
-
Mailing list archive
-
Message #00988
Re: [Question #229448]: about feedback
Question #229448 on rohc changed:
https://answers.launchpad.net/rohc/+question/229448
Status: Open => Answered
Didier Barvaux proposed the following answer:
Hello,
> In such a case, feedbacks are sent alone,however,how can we realize
> it in the codes? the logic may be not clear.
Call the rohc_feedback_flush() function of the ROHC library. It will
write a ROHC packet (full of feedback data) in the obuf buffer and will
return the length of that packet. You can then transmit it as any other
ROHC packet.
[1] http://bazaar.launchpad.net/~didier-
barvaux/rohc/1.5.x/view/head:/src/comp/rohc_comp.c#L1294
> In additon,I wonder if the feedback data sent alone do not need to be
> compressed
No, a feedback packet does not need to be compressed!
Please the project wiki and the relevant parts of the RFC:
http://rohc-lib.org/wiki/doku.php?id=rohc-protocol
https://tools.ietf.org/html/rfc3095#section-5.2.1
https://tools.ietf.org/html/rfc3095#section-5.2.2
> and if it is received by the another end, we do not bulid and
> send a feedback data for it?
A feedback packet will not generate a feedback packet on the other side.
> Secondly, As for the three parameters:feedbacks_first,
> feedbacks_first_unlocked and feedbacks_next,what is the
> relationship among them , and what is the meaning for "lock" or
> "unlocked" ?
The rohc_feedback_flush() returns you some feedbacks. You try to
transmit them. If it succeeds, that's great. If it fails, the feedbacks
are lost because the library don't remember them: the next call to
rohc_feedback_flush() will give you other feedbacks. You can record the
feedbacks in your own program, but that's not very practical.
So, in order to handle that case the locked/unlocked status was added: when you call the rohc_feedback_flush() function, the library returns you some feedbacks (maybe not all the feedbacks it got if your buffer is too small), but keeps those feedbacks in its buffers: they are locked.
If your transmission succeeds, you can tell the library to remove the locked feedbacks with the rohc_feedback_remove_locked() function.
If your transmission fails, you can tell the library to keep and unlock the feedbacks with the rohc_feedback_unlock() function: they will therefore be returned by the next call to rohc_feedback_flush().
That's a kind of transaction to gracefully handle failure cases.
Regards,
Didier
--
You received this question notification because you are a member of ROHC
Team, which is an answer contact for rohc.