X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Fliblttngctl.h;h=ea6d001e1c58053d00575ecd1fab339c29c71cc7;hp=cfe0cb59e3cde30a744ece501b1a53a2634ce8cc;hb=5716705821202372fd16168f66f347ba293ef6b4;hpb=fac6795d6e2c60e79bdc7dab42da94d2025a57d3 diff --git a/include/lttng/liblttngctl.h b/include/lttng/liblttngctl.h index cfe0cb59e..ea6d001e1 100644 --- a/include/lttng/liblttngctl.h +++ b/include/lttng/liblttngctl.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2011 - David Goulet +/* + * Copyright (C) 2011 - David Goulet * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -13,24 +14,39 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * */ #ifndef _LIBLTTNGCTL_H #define _LIBLTTNGCTL_H +#include + +/* Default unix group name for tracing. + */ #define DEFAULT_TRACING_GROUP "tracing" -/* - * From libuuid +/* Environment variable to set session daemon + * binary path. + */ +#define LTTNG_SESSIOND_PATH_ENV "LTTNG_SESSIOND_PATH" + +/* From libuuid */ #define UUID_STR_LEN 37 +/* Simple structure representing a session. + */ +struct lttng_session { + char name[NAME_MAX]; + char uuid[UUID_STR_LEN]; +}; + extern int lttng_create_session(const char *name, char *session_id); extern int lttng_connect_sessiond(void); extern int lttng_set_tracing_group(const char *name); extern int lttng_check_session_daemon(void); extern const char *lttng_get_readable_code(int code); extern size_t lttng_ust_list_apps(pid_t **pids); +extern size_t lttng_list_sessions(struct lttng_session **sessions); #endif /* _LIBLTTNGCTL_H */