Move relay commands out of lttcomm_sessiond_command
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 14 Dec 2012 01:01:52 +0000 (20:01 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 14 Dec 2012 01:25:42 +0000 (20:25 -0500)
Introduce a new enum for relayd commands: lttcomm_relayd_command. This
will make further additions to either enum cleaner.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/relayd/relayd.c
src/common/sessiond-comm/relayd.h
src/common/sessiond-comm/sessiond-comm.h

index 43f91082385a951682f6ebaf6f839abf3e123a33..2ec6ef2db39aebac9451f3b560884bfb0bde5f66 100644 (file)
@@ -33,7 +33,7 @@
  * Send command. Fill up the header and append the data.
  */
 static int send_command(struct lttcomm_sock *sock,
-               enum lttcomm_sessiond_command cmd, void *data, size_t size,
+               enum lttcomm_relayd_command cmd, void *data, size_t size,
                int flags)
 {
        int ret;
index 03460de38566cdb7ec42b13a6c0e4d2a55f44f1d..7a89c3127920e3eb7db12a187446ea3a9f3eccaa 100644 (file)
@@ -37,7 +37,7 @@ struct lttcomm_relayd_hdr {
        /* Circuit ID not used for now so always ignored */
        uint64_t circuit_id;
        uint64_t data_size;             /* data size following this header */
-       uint32_t cmd;                   /* enum lttcomm_sessiond_command */
+       uint32_t cmd;                   /* enum lttcomm_relayd_command */
        uint32_t cmd_version;   /* command version */
 } LTTNG_PACKED;
 
index 3511f04ead3716a9c0638398f211013c8bacc476..322400bb2cb7ce91f6a2194250c6e875aca7061d 100644 (file)
 
 enum lttcomm_sessiond_command {
        /* Tracer command */
-       LTTNG_ADD_CONTEXT                                       = 1,
-       LTTNG_CALIBRATE                                         = 2,
-       LTTNG_DISABLE_CHANNEL                           = 3,
-       LTTNG_DISABLE_EVENT                                     = 4,
-       LTTNG_DISABLE_ALL_EVENT                         = 5,
-       LTTNG_ENABLE_CHANNEL                            = 6,
-       LTTNG_ENABLE_EVENT                                      = 7,
-       LTTNG_ENABLE_ALL_EVENT                          = 8,
+       LTTNG_ADD_CONTEXT                   = 0,
+       LTTNG_CALIBRATE                     = 1,
+       LTTNG_DISABLE_CHANNEL               = 2,
+       LTTNG_DISABLE_EVENT                 = 3,
+       LTTNG_DISABLE_ALL_EVENT             = 4,
+       LTTNG_ENABLE_CHANNEL                = 5,
+       LTTNG_ENABLE_EVENT                  = 6,
+       LTTNG_ENABLE_ALL_EVENT              = 7,
        /* Session daemon command */
-       LTTNG_CREATE_SESSION                            = 9,
-       LTTNG_DESTROY_SESSION                           = 10,
-       LTTNG_LIST_CHANNELS                 = 11,
-       LTTNG_LIST_DOMAINS                  = 12,
-       LTTNG_LIST_EVENTS                   = 13,
-       LTTNG_LIST_SESSIONS                 = 14,
-       LTTNG_LIST_TRACEPOINTS              = 15,
-       LTTNG_REGISTER_CONSUMER             = 16,
-       LTTNG_START_TRACE                   = 17,
-       LTTNG_STOP_TRACE                    = 18,
-       LTTNG_LIST_TRACEPOINT_FIELDS        = 19,
+       LTTNG_CREATE_SESSION                = 8,
+       LTTNG_DESTROY_SESSION               = 9,
+       LTTNG_LIST_CHANNELS                 = 10,
+       LTTNG_LIST_DOMAINS                  = 11,
+       LTTNG_LIST_EVENTS                   = 12,
+       LTTNG_LIST_SESSIONS                 = 13,
+       LTTNG_LIST_TRACEPOINTS              = 14,
+       LTTNG_REGISTER_CONSUMER             = 15,
+       LTTNG_START_TRACE                   = 16,
+       LTTNG_STOP_TRACE                    = 17,
+       LTTNG_LIST_TRACEPOINT_FIELDS        = 18,
 
        /* Consumer */
-       LTTNG_DISABLE_CONSUMER              = 20,
-       LTTNG_ENABLE_CONSUMER               = 21,
-       LTTNG_SET_CONSUMER_URI              = 22,
-       /* Relay daemon */
-       RELAYD_ADD_STREAM                   = 23,
-       RELAYD_CREATE_SESSION               = 24,
-       RELAYD_START_DATA                   = 25,
-       RELAYD_UPDATE_SYNC_INFO             = 26,
-       RELAYD_VERSION                      = 27,
-       RELAYD_SEND_METADATA                = 28,
-       RELAYD_CLOSE_STREAM                 = 29,
-       RELAYD_DATA_PENDING                 = 30,
-       RELAYD_QUIESCENT_CONTROL            = 31,
-       LTTNG_ENABLE_EVENT_WITH_FILTER      = 32,
-       LTTNG_HEALTH_CHECK                  = 33,
-       LTTNG_DATA_PENDING                  = 34,
-       RELAYD_BEGIN_DATA_PENDING           = 35,
-       RELAYD_END_DATA_PENDING             = 36,
+       LTTNG_DISABLE_CONSUMER              = 19,
+       LTTNG_ENABLE_CONSUMER               = 20,
+       LTTNG_SET_CONSUMER_URI              = 21,
+       LTTNG_ENABLE_EVENT_WITH_FILTER      = 22,
+       LTTNG_HEALTH_CHECK                  = 23,
+       LTTNG_DATA_PENDING                  = 24,
+};
+
+enum lttcomm_relayd_command {
+       RELAYD_ADD_STREAM                   = 1,
+       RELAYD_CREATE_SESSION               = 2,
+       RELAYD_START_DATA                   = 3,
+       RELAYD_UPDATE_SYNC_INFO             = 4,
+       RELAYD_VERSION                      = 5,
+       RELAYD_SEND_METADATA                = 6,
+       RELAYD_CLOSE_STREAM                 = 7,
+       RELAYD_DATA_PENDING                 = 8,
+       RELAYD_QUIESCENT_CONTROL            = 9,
+       RELAYD_BEGIN_DATA_PENDING           = 10,
+       RELAYD_END_DATA_PENDING             = 11,
 };
 
 /*
This page took 0.029638 seconds and 4 git commands to generate.