From: David Goulet Date: Tue, 3 May 2011 19:59:52 +0000 (-0400) Subject: Rename liblttngctl.h to lttng.h X-Git-Tag: v2.0-pre1~151 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=5b97ec606d485e091cf2c2bc06b79f05d18212aa Rename liblttngctl.h to lttng.h Signed-off-by: David Goulet --- diff --git a/include/lttng/liblttngctl.h b/include/lttng/liblttngctl.h deleted file mode 100644 index 71c5e8208..000000000 --- a/include/lttng/liblttngctl.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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 - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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" - -/* Environment variable to set session daemon - * binary path. - */ -#define LTTNG_SESSIOND_PATH_ENV "LTTNG_SESSIOND_PATH" - -/* From libuuid - */ -#define UUID_STR_LEN 37 - -/* Trace type for lttng_trace. - */ -enum lttng_trace_type { - KERNEL, USERSPACE, -}; - -/* Simple structure representing a session. - */ -struct lttng_session { - char name[NAME_MAX]; - char uuid[UUID_STR_LEN]; -}; - -/* Simple trace representation. - */ -struct lttng_trace { - char name[NAME_MAX]; - pid_t pid; - enum lttng_trace_type type; -}; - -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 int lttng_ust_list_apps(pid_t **pids); -extern int lttng_list_sessions(struct lttng_session **sessions); -extern int lttng_list_traces(uuid_t *uuid, struct lttng_trace **traces); -extern void lttng_set_current_session_uuid(char *uuid); -extern int lttng_ust_create_trace(pid_t pid); -extern int lttng_ust_start_trace(pid_t pid); -extern int lttng_ust_stop_trace(pid_t pid); - -#endif /* _LIBLTTNGCTL_H */ diff --git a/include/lttng/lttng.h b/include/lttng/lttng.h new file mode 100644 index 000000000..71c5e8208 --- /dev/null +++ b/include/lttng/lttng.h @@ -0,0 +1,74 @@ +/* + * 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 + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * 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" + +/* Environment variable to set session daemon + * binary path. + */ +#define LTTNG_SESSIOND_PATH_ENV "LTTNG_SESSIOND_PATH" + +/* From libuuid + */ +#define UUID_STR_LEN 37 + +/* Trace type for lttng_trace. + */ +enum lttng_trace_type { + KERNEL, USERSPACE, +}; + +/* Simple structure representing a session. + */ +struct lttng_session { + char name[NAME_MAX]; + char uuid[UUID_STR_LEN]; +}; + +/* Simple trace representation. + */ +struct lttng_trace { + char name[NAME_MAX]; + pid_t pid; + enum lttng_trace_type type; +}; + +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 int lttng_ust_list_apps(pid_t **pids); +extern int lttng_list_sessions(struct lttng_session **sessions); +extern int lttng_list_traces(uuid_t *uuid, struct lttng_trace **traces); +extern void lttng_set_current_session_uuid(char *uuid); +extern int lttng_ust_create_trace(pid_t pid); +extern int lttng_ust_start_trace(pid_t pid); +extern int lttng_ust_stop_trace(pid_t pid); + +#endif /* _LIBLTTNGCTL_H */ diff --git a/liblttngctl/liblttngctl.c b/liblttngctl/liblttngctl.c index bd02a13b2..76bdf5ffd 100644 --- a/liblttngctl/liblttngctl.c +++ b/liblttngctl/liblttngctl.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include "liblttsessiondcomm.h" #include "lttngerr.h" diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index 150f211fb..2fd622299 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -35,7 +35,7 @@ #include /* URCU list library (-lurcu) */ #include /* UST control lib (-lust) */ -#include +#include #include "liblttsessiondcomm.h" #include "ltt-sessiond.h" diff --git a/ltt-sessiond/session.c b/ltt-sessiond/session.c index bf5f618a8..54e19669e 100644 --- a/ltt-sessiond/session.c +++ b/ltt-sessiond/session.c @@ -17,12 +17,10 @@ */ #define _GNU_SOURCE -#include #include #include #include #include -#include #include "lttngerr.h" #include "session.h" diff --git a/ltt-sessiond/session.h b/ltt-sessiond/session.h index 00e8ef1e7..4f58e9d9f 100644 --- a/ltt-sessiond/session.h +++ b/ltt-sessiond/session.h @@ -19,7 +19,7 @@ #ifndef _LTT_SESSION_H #define _LTT_SESSION_H -#include +#include #include /* Global session list */ diff --git a/lttng/lttng.c b/lttng/lttng.c index f6cad4243..a5569c9af 100644 --- a/lttng/lttng.c +++ b/lttng/lttng.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include "lttng.h" #include "lttngerr.h"