X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Fliblttngctl.h;h=a3bdff80708284fbf2ba2c68a5ee44860ed4c095;hp=cfe0cb59e3cde30a744ece501b1a53a2634ce8cc;hb=87378cf56f08f23cd6715a923ba10d98343902d7;hpb=fac6795d6e2c60e79bdc7dab42da94d2025a57d3 diff --git a/include/lttng/liblttngctl.h b/include/lttng/liblttngctl.h index cfe0cb59e..a3bdff807 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,43 @@ * 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 +#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 -extern int lttng_create_session(const char *name, char *session_id); +/* Simple structure representing a session. + */ +struct lttng_session { + char name[NAME_MAX]; + char uuid[UUID_STR_LEN]; +}; + +extern int lttng_create_session(char *name, uuid_t *session_id); +extern int lttng_destroy_session(uuid_t *uuid); extern int lttng_connect_sessiond(void); +extern int lttng_disconnect_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 int lttng_ust_list_apps(pid_t **pids); +extern int lttng_list_sessions(struct lttng_session **sessions); +extern void lttng_set_current_session_uuid(char *uuid); #endif /* _LIBLTTNGCTL_H */