4227f92441b736d0bc2f656ca71c93475bf7f919
[lttng-tools.git] / ltt-sessiond / session.h
1 /*
2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19 #ifndef _LTT_SESSION_H
20 #define _LTT_SESSION_H
21
22 #include <lttng/lttng.h>
23 #include <urcu/list.h>
24
25 /* Global session list */
26 struct ltt_session_list {
27 struct cds_list_head head;
28 };
29
30 extern struct ltt_session_list ltt_session_list;
31
32 /* ltt-session - This data structure contains information needed
33 * to identify a tracing session for both LTTng and UST.
34 */
35 struct ltt_session {
36 struct cds_list_head list;
37 char *name;
38 char *path;
39 struct cds_list_head ust_traces;
40 struct ltt_kernel_session *kernel_session;
41 unsigned int ust_trace_count;
42 pid_t ust_consumer;
43 };
44
45 /* Prototypes */
46 int create_session(char *name, char *path);
47 int destroy_session(char *name);
48 void get_lttng_session(struct lttng_session *sessions);
49 struct ltt_session *find_session_by_name(char *name);
50 unsigned int get_session_count(void);
51 struct ltt_session_list *get_session_list(void);
52
53 #endif /* _LTT_SESSION_H */
This page took 0.029377 seconds and 4 git commands to generate.