ROHC compression/decompression library
|
Internal ROHC macros and functions for traces. More...
Go to the source code of this file.
Defines | |
#define | __rohc_print(trace_cb, level, entity, profile, format,...) |
#define | rohc_print(entity_struct, level, entity, profile, format,...) |
#define | rohc_debug(entity_struct, entity, profile, format,...) |
#define | rohc_info(entity_struct, entity, profile, format,...) |
#define | rohc_warning(entity_struct, entity, profile, format,...) |
#define | rohc_error(entity_struct, entity, profile, format,...) |
#define | rohc_assert(entity_struct, entity, profile, condition, label, format,...) |
Stop processing if the given condition is false. | |
Functions | |
void ROHC_EXPORT | rohc_dump_packet (const rohc_trace_callback_t trace_cb, const rohc_trace_entity_t trace_entity, const rohc_trace_level_t trace_level, const char *const descr, const unsigned char *const packet, const size_t length) __attribute__((nonnull(4 |
Internal ROHC macros and functions for traces.
#define __rohc_print | ( | trace_cb, | |
level, | |||
entity, | |||
profile, | |||
format, | |||
... | |||
) |
do { \ if(trace_cb != NULL) { \ trace_cb(level, entity, profile, "[%s:%d %s()] " format, \ __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); \ } \ } while(0)
Print information depending on the debug level (internal usage)
Referenced by c_init_header_info(), and rohc_dump_packet().
#define rohc_assert | ( | entity_struct, | |
entity, | |||
profile, | |||
condition, | |||
label, | |||
format, | |||
... | |||
) |
do { \ if(!(condition)) { \ rohc_error(entity_struct, entity, profile, \ format, ##__VA_ARGS__); \ assert(condition); \ goto label; \ } \ } while(0)
Stop processing if the given condition is false.
In non-debug mode (ie. NDEBUG set): if the given condition fails, prints the given message then jump to the given label.
In debug mode (ie. NDEBUG not set): if the given condition fails, prints the given message then asserts.
Referenced by code_EXT0_packet(), code_EXT1_packet(), code_EXT2_packet(), code_EXT3_packet(), code_UO1_packet(), code_UO2_packet(), code_UOR2_ID_bytes(), code_UOR2_RTP_bytes(), code_UOR2_TS_bytes(), and decide_extension().
#define rohc_debug | ( | entity_struct, | |
entity, | |||
profile, | |||
format, | |||
... | |||
) |
rohc_print(entity_struct, ROHC_TRACE_DEBUG, entity, profile, \ format, ##__VA_ARGS__)
Print debug messages prefixed with the function name
Referenced by c_deliver_feedback(), c_generic_check_profile(), d_change_mode_feedback(), d_optimistic_feedback(), periodic_down_transition(), rohc_comp_add_rtp_port(), rohc_comp_get_segment(), rohc_comp_piggyback_feedback(), rohc_comp_remove_rtp_port(), rohc_comp_reset_rtp_ports(), rohc_comp_set_mrru(), rohc_compress2(), rohc_decomp_set_cid_type(), rohc_decomp_set_max_cid(), rohc_decomp_set_mrru(), rohc_decompress(), rohc_feedback_flush(), rohc_feedback_remove_locked(), rohc_free_compressor(), and rohc_free_decompressor().
#define rohc_error | ( | entity_struct, | |
entity, | |||
profile, | |||
format, | |||
... | |||
) |
rohc_print(entity_struct, ROHC_TRACE_ERROR, entity, profile, \ format, ##__VA_ARGS__)
Print error messages prefixed with the function name
Referenced by c_create_sc(), c_deliver_feedback(), c_generic_create(), d_generic_create(), d_ip_create(), d_rtp_create(), d_udp_create(), d_udp_lite_create(), rohc_comp_get_general_info(), rohc_comp_get_last_packet_info(), rohc_comp_get_last_packet_info2(), rohc_comp_piggyback_feedback(), rohc_comp_set_traces_cb(), rohc_decomp_get_last_packet_info(), rohc_decomp_set_traces_cb(), and ts_decode_scaled().
#define rohc_info | ( | entity_struct, | |
entity, | |||
profile, | |||
format, | |||
... | |||
) |
rohc_print(entity_struct, ROHC_TRACE_INFO, entity, profile, \ format, ##__VA_ARGS__)
Print information prefixed with the function name
Referenced by c_generic_feedback(), change_mode(), change_state(), d_optimistic_feedback(), periodic_down_transition(), rohc_comp_force_contexts_reinit(), rohc_comp_set_periodic_refreshes(), rohc_comp_set_wlsb_window_width(), and rohc_compress2().
#define rohc_print | ( | entity_struct, | |
level, | |||
entity, | |||
profile, | |||
format, | |||
... | |||
) |
do { \ assert((entity_struct) != NULL); \ __rohc_print((entity_struct)->trace_callback, \ level, entity, profile, \ format, ##__VA_ARGS__); \ } while(0)
Print information depending on the debug level
#define rohc_warning | ( | entity_struct, | |
entity, | |||
profile, | |||
format, | |||
... | |||
) |
rohc_print(entity_struct, ROHC_TRACE_WARNING, entity, profile, \ format, ##__VA_ARGS__)
Print warning messages prefixed with the function name
Referenced by c_deliver_feedback(), c_generic_encode(), c_generic_feedback(), c_udp_check_context(), code_EXT3_packet(), code_ipv6_dynamic_part(), code_IR_DYN_packet(), code_IR_packet(), code_UO2_packet(), code_UOR2_bytes(), d_change_mode_feedback(), d_generic_decode(), d_optimistic_feedback(), d_udp_lite_decode(), ip_detect_packet_type(), ip_parse_dynamic_ip(), rohc_activate_profile(), rohc_comp_add_rtp_port(), rohc_comp_force_contexts_reinit(), rohc_comp_get_segment(), rohc_comp_remove_rtp_port(), rohc_comp_set_mrru(), rohc_comp_set_periodic_refreshes(), rohc_comp_set_wlsb_window_width(), rohc_compress2(), rohc_decomp_set_cid_type(), rohc_decomp_set_max_cid(), rohc_decomp_set_mrru(), rohc_decompress(), rtp_header_flags_and_fields(), and udp_parse_static_udp().
void ROHC_EXPORT rohc_dump_packet | ( | const rohc_trace_callback_t | trace_cb, |
const rohc_trace_entity_t | trace_entity, | ||
const rohc_trace_level_t | trace_level, | ||
const char *const | descr, | ||
const unsigned char *const | packet, | ||
const size_t | length | ||
) |