30 #ifndef ROHC_TRACES_INTERNAL_H    31 #define ROHC_TRACES_INTERNAL_H    34 #include <rohc/rohc_buf.h>    36 #ifndef ROHC_NO_TRACES    43 #define __rohc_print(trace_cb, trace_cb_priv, \    44                      level, entity, profile, format, ...) \    46                 if(trace_cb != NULL) { \    47                         trace_cb(trace_cb_priv, level, entity, profile, \    48                                  "[%s:%d %s()] " format "\n", \    49                                  __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); \    54 #define rohc_print(entity_struct, level, entity, profile, format, ...) \    56                 __rohc_print((entity_struct)->trace_callback, \    57                              (entity_struct)->trace_callback_priv, \    58                              level, entity, profile, \    59                              format, ##__VA_ARGS__); \    63 #define rohc_debug(entity_struct, entity, profile, format, ...) \    64         rohc_print(entity_struct, ROHC_TRACE_DEBUG, entity, profile, \    65                    format, ##__VA_ARGS__)    68 #define rohc_info(entity_struct, entity, profile, format, ...) \    69         rohc_print(entity_struct, ROHC_TRACE_INFO, entity, profile, \    70                    format, ##__VA_ARGS__)    73 #define rohc_warning(entity_struct, entity, profile, format, ...) \    74         rohc_print(entity_struct, ROHC_TRACE_WARNING, entity, profile, \    75                    format, ##__VA_ARGS__)    78 #define rohc_error(entity_struct, entity, profile, format, ...) \    79         rohc_print(entity_struct, ROHC_TRACE_ERROR, entity, profile, \    80                    format, ##__VA_ARGS__)    84 #define __rohc_print(trace_cb, trace_cb_priv, \    85                      level, entity, profile, format, ...) \    87 #define rohc_debug(entity_struct, entity, profile, format, ...) \    89 #define rohc_info(entity_struct, entity, profile, format, ...) \    91 #define rohc_warning(entity_struct, entity, profile, format, ...) \    93 #define rohc_error(entity_struct, entity, profile, format, ...) \   108 #define rohc_assert(entity_struct, entity, profile, \   109                     condition, label, format, ...) \   112                         rohc_error(entity_struct, entity, profile, \   113                                    format, ##__VA_ARGS__); \   120 #ifndef ROHC_NO_TRACES   123                       void *
const trace_cb_priv,
   126                       const char *
const descr,
   131                    void *
const trace_cb_priv,
   134                    const char *
const descr,
   135                    const uint8_t *
const packet,
   137         __attribute__((
nonnull(5, 6)));
   140 #define rohc_dump_packet(trace_cb, trace_cb_priv, trace_entity, trace_level, \   143 #define rohc_dump_buf(trace_cb, trace_cb_priv, trace_entity, trace_level, \   144                       descr, packet, length) \ rohc_trace_level_t
The different levels of the traces. 
Definition: rohc_traces.h:59
 
void(* rohc_trace_callback2_t)(void *const priv_ctxt, const rohc_trace_level_t level, const rohc_trace_entity_t entity, const int profile, const char *const format,...)
The function prototype for the trace callback. 
Definition: rohc_traces.h:118
 
void rohc_dump_packet(const rohc_trace_callback2_t trace_cb, void *const trace_cb_priv, const rohc_trace_entity_t trace_entity, const rohc_trace_level_t trace_level, const char *const descr, const struct rohc_buf packet)
Dump the content of the given packet. 
Definition: rohc_traces_internal.c:48
 
A network buffer for the ROHC library. 
Definition: rohc_buf.h:102
 
ROHC definitions for traces. 
 
rohc_trace_entity_t
The different entities concerned by the traces. 
Definition: rohc_traces.h:81
 
void rohc_dump_buf(const rohc_trace_callback2_t trace_cb, void *const trace_cb_priv, const rohc_trace_entity_t trace_entity, const rohc_trace_level_t trace_level, const char *const descr, const uint8_t *const packet, const size_t length)
Dump the content of the given buffer. 
Definition: rohc_traces_internal.c:79