Comments and cleanup review Mathieu & David
[lttng-tools.git] / include / lttng / lttng.h
index 71c5e820805e2d9db11a3a7c61c532e760f1ba06..957484f0900daf1084368d2370f2174f8b4b95cb 100644 (file)
@@ -20,6 +20,7 @@
 #define _LIBLTTNGCTL_H
 
 #include <limits.h>
+#include <stdint.h>
 #include <uuid/uuid.h>
 
 /* Default unix group name for tracing.
  */
 #define LTTNG_SESSIOND_PATH_ENV "LTTNG_SESSIOND_PATH"
 
-/* From libuuid
- */
+/* UUID string length (including \0) */
 #define UUID_STR_LEN 37
+/* UUID short string version length (including \0) */
+#define UUID_SHORT_STR_LEN 9
+
+typedef uint64_t u64;
 
 /* Trace type for lttng_trace.
  */
@@ -45,7 +49,7 @@ enum lttng_trace_type {
  */
 struct lttng_session {
        char name[NAME_MAX];
-       char uuid[UUID_STR_LEN];
+       uuid_t uuid;
 };
 
 /* Simple trace representation.
@@ -56,6 +60,27 @@ struct lttng_trace {
        enum lttng_trace_type type;
 };
 
+/* TODO: don't export these into system-installed headers. */
+/*
+ * LTTng DebugFS ABI structures.
+ */
+enum lttng_instrum_type {
+       INSTRUM_TRACEPOINTS,
+};
+
+struct lttng_channel {
+       int overwrite;         /* 1: overwrite, 0: discard */
+       u64 subbuf_size;
+       u64 num_subbuf;
+       unsigned int switch_timer_interval;
+       unsigned int read_timer_interval;
+};
+
+struct lttng_event {
+       enum lttng_instrum_type itype;
+       char name[];
+};
+
 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);
@@ -66,7 +91,7 @@ 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 void lttng_set_current_session_uuid(uuid_t *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);
This page took 0.02399 seconds and 4 git commands to generate.