Implement event fields listing
[lttng-tools.git] / include / lttng / lttng.h
index f621fa80dad58f2b299e5ffaf073598f4d016222..3b1be61974bd8f60558ae34b948ef41751e1e34e 100644 (file)
@@ -228,6 +228,22 @@ struct lttng_event {
        } attr;
 };
 
+enum lttng_event_field_type {
+       LTTNG_EVENT_FIELD_OTHER                 = 0,
+       LTTNG_EVENT_FIELD_INTEGER               = 1,
+       LTTNG_EVENT_FIELD_ENUM                  = 2,
+       LTTNG_EVENT_FIELD_FLOAT                 = 3,
+       LTTNG_EVENT_FIELD_STRING                = 4,
+};
+
+#define LTTNG_EVENT_FIELD_PADDING      LTTNG_SYMBOL_NAME_LEN + 32
+struct lttng_event_field {
+       char field_name[LTTNG_SYMBOL_NAME_LEN];
+       enum lttng_event_field_type type;
+       char padding[LTTNG_EVENT_FIELD_PADDING];
+       struct lttng_event event;
+};
+
 /*
  * Tracer channel attributes. For both kernel and user-space.
  *
@@ -387,6 +403,15 @@ extern int lttng_list_events(struct lttng_handle *handle,
 extern int lttng_list_tracepoints(struct lttng_handle *handle,
                struct lttng_event **events);
 
+/*
+ * List the available tracepoints fields of a specific lttng domain.
+ *
+ * Return the size (number of entries) of the "lttng_event_field" array.
+ * Caller must free(3).
+ */
+extern int lttng_list_tracepoint_fields(struct lttng_handle *handle,
+               struct lttng_event_field **fields);
+
 /*
  * Check if a session daemon is alive.
  *
This page took 0.022969 seconds and 4 git commands to generate.