Minor code cleanup
[lttng-tools.git] / ltt-sessiond / ltt-sessiond.h
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 #define DEFAULT_HOME_DIR "/tmp"
23 #define DEFAULT_TRACING_GROUP "/tracing"
24 #define DEFAULT_UST_SOCK_DIR "/tmp/ust-app-socks"
25 #define DEFAULT_GLOBAL_APPS_PIPE "/tmp/ust-app-socks/global"
26
27 extern const char default_home_dir[],
28 default_tracing_group[],
29 default_ust_sock_dir[],
30 default_global_apps_pipe[];
31
32 /* LTTng trace representation */
33 struct ltt_lttng_trace {
34 struct cds_list_head list;
35 char trace_name[NAME_MAX];
36 struct cds_list_head marker_list;
37 };
38
39 /* UST trace representation */
40 struct ltt_ust_trace {
41 struct cds_list_head list;
42 int shmid;
43 char trace_name[NAME_MAX];
44 struct cds_list_head markers;
45 };
46
47 struct ltt_ust_marker {
48 struct cds_list_head list;
49 char *name;
50 char *channel;
51 };
52
53 /* Global session list */
54 struct ltt_session_list {
55 struct cds_list_head head;
56 };
57
58 /* Traceable application list */
59 struct ltt_traceable_app_list {
60 struct cds_list_head head;
61 };
62
63 /*
64 * Registered traceable applications. Libust registers
65 * to the session daemon and a linked list is kept
66 * of all running traceable app.
67 */
68 struct ltt_traceable_app {
69 struct cds_list_head list;
70 pid_t pid;
71 uid_t uid; /* User ID that owns the apps */
72 };
73
74 /*
75 * ltt-session - This data structure contains information needed
76 * to identify a tracing session for both LTTng and UST.
77 */
78 struct ltt_session {
79 char *name;
80 struct cds_list_head list;
81 uuid_t uuid;
82 struct cds_list_head ust_traces;
83 struct cds_list_head lttng_traces;
84 pid_t ust_consumer;
85 pid_t lttng_consumer;
86 };
87
88 #endif /* _LTT_SESSIOND_H */
This page took 0.030412 seconds and 4 git commands to generate.