427eb978eef6e974878e06214ef4878fa2916f58
[lcr.git] / trace.h
1 /*****************************************************************************\
2 **                                                                           **
3 ** Linux Call Router                                                         **
4 **                                                                           **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg                                              **
7 **                                                                           **
8 ** trace header file                                                         **
9 **                                                                           **
10 \*****************************************************************************/ 
11
12 struct trace_element {
13         char name[10];
14         char sub[10];
15         char value[64];
16 };
17
18 #define MAX_TRACE_ELEMENTS      32
19 struct trace {
20         /* header */
21         int port;
22         char interface[32];
23         char caller[64];
24         char dialing[64];
25         int direction;
26         unsigned long sec, usec;
27         
28         /* type */
29         char category[4];
30         char name[64];
31
32         /* elements */
33         int elements;
34         struct trace_element element[MAX_TRACE_ELEMENTS];
35 };
36
37
38 #define CATEGORY_L1     0x01
39 #define CATEGORY_L2     0x02
40 #define CATEGORY_L3     0x04
41 #define CATEGORY_CH     0x08
42 #define CATEGORY_EP     0x10
43 #define CATEGORY_AP     0x20
44 #define CATEGORY_RO     0x40
45
46
47 void start_trace(int port, char *interface, char *caller, char *dialing, int direction, char *category, char *name);
48 void add_trace(char *name, char *sub, char *value);
49 void end_trace(void);
50 //char *print_trace(int port, char *interface, char *caller, char *dialing, int direction, char *category, char *name);