rohc_decomp_new2

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS
RETURN VALUE
NOTES
EXAMPLE
SEE ALSO

NAME

rohc_decomp_new2 − Create a new ROHC decompressor.

SYNOPSIS

#include <rohc/rohc_decomp.h>

struct rohc_decomp * rohc_decomp_new2(
const rohc_cid_type_t cid_type
,
const rohc_cid_t max_cid
,
const rohc_mode_t mode

);

DESCRIPTION

Create a new ROHC decompressor with the given type of CIDs, MAX_CID, and operational mode.

PARAMETERS

cid_type

The type of Context IDs (CID) that the ROHC decompressor shall operate with.
Accepted values are:

ROHC_SMALL_CID for small CIDs

ROHC_LARGE_CID for large CIDs

max_cid

The maximum value that the ROHC decompressor should use for context IDs (CID). As CIDs starts with value 0, the number of contexts is max_cid + 1.
Accepted values are:

• [0, ROHC_SMALL_CID_MAX] if cid_type is ROHC_SMALL_CID

• [0, ROHC_LARGE_CID_MAX] if cid_type is ROHC_LARGE_CID

mode

The operational mode that the ROHC decompressor shall target.

Accepted values are:

ROHC_U_MODE for the Unidirectional mode,

ROHC_O_MODE for the Bidirectional Optimistic mode,

ROHC_R_MODE for the Bidirectional Reliable mode is not supported yet: specifying ROHC_R_MODE is an error.

RETURN VALUE

The created decompressor if successful, NULL if creation failed

NOTES

Don’t forget to free decompressor memory with rohc_decomp_free if rohc_decomp_new2 succeeded

EXAMPLE

struct rohc_decomp *decompressor; /* the ROHC decompressor */

/* Create a ROHC decompressor to operate:
* − with large CIDs,
* − with the maximum of 5 streams (MAX_CID = 4),
* − in Unidirectional mode (U−mode).
*/
decompressor = rohc_decomp_new2(ROHC_LARGE_CID, 4, ROHC_U_MODE);
if(decompressor == NULL)
{
fprintf(stderr, "failed create the ROHC decompressor0);
goto error;
}

rohc_decomp_free(decompressor);

SEE ALSO

rohc_decomp.h(3), ROHC_SMALL_CID(3), ROHC_LARGE_CID(3), ROHC_SMALL_CID_MAX(3), ROHC_LARGE_CID_MAX(3), ROHC_U_MODE(3), ROHC_O_MODE(3), ROHC_R_MODE(3), rohc_decomp_free(3), rohc_decompress3(3), rohc_decomp_set_traces_cb2(3), rohc_decomp_enable_profiles(3), rohc_decomp_enable_profile(3), rohc_decomp_disable_profiles(3), rohc_decomp_disable_profile(3), rohc_decomp_set_mrru(3), rohc_decomp_set_features(3)