Extend API and remove lttng_uri from lttng.h
[lttng-tools.git] / src / common / sessiond-comm / sessiond-comm.h
index f48ba221849f8a3683fb8273cc23a2c156fd75b3..e544bf5458870e880a40c20fdab61c71c51bca69 100644 (file)
@@ -29,6 +29,7 @@
 #include <limits.h>
 #include <lttng/lttng.h>
 #include <common/compat/socket.h>
+#include <common/uri.h>
 
 #include <arpa/inet.h>
 #include <netinet/in.h>
@@ -61,7 +62,6 @@ enum lttcomm_sessiond_command {
        LTTNG_ENABLE_ALL_EVENT,
        /* Session daemon command */
        LTTNG_CREATE_SESSION,
-       LTTNG_CREATE_SESSION_URI,
        LTTNG_DESTROY_SESSION,
        LTTNG_LIST_CHANNELS,
        LTTNG_LIST_DOMAINS,
@@ -84,9 +84,9 @@ enum lttcomm_sessiond_command {
        RELAYD_UPDATE_SYNC_INFO,
        RELAYD_VERSION,
        RELAYD_SEND_METADATA,
-
-       /* Other tracer commands */
+       RELAYD_CLOSE_STREAM,
        LTTNG_SET_FILTER,
+       LTTNG_HEALTH_CHECK,
 };
 
 /*
@@ -185,14 +185,15 @@ enum lttcomm_return_code {
        LTTCOMM_NO_USTCONSUMERD,        /* No UST consumer detected */
        LTTCOMM_NO_KERNCONSUMERD,       /* No Kernel consumer detected */
        LTTCOMM_EVENT_EXIST_LOGLEVEL,   /* Event already enabled with different loglevel */
-       LTTCOMM_URI_DATA_MISS,          /* Missing network data URI */
-       LTTCOMM_URI_CTRL_MISS,          /* Missing network control URI */
+       LTTCOMM_URL_DATA_MISS,          /* Missing network data URL */
+       LTTCOMM_URL_CTRL_MISS,          /* Missing network control URL */
        LTTCOMM_ENABLE_CONSUMER_FAIL,   /* Enabling consumer failed */
        LTTCOMM_RELAYD_SESSION_FAIL,    /* lttng-relayd create session failed */
        LTTCOMM_RELAYD_VERSION_FAIL,    /* lttng-relayd not compatible */
        LTTCOMM_FILTER_INVAL,           /* Invalid filter bytecode */
        LTTCOMM_FILTER_NOMEM,           /* Lack of memory for filter bytecode */
        LTTCOMM_FILTER_EXIST,           /* Filter already exist */
+       LTTCOMM_NO_CONSUMER,            /* No consumer exist for the tracing session */
 
        /* MUST be last element */
        LTTCOMM_NR,                                             /* Last element */
@@ -208,8 +209,8 @@ enum lttcomm_sock_proto {
  * Index in the net_families array below. Please keep in sync!
  */
 enum lttcomm_sock_domain {
-       LTTCOMM_INET      = 1,
-       LTTCOMM_INET6     = 2,
+       LTTCOMM_INET      = 0,
+       LTTCOMM_INET6     = 1,
 };
 
 struct lttcomm_sockaddr {
@@ -280,13 +281,11 @@ struct lttcomm_session_msg {
                        char channel_name[NAME_MAX];
                } list;
                struct lttng_calibrate calibrate;
-               /* Used by the set_consumer_uri call */
-               struct lttng_uri uri;
+               /* Used by the set_consumer_url and used by create_session also call */
                struct {
-                       uint32_t enable_consumer;
-                       struct lttng_uri ctrl_uri;
-                       struct lttng_uri data_uri;
-               } create_uri;
+                       /* Number of lttng_uri following */
+                       uint32_t size;
+               } uri;
                struct {
                        char channel_name[NAME_MAX];
                        char event_name[NAME_MAX];
@@ -321,6 +320,15 @@ struct lttcomm_lttng_msg {
        char payload[];
 };
 
+struct lttcomm_health_msg {
+       uint32_t component;
+       uint32_t cmd;
+};
+
+struct lttcomm_health_data {
+       uint32_t ret_code;
+};
+
 /*
  * lttcomm_consumer_msg is the message sent from sessiond to consumerd
  * to either add a channel, add a stream, update a stream, or stop
@@ -356,6 +364,9 @@ struct lttcomm_consumer_msg {
                        /* Open socket to the relayd */
                        struct lttcomm_sock sock;
                } relayd_sock;
+               struct {
+                       uint64_t net_seq_idx;
+               } destroy_relayd;
        } u;
 };
 
This page took 0.024107 seconds and 4 git commands to generate.