← 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'm trying to use rohc lib. The result is not right. I basically used the sample
> data provided by simple_rohc_program.c. Code snippet is as following, which
> shows what I did:
> [...]

The resulting packet is a valid ROHC packet. It is a ROHC packet that
uses the Uncompressed profile. That's why you recognize the original
non-compressed packet starting from the 4th byte.

However, there is something wrong with the example application. It
should compress the IP packet with the best profile that was enabled,
ie. the IP-only profile. That's not the case because I made a mistake
when building the fake IP packet. The Total Length field is in Host Byte
Order instead of Network Byte Order. The ROHC library therefore detects
that the packet is not a valid IP packet. In consequence it chooses the
Uncompressed profile instead of the IP-only profile.

I opened a ticket [1] and fixed the problem in the 1.5.x and main
branches. Thank you for reporting the problem!

Regards,
Didier

[1] https://bugs.launchpad.net/rohc/+bug/1178441

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