← Back to team overview

rohc team mailing list archive

Re: [Question #228535]: result of rohc_compress() is not correct

 

Question #228535 on rohc changed:
https://answers.launchpad.net/rohc/+question/228535

    Status: Open => Answered

Didier Barvaux proposed the following answer:
Wei,

> I don't know where I didn't do correctly. Here are the steps I did:
> (1) create compressor by rohc_alloc_compressor()
> (2) activate profile(s) by rohc_activate_profile()
> (3) prepare data packet
> (4) call rohc_compress()

Don't concatenate IP headers, IP payloads or even full IP packets. Just
compress one packet at a time. One IP packet results in one ROHC packet.

(1) create compressor by rohc_alloc_compressor()
(2) activate profile(s) by rohc_activate_profile()
(3) prepare IP packet #1
(4) call rohc_compress() with IP packet #1
(5) prepare IP packet #2
(6) call rohc_compress() with IP packet #2
(7) prepare IP packet #3
(8) call rohc_compress() with IP packet #3
...
(x-1) prepare IP packet #n
(x) call rohc_compress() with IP packet #n


I _strongly_ encourage you to read documentation (or ask an experimented person in your school/company) about network protocols in general, the IPv4 protocol, the UDP protocol, the RTP protocol, and of course the ROHC protocol. For the ROHC protocol, read at least the English wikipedia page [1] and the protocol overview on the project's wiki [2]. I will answer to any of your questions about the ROHC protocol, but I won't teach you generalities about network protocols and the IPv4/UDP/RTP protocols.

[1] https://en.wikipedia.org/wiki/ROHC
[2] http://rohc-lib.org/wiki/doku.php?id=rohc-protocol


> Sorry I keep bothering you with these dummy questions.
> And I don't want to waste space on your website. Can you
> please reply by email? My email address is SNIP.

The mailing list is for questions about the ROHC protocol and the ROHC
library, so you're not at the wrong place. You're a beginner, so you're
making mistakes and asking naive questions. Nothing surprising here.
Improving your knowledge about network protocols should help you asking
smarter questions.

As a last word, I avoid answering in private so that:
 - anyone on the list can answer you,
 - anyone on the list can learn from the answers of others,
 - the search engines put the answers in their databases.

Regards,
Didier

-- 
You received this question notification because you are a member of ROHC
Team, which is an answer contact for rohc.