rohc_comp_get_general_info

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS
STRUCTURES
RETURN VALUE
SEE ALSO

NAME

rohc_comp_get_general_info − Get some general information about the compressor.

SYNOPSIS

#include <rohc/rohc_comp.h>

bool rohc_comp_get_general_info(
const struct rohc_comp *const comp
,
rohc_comp_general_info_t *const info

);

DESCRIPTION

Get some general information about the compressor.

To use the function, call it with a pointer on a pre−allocated rohc_comp_general_info_t structure with the version_major and version_minor fields set to one of the following supported versions:

• Major 0, minor 0

See the rohc_comp_general_info_t structure for details about fields that are supported in the above versions.

PARAMETERS

comp

The ROHC compressor to get information from

info [input, output]

The structure where information will be stored

STRUCTURES

Some general information about the compressor
The structure is used by the rohc_comp_get_general_info function to store some general information about the compressor.

Versioning works as follow:

• The version_major field defines the compatibility level. If the major number given by user does not match the one expected by the library, an error is returned.

• The version_minor field defines the extension level. If the minor number given by user does not match the one expected by the library, only the fields supported in that minor version will be filled by rohc_comp_get_general_info.

Notes for developers:

• Increase the major version if a field is removed.

• Increase the major version if a field is added at the beginning or in the middle of the structure.

• Increase the minor version if a field is added at the very end of the structure.

• The version_major and version_minor fields must be located at the very beginning of the structure.

• The structure must be packed.

Supported versions:

• major 0 and minor = 0 contains: version_major, version_minor, contexts_nr, packets_nr, uncomp_bytes_nr, and comp_bytes_nr.

struct rohc_comp_general_info_t {
unsigned short version_major; /* The major version of this structure */
unsigned short version_minor; /* The minor version of this structure */
size_t contexts_nr; /* The number of contexts used by the compressor */
unsigned long packets_nr; /* The number of packets processed by the compressor */
unsigned long uncomp_bytes_nr; /* The number of uncompressed bytes received by the compressor */
unsigned long comp_bytes_nr; /* The number of compressed bytes produced by the compressor */
};

RETURN VALUE

true in case of success, false otherwise

SEE ALSO

rohc_comp.h(3), rohc_comp_general_info_t(3)