rohc_decomp_set_rate_limits

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS
STRUCTURES
RETURN VALUE
EXAMPLE
SEE ALSO

NAME

rohc_decomp_set_rate_limits − Set the rate limits for feedbacks.

SYNOPSIS

#include <rohc/rohc_decomp.h>

bool rohc_decomp_set_rate_limits(
struct rohc_decomp *const decomp
,
const size_t k
,
const size_t n
,
const size_t k_1
,
const size_t n_1
,
const size_t k_2
,
const size_t n_2

);

DESCRIPTION

Set the rate limits for positive feedbacks (ACK) and negative feedbacks (NACK and STATIC−NACK).

There are 3 different rate limits:

• the rate limit to avoid sending the same type of feedback too often: it applies to all feedback types (ACK, NACK, STATIC−NACK) and it is specified by the parameters k and n ;

• the rate limit to avoid sending NACKs too quickly after a sporadic CRC failure: it is specified by the parameters k_1 and n_1 ;

• the rate limit to avoid sending STATIC−NACKs too quickly after a sporadic CRC failure: it is specified by the parameters k_2 and n_2 ;

In all 3 cases above, the k/k_1/k_2 and n/n_1/n_2 parameters define 3 ratios of packets:

• a feedback is sent every k packets out of n packets that cause the same feedback type to be sent ;

• a NACK is not sent before k_1 packets out of n_1 packets failed because of a CRC failure in the Full Context state ;

• a STATIC−NACK is not sent before k_1 packets out of n_1 packets failed because of a CRC failure in the Static Context state ;

The default values are:

• k = 1 and n = default pRTT (see rohc_decomp_set_prtt for details)

• k_1 = 30 and n_1 = 100, ie. 30%

• k_2 = 30 and n_2 = 100, ie. 30%

If your network streams and conditions differ, change the default value.

The n/n_1/n_2 values shall not be zero.

PARAMETERS

decomp

The ROHC decompressor

k

The k rate−limit parameter to avoid sending feedback too often

n

The n rate−limit parameter to avoid sending feedback too often

k_1

The k_1 rate−limit parameter to avoid sending NACKs too quickly

n_1

The n_1 rate−limit parameter to avoid sending NACKs too quickly

k_2

The k_2 rate−limit parameter to avoid sending STATIC−NACKs too quickly

n_2

The n_2 rate−limit parameter to avoid sending STATIC−NACKs too quickly

STRUCTURES

RETURN VALUE

true if the new values were successfully set, false otherwise

EXAMPLE

struct rohc_decomp *decomp;

/* create the ROHC decompressor in unidirectional mode */
decomp = rohc_decomp_new2(ROHC_SMALL_CID, ROHC_SMALL_CID_MAX, ROHC_U_MODE);
if(decomp == NULL)
{
fprintf(stderr, "failed to create the ROHC decompressor0);
goto destroy_comp;
}

/* increase the default rate limits */
if(!rohc_decomp_set_rate_limits(decomp, 4, 100, 20, 100, 20, 100))
{
fprintf(stderr, "failed to increase the default rate limits0);
goto destroy_decomp;
}

SEE ALSO

rohc_decomp.h(3), rohc_decomp_get_rate_limits(3), rohc_decomp_set_prtt(3), rohc_decomp_get_prtt(3), rohc_decompress3(3)