1 /*****************************************************************************\
3 ** Linux Call Router **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
8 ** trace header file **
10 \*****************************************************************************/
12 struct trace_element {
18 #define MAX_TRACE_ELEMENTS 32
26 unsigned long sec, usec;
35 struct trace_element element[MAX_TRACE_ELEMENTS];
40 #define CATEGORY_CH 0x01
41 #define CATEGORY_EP 0x02
42 //#define CATEGORY_BC 0x04 check lcradmin help
45 #define start_trace(port, interface, caller, dialing, direction, category, serial, name) _start_trace(__FUNCTION__, __LINE__, port, interface, caller, dialing, direction, category, serial, name)
46 #define add_trace(name, sub, fmt, arg...) _add_trace(__FUNCTION__, __LINE__, name, sub, fmt, ## arg)
47 #define end_trace() _end_trace(__FUNCTION__, __LINE__)
48 void _start_trace(const char *__file, int line, int port, struct interface *interface, char *caller, char *dialing, int direction, int category, int serial, char *name);
49 void _add_trace(const char *__file, int line, char *name, char *sub, const char *fmt, ...);
50 void _end_trace(const char *__file, int line);
51 //char *print_trace(int port, char *interface, char *caller, char *dialing, int direction, char *category, char *name);