X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng-sessiond-comm.h;h=33af994a5d3fb0799413a0985c0415b1aba4498c;hp=019f92ec51d6ec62a7e610cb40a3a32fea3f4429;hb=3817e7df7aa29d8f52f1a4909b4fa6b660494323;hpb=83009e5e25be5591c5a08e018e95a7d9baf7c108 diff --git a/include/lttng-sessiond-comm.h b/include/lttng-sessiond-comm.h index 019f92ec5..33af994a5 100644 --- a/include/lttng-sessiond-comm.h +++ b/include/lttng-sessiond-comm.h @@ -28,6 +28,7 @@ #include #include +#include #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);