rohc_decomp_get_context_info − Get some information about the given decompression context.
#include <rohc/rohc_decomp.h>
bool
rohc_decomp_get_context_info(
const struct rohc_decomp *const decomp,
const rohc_cid_t cid,
rohc_decomp_context_info_t *const info
);
Get some information about the given decompression context.
To use the function, call it with a pointer on a pre−allocated rohc_decomp_context_info_t structure with the version_major and version_minor fields set to one of the following supported versions:
• Major 0, minor 0
See rohc_decomp_context_info_t for details about fields that are supported in the above versions.
decomp |
The ROHC decompressor to get information from |
|||
cid |
The Context ID to get information for |
info [input, output]
The structure where information will be stored
Some
information about one decompression context
The structure is used by the
rohc_decomp_get_context_info function to store some
information about one decompression context.
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_decomp_get_context_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 / Minor 0 contains: version_major, version_minor, packets_nr, comp_bytes_nr, uncomp_bytes_nr, corrected_crc_failures, corrected_sn_wraparounds, and corrected_wrong_sn_updates.
struct
rohc_decomp_context_info_t {
unsigned short version_major; /* The major version of
this structure */
unsigned short version_minor; /* The minor version of
this structure */
unsigned long packets_nr; /* The number of packets
processed by the context */
unsigned long comp_bytes_nr; /* The number of
compressed bytes received by the context */
unsigned long uncomp_bytes_nr; /* The number of
uncompressed bytes produced by the context */
unsigned long corrected_crc_failures; /* The number
of successful corrections upon CRC failure */
unsigned long corrected_sn_wraparounds; /* The number
of successful corrections of SN wraparound upon CRC failure
*/
unsigned long corrected_wrong_sn_updates; /* The
number of successful corrections of incorrect SN updates
upon CRC failure */
};
true in case of success, false otherwise
rohc_decomp.h(3), rohc_decomp_context_info_t(3)