rohc_decomp_get_general_info − Get some general information about the decompressor.
#include <rohc/rohc_decomp.h>
bool
rohc_decomp_get_general_info(
const struct rohc_decomp *const decomp,
rohc_decomp_general_info_t *const info
);
Get some general information about the decompressor.
To use the function, call it with a pointer on a pre−allocated rohc_decomp_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_decomp_general_info_t structure for details about fields that are supported in the above versions.
decomp |
The ROHC decompressor to get information from |
info [input, output]
The structure where information will be stored
Some general
information about the decompressor
The structure is used by the
rohc_decomp_get_general_info function to store some
general information about the decompressor.
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_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, comp_bytes_nr, and uncomp_bytes_nr.
struct
rohc_decomp_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 decompressor */
unsigned long packets_nr; /* The number of packets
processed by the decompressor */
unsigned long comp_bytes_nr; /* The number of
compressed bytes received by the decompressor */
unsigned long uncomp_bytes_nr; /* The number of
uncompressed bytes produced by the decompressor */
};
true in case of success, false otherwise
rohc_decomp.h(3), rohc_decomp_general_info_t(3)