Internal structures for ROHC compression.
More...
#include "rohc_internal.h"
#include "rohc_traces_internal.h"
#include "rohc_packets.h"
#include "rohc_comp.h"
#include "schemes/comp_wlsb.h"
#include "net_pkt.h"
#include "feedback.h"
#include <stdbool.h>
Go to the source code of this file.
|
void | rohc_comp_change_mode (struct rohc_comp_ctxt *const context, const rohc_mode_t new_mode) |
| Change the mode of the context. More...
|
|
void | rohc_comp_change_state (struct rohc_comp_ctxt *const context, const rohc_comp_state_t new_state) |
| Change the state of the context. More...
|
|
void | rohc_comp_periodic_down_transition (struct rohc_comp_ctxt *const context, const struct rohc_ts pkt_time) |
| Periodically change the context state after a certain number of packets. More...
|
|
bool | rohc_comp_reinit_context (struct rohc_comp_ctxt *const context) |
| Re-initialize the given context. More...
|
|
bool | rohc_comp_feedback_parse_opts (const struct rohc_comp_ctxt *const context, const uint8_t *const packet, const size_t packet_len, const uint8_t *const feedback_data, const size_t feedback_data_len, size_t opts_present[ROHC_FEEDBACK_OPT_MAX], uint32_t *const sn_bits, size_t *const sn_bits_nr, const rohc_feedback_crc_t crc_type, uint8_t crc_in_packet, size_t crc_pos_from_end) |
| Parse FEEDBACK-2 options. More...
|
|
◆ C_NUM_PROFILES
#define C_NUM_PROFILES 10U |
The number of ROHC profiles ready to be used
◆ CHANGE_TO_FO_COUNT
#define CHANGE_TO_FO_COUNT 700 |
The default maximal number of packets sent in > FO states (= SO state) before changing back the state to FO (periodic refreshes)
◆ CHANGE_TO_FO_TIME
#define CHANGE_TO_FO_TIME 500U |
The default maximal delay (in ms) spent in > FO states (= SO state) before changing back the state to FO (periodic refreshes)
◆ CHANGE_TO_IR_COUNT
#define CHANGE_TO_IR_COUNT 1700 |
The default maximal number of packets sent in > IR states (= FO and SO states) before changing back the state to IR (periodic refreshes)
◆ CHANGE_TO_IR_TIME
#define CHANGE_TO_IR_TIME 1000U |
The default maximal delay (in ms) spent in > IR states (= FO and SO states) before changing back the state to IR (periodic refreshes)
◆ MAX_CR_COUNT
The minimal number of packets that must be sent while in CR state before being able to switch to the FO state
◆ MAX_FO_COUNT
The minimal number of packets that must be sent while in FO state before being able to switch to the SO state
◆ MAX_IR_COUNT
The minimal number of packets that must be sent while in IR state before being able to switch to the FO state
◆ rohc_comp_debug
#define rohc_comp_debug |
( |
|
context, |
|
|
|
format, |
|
|
|
... |
|
) |
| |
Value: (context)->profile->id, \
format, ##__VA_ARGS__)
Definition: rohc_traces.h:83
#define rohc_debug(entity_struct, entity, profile, format,...)
Definition: rohc_traces_internal.h:61
Print a debug trace for the given compression context
◆ rohc_comp_dump_buf
#define rohc_comp_dump_buf |
( |
|
context, |
|
|
|
descr, |
|
|
|
buf, |
|
|
|
buf_len |
|
) |
| |
Value:do { \
rohc_dump_buf((context)->compressor->trace_callback, \
(context)->compressor->trace_callback_priv, \
descr, buf, buf_len); \
} \
} while(0)
Definition: rohc_traces.h:61
Definition: rohc_traces.h:83
Definition: rohc_comp.h:235
Dump a buffer for the given compression context
◆ rohc_comp_warn
#define rohc_comp_warn |
( |
|
context, |
|
|
|
format, |
|
|
|
... |
|
) |
| |
Value: (context)->profile->id, \
format, ##__VA_ARGS__)
Definition: rohc_traces.h:83
#define rohc_warning(entity_struct, entity, profile, format,...)
Definition: rohc_traces_internal.h:71
Print a warning trace for the given compression context
◆ ROHC_INIT_TS_STRIDE_MIN
#define ROHC_INIT_TS_STRIDE_MIN 3U |
The minimal number of packets that must be sent while in INIT_STRIDE state before being able to switch to the SEND_SCALED state
◆ ROHC_LIST_DEFAULT_L
#define ROHC_LIST_DEFAULT_L 5U |
Default number of transmission for lists to become a reference list.
The minimal number of times of compressed list shall be sent to become a reference list. L is the name specified in the RFC.
◆ ROHC_MAX_MRRU
#define ROHC_MAX_MRRU 65535 |
The maximal value for MRRU
◆ rohc_comp_change_mode()
Change the mode of the context.
- Parameters
-
context | The compression context |
new_mode | The new mode the context must enter in |
◆ rohc_comp_change_state()
Change the state of the context.
- Parameters
-
context | The compression context |
new_state | The new state the context must enter in |
◆ rohc_comp_feedback_parse_opts()
bool rohc_comp_feedback_parse_opts |
( |
const struct rohc_comp_ctxt *const |
context, |
|
|
const uint8_t *const |
packet, |
|
|
const size_t |
packet_len, |
|
|
const uint8_t *const |
feedback_data, |
|
|
const size_t |
feedback_data_len, |
|
|
size_t |
opts_present[ROHC_FEEDBACK_OPT_MAX], |
|
|
uint32_t *const |
sn_bits, |
|
|
size_t *const |
sn_bits_nr, |
|
|
const rohc_feedback_crc_t |
crc_type, |
|
|
uint8_t |
crc_in_packet, |
|
|
size_t |
crc_pos_from_end |
|
) |
| |
Parse FEEDBACK-2 options.
- Parameters
-
| context | The ROHC decompression context |
| packet | The whole feedback packet with CID bits |
| packet_len | The length of the whole feedback packet with CID bits |
| feedback_data | The feedback data without the CID bits |
| feedback_data_len | The length of the feedback data without the CID bits |
[out] | opts_present | Whether options are present or not |
[out] | sn_bits | in: the SN bits collected in base header out: the SN bits collected in base header and options |
[out] | sn_bits_nr | in: the number of SN bits collected in base header out: the number of SN bits collected in base header and options |
| crc_type | Whether the CRC is present in base header or in option |
| crc_in_packet | The CRC of the feedback packet |
| crc_pos_from_end | The position of the CRC byte from the end of the feedback packet |
- Returns
- true if feedback options were successfully parsed, false if feedback options were malformed or CRC is wrong
◆ rohc_comp_periodic_down_transition()
void rohc_comp_periodic_down_transition |
( |
struct rohc_comp_ctxt *const |
context, |
|
|
const struct rohc_ts |
pkt_time |
|
) |
| |
Periodically change the context state after a certain number of packets.
- Parameters
-
context | The compression context |
pkt_time | The time of packet arrival |
◆ rohc_comp_reinit_context()
Re-initialize the given context.
Make the context restart its initialization with decompressor, ie. it goes in the lowest compression state.
- Parameters
-
context | The compression context to re-initialize |
- Returns
- true in case of success, false otherwise