X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng-sessiond-comm.h;h=c8f09d39c6b2fa54f7c52eb43b2b2554ab0fe50e;hb=7d0510346384fe2e67e9d3ffc132b05c4612c032;hp=019f92ec51d6ec62a7e610cb40a3a32fea3f4429;hpb=d980092014bba68425b9c63a020bfbc034dc9ad1;p=lttng-tools.git diff --git a/include/lttng-sessiond-comm.h b/include/lttng-sessiond-comm.h index 019f92ec5..c8f09d39c 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) @@ -112,6 +113,7 @@ enum lttcomm_return_code { LTTCOMM_KERN_DIR_EXIST, /* Kernel trace directory exist */ LTTCOMM_KERN_NO_SESSION, /* No kernel session found */ LTTCOMM_KERN_LIST_FAIL, /* Kernel listing events failed */ + LTTCOMM_UST_SESS_FAIL, /* UST create session failed */ KCONSUMERD_COMMAND_SOCK_READY, /* when kconsumerd command socket ready */ KCONSUMERD_SUCCESS_RECV_FD, /* success on receiving fds */ KCONSUMERD_ERROR_RECV_FD, /* error on receiving fds */ @@ -202,6 +204,33 @@ 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 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);