Commit | Line | Data |
---|---|---|
fac6795d DG |
1 | /* Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca> |
2 | * | |
3 | * This program is free software; you can redistribute it and/or | |
4 | * modify it under the terms of the GNU General Public License | |
5 | * as published by the Free Software Foundation; either version 2 | |
6 | * of the License, or (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
16 | * | |
17 | */ | |
18 | ||
19 | #ifndef _LTT_SESSIOND_H | |
20 | #define _LTT_SESSIOND_H | |
21 | ||
22 | const char default_home_dir[] = "/tmp"; | |
23 | const char default_tracing_group[] = "tracing"; | |
24 | const char default_ust_sock_dir[] = "/tmp/ust-app-socks"; | |
25 | const char default_global_apps_pipe[] = "/tmp/ust-app-socks/global"; | |
26 | ||
27 | /* LTTng trace representation */ | |
28 | struct ltt_lttng_trace { | |
29 | struct cds_list_head list; | |
30 | char trace_name[NAME_MAX]; | |
31 | struct cds_list_head marker_list; | |
32 | }; | |
33 | ||
34 | /* UST trace representation */ | |
35 | struct ltt_ust_trace { | |
36 | struct cds_list_head list; | |
37 | int shmid; | |
38 | char trace_name[NAME_MAX]; | |
39 | struct cds_list_head markers; | |
40 | }; | |
41 | ||
42 | struct ltt_ust_marker { | |
43 | struct cds_list_head list; | |
44 | char *name; | |
45 | char *channel; | |
46 | }; | |
47 | ||
48 | /* Global session list */ | |
49 | struct ltt_session_list { | |
50 | struct cds_list_head head; | |
51 | }; | |
52 | ||
53 | /* Traceable application list */ | |
54 | struct ltt_traceable_app_list { | |
55 | struct cds_list_head head; | |
56 | }; | |
57 | ||
58 | /* | |
59 | * Registered traceable applications. Libust registers | |
60 | * to the session daemon and a linked list is kept | |
61 | * of all running traceable app. | |
62 | */ | |
63 | struct ltt_traceable_app { | |
64 | struct cds_list_head list; | |
65 | pid_t pid; | |
66 | uid_t uid; /* User ID that owns the apps */ | |
67 | }; | |
68 | ||
69 | /* | |
70 | * ltt-session - This data structure contains information needed | |
71 | * to identify a tracing session for both LTTng and UST. | |
72 | */ | |
73 | struct ltt_session { | |
74 | char *name; | |
75 | struct cds_list_head list; | |
76 | uuid_t uuid; | |
77 | struct cds_list_head ust_traces; | |
78 | struct cds_list_head lttng_traces; | |
79 | pid_t ust_consumer; | |
80 | pid_t lttng_consumer; | |
81 | }; | |
82 | ||
83 | #endif /* _LTT_SESSIOND_H */ |