From: Julien Desfossez Date: Fri, 14 Dec 2012 01:01:52 +0000 (-0500) Subject: Move relay commands out of lttcomm_sessiond_command X-Git-Tag: v2.1.0~46 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7c9534d659135c84659bdaad54dde406842a32f8;p=lttng-tools.git Move relay commands out of lttcomm_sessiond_command Introduce a new enum for relayd commands: lttcomm_relayd_command. This will make further additions to either enum cleaner. Signed-off-by: Julien Desfossez Signed-off-by: David Goulet --- diff --git a/src/common/relayd/relayd.c b/src/common/relayd/relayd.c index 43f910823..2ec6ef2db 100644 --- a/src/common/relayd/relayd.c +++ b/src/common/relayd/relayd.c @@ -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; diff --git a/src/common/sessiond-comm/relayd.h b/src/common/sessiond-comm/relayd.h index 03460de38..7a89c3127 100644 --- a/src/common/sessiond-comm/relayd.h +++ b/src/common/sessiond-comm/relayd.h @@ -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; diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.h index 3511f04ea..322400bb2 100644 --- a/src/common/sessiond-comm/sessiond-comm.h +++ b/src/common/sessiond-comm/sessiond-comm.h @@ -53,46 +53,48 @@ 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, }; /*