ROHC compression/decompression library
Defines
rohc_traces.h File Reference

ROHC macros for traces. More...

#include <stdio.h>
#include <assert.h>
#include "config.h"
Include dependency graph for rohc_traces.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define rohc_debugf(level, format,...)
 Print information depending on the debug level and prefixed with the function name.
#define rohc_debugf_(level, format,...)
 Print information depending on the debug level.
#define rohc_assert(condition, label, format,...)
 Stop processing if the given condition is false.

Detailed Description

ROHC macros for traces.

Author:
Didier Barvaux <didier.barvaux@toulouse.viveris.com>

Define Documentation

#define rohc_assert (   condition,
  label,
  format,
  ... 
)
Value:
do { \
                if(!(condition)) { \
                        rohc_debugf(0, format "\n", ##__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 check_ip_identification(), 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 decode_uo1().

#define rohc_debugf (   level,
  format,
  ... 
)
Value:
rohc_debugf_(level, "%s[%s:%d %s()] " format, \
                     (level == 0 ? "[ERROR] " : ""), \
                     __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__)

Print information depending on the debug level and prefixed with the function name.

Referenced by add_elt(), build_uncompressed_ip4(), build_uncompressed_ip6(), c_add_ts(), c_bytesSdvl(), c_create_current_list(), c_create_sc(), c_create_wlsb(), c_deliver_feedback(), c_encodeSdvl(), c_generic_create(), c_generic_encode(), c_generic_feedback(), c_init_header_info(), c_ip_check_context(), c_piggyback_feedback(), c_rtp_check_context(), c_rtp_create(), c_rtp_encode(), c_udp_check_context(), c_udp_create(), c_udp_encode(), c_udp_lite_check_context(), c_udp_lite_create(), c_udp_lite_encode(), change_mode(), change_state(), changed_dynamic_both_hdr(), changed_dynamic_one_hdr(), changed_static_one_hdr(), check_ip6_index(), check_ip_identification(), code_cid_values(), code_EXT2_packet(), code_EXT3_packet(), code_ipv4_dynamic_part(), code_ipv4_static_part(), code_ipv6_dynamic_part(), code_ipv6_static_part(), code_IR_DYN_packet(), code_IR_packet(), code_packet(), code_UO0_packet(), code_UO1_packet(), code_UO2_packet(), code_UO_packet_tail(), code_UOR2_bytes(), code_UOR2_ID_bytes(), code_UOR2_RTP_bytes(), code_UOR2_TS_bytes(), context_array_decrease(), context_array_increase(), context_create(), copy_generic_changes(), create_list(), d_change_mode_feedback(), d_decode_dynamic_ip4(), d_decode_dynamic_ip6(), d_decode_header(), d_decode_static_ip(), d_decode_static_ip4(), d_decode_static_ip6(), d_generic_create(), d_generic_decode(), d_generic_decode_ir(), d_generic_detect_ir_dyn_size(), d_generic_detect_ir_size(), d_optimistic_feedback(), d_record_ts_stride(), d_rtp_create(), d_sdvalue_size(), d_udp_create(), d_udp_lite_create(), d_udp_lite_decode(), decode_extension0(), decode_extension1(), decode_extension2(), decode_extension3(), decode_inner_header_flags(), decode_irdyn(), decode_outer_header_flags(), decode_uo0(), decode_uo1(), decode_uor2(), empty_list(), f_append_cid(), f_feedback2(), f_wrap_feedback(), find_packet_type(), get_bit_index(), header_fields(), header_flags(), insert_elt(), ip_create(), ip_decode_dynamic_ip(), ip_get_inner_packet(), periodic_down_transition(), push_back(), rohc_activate_profile(), rohc_alloc_compressor(), rohc_alloc_decompressor(), rohc_comp_get_last_packet_info(), rohc_compress(), rohc_decompress(), rohc_feedback_flush(), rohc_free_compressor(), rohc_list_decide_ipv6_compression(), rohc_list_decide_type(), rohc_list_encode(), rohc_list_encode_type_0(), rohc_list_encode_type_1(), rohc_list_encode_type_2(), rohc_list_encode_type_3(), rtp_build_uncompressed_rtp(), rtp_changed_rtp_dynamic(), rtp_code_dynamic_rtp_part(), rtp_code_static_rtp_part(), rtp_decide_state(), rtp_decode_dynamic_rtp(), rtp_decode_static_rtp(), rtp_decode_uo_tail_rtp(), rtp_detect_ir_dyn_size(), rtp_detect_ir_size(), rtp_header_flags_and_fields(), ts_decode_scaled(), ts_decode_unscaled(), ts_deduce_from_sn(), ts_update_context(), type_is_present(), udp_build_uncompressed_udp(), udp_code_dynamic_udp_part(), udp_code_static_udp_part(), udp_code_UO_packet_tail(), udp_decide_state(), udp_decode_dynamic_udp(), udp_decode_static_udp(), udp_decode_uo_tail_udp(), udp_lite_build_cce_packet(), udp_lite_build_uncompressed_udp(), udp_lite_code_dynamic_udp_lite_part(), udp_lite_code_UO_packet_tail(), udp_lite_decode_dynamic_udp(), udp_lite_decode_uo_tail_udp(), udp_lite_init_cc(), udp_lite_send_cce_packet(), uncompressed_decode(), uncompressed_decode_ir(), uncompressed_detect_ir_dyn_size(), and update_inter_packet().

#define rohc_debugf_ (   level,
  format,
  ... 
)
Value:
do { \
                if((level) <= ROHC_DEBUG_LEVEL) { \
                        printf(format, ##__VA_ARGS__); \
                } \
        } while(0)

Print information depending on the debug level.

Referenced by code_cid_values(), decode_uo0(), decode_uo1(), and decode_uor2().