Adding LTTng UST 2.0 ABI
[lttng-tools.git] / include / lttng-sessiond-comm.h
index 019f92ec51d6ec62a7e610cb40a3a32fea3f4429..33af994a5d3fb0799413a0985c0415b1aba4498c 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <limits.h>
 #include <lttng/lttng.h>
+#include <lttng-ust.h>
 
 #define LTTNG_RUNDIR                        "/var/run/lttng"
 
@@ -40,8 +41,8 @@
 /* Queue size of listen(2) */
 #define MAX_LISTEN 10
 
-/* Get the error code index from 0 since
- * LTTCOMM_OK start at 1000
+/*
+ * Get the error code index from 0 since LTTCOMM_OK start at 1000
  */
 #define LTTCOMM_ERR_INDEX(code) (code - LTTCOMM_OK)
 
@@ -202,6 +203,34 @@ struct lttcomm_kconsumerd_msg {
        enum lttng_event_output output; /* use splice or mmap to consume this fd */
 };
 
+/*
+ * Data structure for the commands sent from sessiond to UST.
+ */
+struct lttcomm_ust_msg {
+       uint32_t cmd_type;    /* enum lttcomm_ust_command */
+       uint32_t handle;
+       uint32_t cmd;
+       union {
+               struct lttng_ust_tracer_version version;
+               struct lttng_ust_channel channel;
+               struct lttng_ust_event event;
+               struct lttng_ust_context context;
+       } u;
+};
+
+/*
+ * Data structure for the response from UST to the session daemon.
+ * cmd_type is sent back in the reply for validation.
+ */
+struct lttcomm_ust_reply {
+       uint32_t handle;
+       uint32_t cmd;
+       uint32_t ret_code;      /* enum lttcomm_return_code */
+       uint32_t ret_val;       /* return value */
+       union {
+       } u;
+};
+
 extern int lttcomm_create_unix_sock(const char *pathname);
 extern int lttcomm_connect_unix_sock(const char *pathname);
 extern int lttcomm_accept_unix_sock(int sock);
This page took 0.024346 seconds and 5 git commands to generate.