X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng-sessiond-comm.h;h=90ff062334c789c30e368b2bb17b48c770f71771;hp=d9919add7d491878f76af02ec7578a517ef79efd;hb=be4f0921fc6786d2e58d793622d4e1016b739e92;hpb=3bd1e0819b577ffcb44acd7c2f8e02ff09654b7b diff --git a/include/lttng-sessiond-comm.h b/include/lttng-sessiond-comm.h index d9919add7..90ff06233 100644 --- a/include/lttng-sessiond-comm.h +++ b/include/lttng-sessiond-comm.h @@ -32,13 +32,13 @@ #define LTTNG_RUNDIR "/var/run/lttng" /* Default unix socket path */ -#define DEFAULT_GLOBAL_CLIENT_UNIX_SOCK LTTNG_RUNDIR "/client-ltt-sessiond" -#define DEFAULT_GLOBAL_APPS_UNIX_SOCK LTTNG_RUNDIR "/apps-ltt-sessiond" -#define DEFAULT_HOME_APPS_UNIX_SOCK "%s/.apps-ltt-sessiond" -#define DEFAULT_HOME_CLIENT_UNIX_SOCK "%s/.client-ltt-sessiond" +#define DEFAULT_GLOBAL_CLIENT_UNIX_SOCK LTTNG_RUNDIR "/client-lttng-sessiond" +#define DEFAULT_GLOBAL_APPS_UNIX_SOCK LTTNG_RUNDIR "/apps-lttng-sessiond" +#define DEFAULT_HOME_APPS_UNIX_SOCK "%s/.apps-lttng-sessiond" +#define DEFAULT_HOME_CLIENT_UNIX_SOCK "%s/.client-lttng-sessiond" /* Queue size of listen(2) */ -#define MAX_LISTEN 64 +#define LTTNG_SESSIOND_COMM_MAX_LISTEN 64 /* * Get the error code index from 0 since LTTCOMM_OK start at 1000 @@ -114,11 +114,31 @@ enum lttcomm_return_code { LTTCOMM_KERN_NO_SESSION, /* No kernel session found */ LTTCOMM_KERN_LIST_FAIL, /* Kernel listing events failed */ LTTCOMM_UST_SESS_FAIL, /* UST create session failed */ + LTTCOMM_UST_CHAN_EXIST, /* UST channel already exist */ + LTTCOMM_UST_CHAN_FAIL, /* UST create channel failed */ LTTCOMM_UST_CHAN_NOT_FOUND, /* UST channel not found */ - LTTCOMM_UST_CHAN_FAIL, /* UST create channel failed */ + LTTCOMM_UST_CHAN_DISABLE_FAIL, /* UST disable channel failed */ + LTTCOMM_UST_CHAN_ENABLE_FAIL, /* UST enable channel failed */ + LTTCOMM_UST_CONTEXT_FAIL, /* UST add context failed */ + LTTCOMM_UST_ENABLE_FAIL, /* UST enable event failed */ + LTTCOMM_UST_DISABLE_FAIL, /* UST disable event failed */ + LTTCOMM_UST_META_FAIL, /* UST open metadata failed */ + LTTCOMM_UST_START_FAIL, /* UST start trace failed */ + LTTCOMM_UST_STOP_FAIL, /* UST stop trace failed */ + LTTCOMM_UST_CONSUMER64_FAIL, /* 64-bit UST consumer start failed */ + LTTCOMM_UST_CONSUMER32_FAIL, /* 32-bit UST consumer start failed */ + LTTCOMM_UST_STREAM_FAIL, /* UST create stream failed */ + LTTCOMM_UST_DIR_FAIL, /* UST trace directory creation failed */ + LTTCOMM_UST_DIR_EXIST, /* UST trace directory exist */ + LTTCOMM_UST_NO_SESSION, /* No UST session found */ + LTTCOMM_UST_LIST_FAIL, /* UST listing events failed */ + LTTCOMM_UST_EVENT_EXIST, /* UST event exist */ + LTTCOMM_UST_EVENT_NOT_FOUND, /* UST event not found */ + CONSUMERD_COMMAND_SOCK_READY, /* when consumerd command socket ready */ CONSUMERD_SUCCESS_RECV_FD, /* success on receiving fds */ CONSUMERD_ERROR_RECV_FD, /* error on receiving fds */ + CONSUMERD_ERROR_RECV_CMD, /* error on receiving command */ CONSUMERD_POLL_ERROR, /* Error in polling thread in kconsumerd */ CONSUMERD_POLL_NVAL, /* Poll on closed fd */ CONSUMERD_POLL_HUP, /* All fds have hungup */ @@ -210,9 +230,9 @@ struct lttcomm_consumer_msg { } u; }; -#ifdef CONFIG_LTTNG_TOOLS_HAVE_UST +#ifdef HAVE_LIBLTTNG_UST_CTL -#include +#include /* * Data structure for the commands sent from sessiond to UST. @@ -221,10 +241,11 @@ 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_stream stream; struct lttng_ust_event event; struct lttng_ust_context context; + struct lttng_ust_tracer_version version; } u; }; @@ -244,10 +265,11 @@ struct lttcomm_ust_reply { struct { uint64_t memory_map_size; } stream; + struct lttng_ust_tracer_version version; } u; }; -#endif /* CONFIG_LTTNG_TOOLS_HAVE_UST */ +#endif /* HAVE_LIBLTTNG_UST_CTL */ extern int lttcomm_create_unix_sock(const char *pathname); extern int lttcomm_connect_unix_sock(const char *pathname);