backup
[lcr.git] / element.h
1 /*****************************************************************************\
2 **                                                                           **
3 ** Linux Call Router                                                         **
4 **                                                                           **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg                                              **
7 **                                                                           **
8 ** call trace header                                                         **
9 **                                                                           **
10 \*****************************************************************************/ 
11
12 #define TRACE_DIR_IN   1
13 #define TRACE_DIR_OUT  2
14
15 struct trace_subelement {
16         struct trace_subelement *next;
17         char name[32];
18         char value[128];
19 };
20
21 struct trace_element {
22         struct trace_element *next;
23         char name[32];
24         char value[128];
25         struct trace_subelement *subelement;
26 };
27
28 struct trace_head {
29         unsigned long sec, usec;
30         char interface[64];
31         int port, nt, pri, ptp;
32         int direction;
33         char caller[64];
34         char dialing[64];
35         int layer;
36         char message[64];
37 };
38
39 void trace_start(char *interface, int port, int nt, int pri, int ptp, int direction, char *caller, char *dialing, int layer, char *message);
40 void trace_element(char *name, value);
41 void trace_subelement(char *name, value);
42 void trace_finish(void);
43
44 void trace_show(FILE *fp, struct trace_head *trace_head, char *interface, int port, char *caller, char *dialing, unsigned long layermask);
45