+enum lttng_event_type {
+ LTTNG_EVENT_ALL = -1,
+ LTTNG_EVENT_TRACEPOINT = 0,
+ LTTNG_EVENT_PROBE = 1,
+ LTTNG_EVENT_FUNCTION = 2,
+ LTTNG_EVENT_FUNCTION_ENTRY = 3,
+ LTTNG_EVENT_NOOP = 4,
+ LTTNG_EVENT_SYSCALL = 5,
+};
+
+/*
+ * Loglevel information.
+ */
+enum lttng_loglevel_type {
+ LTTNG_EVENT_LOGLEVEL_ALL = 0,
+ LTTNG_EVENT_LOGLEVEL_RANGE = 1,
+ LTTNG_EVENT_LOGLEVEL_SINGLE = 2,
+};
+
+/*
+ * Available loglevels.
+ */
+enum lttng_loglevel {
+ LTTNG_LOGLEVEL_EMERG = 0,
+ LTTNG_LOGLEVEL_ALERT = 1,
+ LTTNG_LOGLEVEL_CRIT = 2,
+ LTTNG_LOGLEVEL_ERR = 3,
+ LTTNG_LOGLEVEL_WARNING = 4,
+ LTTNG_LOGLEVEL_NOTICE = 5,
+ LTTNG_LOGLEVEL_INFO = 6,
+ LTTNG_LOGLEVEL_DEBUG_SYSTEM = 7,
+ LTTNG_LOGLEVEL_DEBUG_PROGRAM = 8,
+ LTTNG_LOGLEVEL_DEBUG_PROCESS = 9,
+ LTTNG_LOGLEVEL_DEBUG_MODULE = 10,
+ LTTNG_LOGLEVEL_DEBUG_UNIT = 11,
+ LTTNG_LOGLEVEL_DEBUG_FUNCTION = 12,
+ LTTNG_LOGLEVEL_DEBUG_LINE = 13,
+ LTTNG_LOGLEVEL_DEBUG = 14,
+};
+
+/*
+ * LTTng consumer mode
+ */
+enum lttng_event_output {
+ LTTNG_EVENT_SPLICE = 0,
+ LTTNG_EVENT_MMAP = 1,
+};
+
+/* Event context possible type */
+enum lttng_event_context_type {
+ LTTNG_EVENT_CONTEXT_PID = 0,
+ LTTNG_EVENT_CONTEXT_PERF_COUNTER = 1,
+ LTTNG_EVENT_CONTEXT_PROCNAME = 2,
+ LTTNG_EVENT_CONTEXT_PRIO = 3,
+ LTTNG_EVENT_CONTEXT_NICE = 4,
+ LTTNG_EVENT_CONTEXT_VPID = 5,
+ LTTNG_EVENT_CONTEXT_TID = 6,
+ LTTNG_EVENT_CONTEXT_VTID = 7,
+ LTTNG_EVENT_CONTEXT_PPID = 8,
+ LTTNG_EVENT_CONTEXT_VPPID = 9,
+ LTTNG_EVENT_CONTEXT_PTHREAD_ID = 10,
+ LTTNG_EVENT_CONTEXT_HOSTNAME = 11,
+ LTTNG_EVENT_CONTEXT_IP = 12,
+};
+
+enum lttng_calibrate_type {
+ LTTNG_CALIBRATE_FUNCTION = 0,
+};
+
+/* Health component for the health check function. */
+enum lttng_health_component {
+ LTTNG_HEALTH_CMD,
+ LTTNG_HEALTH_APP_MANAGE,
+ LTTNG_HEALTH_APP_REG,
+ LTTNG_HEALTH_KERNEL,
+ LTTNG_HEALTH_CONSUMER,
+ LTTNG_HEALTH_HT_CLEANUP,
+ LTTNG_HEALTH_APP_MANAGE_NOTIFY,
+ LTTNG_HEALTH_APP_REG_DISPATCH,
+ LTTNG_HEALTH_ALL,
+};
+
+/* Buffer type for a specific domain. */
+enum lttng_buffer_type {
+ LTTNG_BUFFER_PER_PID, /* Only supported by UST being the default. */
+ LTTNG_BUFFER_PER_UID, /* Only supported by UST. */
+ LTTNG_BUFFER_GLOBAL, /* Only supported by the Kernel. */
+};
+
+/*
+ * The structures should be initialized to zero before use.
+ */
+#define LTTNG_DOMAIN_PADDING1 12
+#define LTTNG_DOMAIN_PADDING2 LTTNG_SYMBOL_NAME_LEN + 32
+struct lttng_domain {
+ enum lttng_domain_type type;
+ enum lttng_buffer_type buf_type;
+ char padding[LTTNG_DOMAIN_PADDING1];
+
+ union {
+ pid_t pid;
+ char exec_name[NAME_MAX];
+ char padding[LTTNG_DOMAIN_PADDING2];
+ } attr;
+};
+
+/*
+ * Perf counter attributes
+ *
+ * The structures should be initialized to zero before use.
+ */
+#define LTTNG_PERF_EVENT_PADDING1 16
+struct lttng_event_perf_counter_ctx {
+ uint32_t type;
+ uint64_t config;
+ char name[LTTNG_SYMBOL_NAME_LEN];
+
+ char padding[LTTNG_PERF_EVENT_PADDING1];
+};
+
+/*
+ * Event/channel context
+ *
+ * The structures should be initialized to zero before use.
+ */
+#define LTTNG_EVENT_CONTEXT_PADDING1 16
+#define LTTNG_EVENT_CONTEXT_PADDING2 LTTNG_SYMBOL_NAME_LEN + 32
+struct lttng_event_context {
+ enum lttng_event_context_type ctx;
+ char padding[LTTNG_EVENT_CONTEXT_PADDING1];
+
+ union {
+ struct lttng_event_perf_counter_ctx perf_counter;
+ char padding[LTTNG_EVENT_CONTEXT_PADDING2];
+ } u;
+};
+
+/*
+ * Event probe.
+ *
+ * Either addr is used or symbol_name and offset.
+ *
+ * The structures should be initialized to zero before use.
+ */
+#define LTTNG_EVENT_PROBE_PADDING1 16
+struct lttng_event_probe_attr {
+ uint64_t addr;
+
+ uint64_t offset;
+ char symbol_name[LTTNG_SYMBOL_NAME_LEN];
+
+ char padding[LTTNG_EVENT_PROBE_PADDING1];