Fix: implicit conversion of enum types in consumer
[lttng-tools.git] / src / common / sessiond-comm / sessiond-comm.h
index 2450e79ec5bd78379941e9765de694a02df76ed8..736d97809de8f25220647a83dfc1c3032e0ac89b 100644 (file)
@@ -108,6 +108,7 @@ enum lttcomm_relayd_command {
  * lttcomm error code.
  */
 enum lttcomm_return_code {
+       LTTCOMM_CONSUMERD_SUCCESS            = 0,   /* Everything went fine. */
        LTTCOMM_CONSUMERD_COMMAND_SOCK_READY = 1,   /* Command socket ready */
        LTTCOMM_CONSUMERD_SUCCESS_RECV_FD,          /* Success on receiving fds */
        LTTCOMM_CONSUMERD_ERROR_RECV_FD,            /* Error on receiving fds */
@@ -126,6 +127,7 @@ enum lttcomm_return_code {
        LTTCOMM_CONSUMERD_ERROR_METADATA,           /* Error with metadata. */
        LTTCOMM_CONSUMERD_FATAL,                    /* Fatal error. */
        LTTCOMM_CONSUMERD_RELAYD_FAIL,              /* Error on remote relayd */
+       LTTCOMM_CONSUMERD_CHANNEL_FAIL,             /* Channel creation failed. */
 
        /* MUST be last element */
        LTTCOMM_NR,                                             /* Last element */
@@ -368,6 +370,13 @@ struct lttcomm_consumer_msg {
                        uint64_t session_id_per_pid;    /* Per-pid session ID. */
                        /* Tells the consumer if the stream should be or not monitored. */
                        uint32_t monitor;
+                       /*
+                        * For UST per UID buffers, this is the application UID of the
+                        * channel.  This can be different from the user UID requesting the
+                        * channel creation and used for the rights on the stream file
+                        * because the application can be in the tracing for instance.
+                        */
+                       uint32_t ust_app_uid;
                } LTTNG_PACKED ask_channel;
                struct {
                        uint64_t key;
@@ -405,11 +414,11 @@ struct lttcomm_consumer_msg {
  * Status message returned to the sessiond after a received command.
  */
 struct lttcomm_consumer_status_msg {
-       enum lttng_error_code ret_code;
+       enum lttcomm_return_code ret_code;
 } LTTNG_PACKED;
 
 struct lttcomm_consumer_status_channel {
-       enum lttng_error_code ret_code;
+       enum lttcomm_return_code ret_code;
        uint64_t key;
        unsigned int stream_count;
 } LTTNG_PACKED;
@@ -474,6 +483,9 @@ extern void lttcomm_copy_sock(struct lttcomm_sock *dst,
 extern struct lttcomm_relayd_sock *lttcomm_alloc_relayd_sock(
                struct lttng_uri *uri, uint32_t major, uint32_t minor);
 
+extern int lttcomm_setsockopt_rcv_timeout(int sock, unsigned int msec);
+extern int lttcomm_setsockopt_snd_timeout(int sock, unsigned int msec);
+
 extern void lttcomm_init(void);
 /* Get network timeout, in milliseconds */
 extern unsigned long lttcomm_get_network_timeout(void);
This page took 0.02352 seconds and 4 git commands to generate.