Return Value

Asked by regulararmy

Hello Didier,
         As for your library codes, if a Rohc packet is IR or IR_DYN type,or normal data packet, after successful decompression, the return value (return ret;) is the ROHC_OK or the size of decompressed packet ? Thank you.

Regards,
chenxisheng

Question information

Language:
English Edit question
Status:
Solved
For:
rohc Edit question
Assignee:
No assignee Edit question
Solved by:
Didier Barvaux
Solved:
Last query:
Last reply:
Revision history for this message
Best Didier Barvaux (didier-barvaux) said :
#1

If returned value >= 0, then decompression succeeded and the returned value is the length of the decompressed packet. Otherwise, decompression failed and the return value is an error code among:

/// Return code: the action can not proceed because no context is defined
#define ROHC_ERROR_NO_CONTEXT -1
/// Return code: the action failed due to an unattended or malformed packet
#define ROHC_ERROR_PACKET_FAILED -2
/// Return code: the action failed because the packet only contains feedback info
#define ROHC_FEEDBACK_ONLY -3
/// Return code: the action failed due to a CRC failure
#define ROHC_ERROR_CRC -4
/// Return code: the action encountered a problem
#define ROHC_ERROR -5

Please note that ROHC_FEEDBACK_ONLY might be considered as a special case of success too: no data was decompressed but it was expected since there were no real data to decompress.

The ROHC_ERROR is the generic error code when the others don't apply.

Regards,
Didier

Revision history for this message
regulararmy (regulararmy) said :
#2

Thanks Didier Barvaux, that solved my question.