+ LTTNG_DISABLE_CONSUMER = 19,
+ LTTNG_ENABLE_CONSUMER = 20,
+ LTTNG_SET_CONSUMER_URI = 21,
+ /* 22 */
+ /* 23 */
+ LTTNG_DATA_PENDING = 24,
+ LTTNG_SNAPSHOT_ADD_OUTPUT = 25,
+ LTTNG_SNAPSHOT_DEL_OUTPUT = 26,
+ LTTNG_SNAPSHOT_LIST_OUTPUT = 27,
+ LTTNG_SNAPSHOT_RECORD = 28,
+ /* 29 */
+ /* 30 */
+ LTTNG_SAVE_SESSION = 31,
+ LTTNG_PROCESS_ATTR_TRACKER_ADD_INCLUDE_VALUE = 32,
+ LTTNG_PROCESS_ATTR_TRACKER_REMOVE_INCLUDE_VALUE = 33,
+ LTTNG_PROCESS_ATTR_TRACKER_GET_POLICY = 34,
+ LTTNG_PROCESS_ATTR_TRACKER_SET_POLICY = 35,
+ LTTNG_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET = 36,
+ LTTNG_SET_SESSION_SHM_PATH = 40,
+ LTTNG_REGENERATE_METADATA = 41,
+ LTTNG_REGENERATE_STATEDUMP = 42,
+ LTTNG_REGISTER_TRIGGER = 43,
+ LTTNG_UNREGISTER_TRIGGER = 44,
+ LTTNG_ROTATE_SESSION = 45,
+ LTTNG_ROTATION_GET_INFO = 46,
+ LTTNG_ROTATION_SET_SCHEDULE = 47,
+ LTTNG_SESSION_LIST_ROTATION_SCHEDULES = 48,
+ LTTNG_CREATE_SESSION_EXT = 49,
+ LTTNG_CLEAR_SESSION = 50,
+ LTTNG_LIST_TRIGGERS = 51,
+};
+
+static inline
+const char *lttcomm_sessiond_command_str(enum lttcomm_sessiond_command cmd)
+{
+ switch (cmd) {
+ case LTTNG_ADD_CONTEXT:
+ return "LTTNG_ADD_CONTEXT";
+ case LTTNG_DISABLE_CHANNEL:
+ return "LTTNG_DISABLE_CHANNEL";
+ case LTTNG_DISABLE_EVENT:
+ return "LTTNG_DISABLE_EVENT";
+ case LTTNG_LIST_SYSCALLS:
+ return "LTTNG_LIST_SYSCALLS";
+ case LTTNG_ENABLE_CHANNEL:
+ return "LTTNG_ENABLE_CHANNEL";
+ case LTTNG_ENABLE_EVENT:
+ return "LTTNG_ENABLE_EVENT";
+ case LTTNG_DESTROY_SESSION:
+ return "LTTNG_DESTROY_SESSION";
+ case LTTNG_LIST_CHANNELS:
+ return "LTTNG_LIST_CHANNELS";
+ case LTTNG_LIST_DOMAINS:
+ return "LTTNG_LIST_DOMAINS";
+ case LTTNG_LIST_EVENTS:
+ return "LTTNG_LIST_EVENTS";
+ case LTTNG_LIST_SESSIONS:
+ return "LTTNG_LIST_SESSIONS";
+ case LTTNG_LIST_TRACEPOINTS:
+ return "LTTNG_LIST_TRACEPOINTS";
+ case LTTNG_REGISTER_CONSUMER:
+ return "LTTNG_REGISTER_CONSUMER";
+ case LTTNG_START_TRACE:
+ return "LTTNG_START_TRACE";
+ case LTTNG_STOP_TRACE:
+ return "LTTNG_STOP_TRACE";
+ case LTTNG_LIST_TRACEPOINT_FIELDS:
+ return "LTTNG_LIST_TRACEPOINT_FIELDS";
+ case LTTNG_DISABLE_CONSUMER:
+ return "LTTNG_DISABLE_CONSUMER";
+ case LTTNG_ENABLE_CONSUMER:
+ return "LTTNG_ENABLE_CONSUMER";
+ case LTTNG_SET_CONSUMER_URI:
+ return "LTTNG_SET_CONSUMER_URI";
+ case LTTNG_DATA_PENDING:
+ return "LTTNG_DATA_PENDING";
+ case LTTNG_SNAPSHOT_ADD_OUTPUT:
+ return "LTTNG_SNAPSHOT_ADD_OUTPUT";
+ case LTTNG_SNAPSHOT_DEL_OUTPUT:
+ return "LTTNG_SNAPSHOT_DEL_OUTPUT";
+ case LTTNG_SNAPSHOT_LIST_OUTPUT:
+ return "LTTNG_SNAPSHOT_LIST_OUTPUT";
+ case LTTNG_SNAPSHOT_RECORD:
+ return "LTTNG_SNAPSHOT_RECORD";
+ case LTTNG_SAVE_SESSION:
+ return "LTTNG_SAVE_SESSION";
+ case LTTNG_PROCESS_ATTR_TRACKER_ADD_INCLUDE_VALUE:
+ return "LTTNG_PROCESS_ATTR_TRACKER_ADD_INCLUDE_VALUE";
+ case LTTNG_PROCESS_ATTR_TRACKER_REMOVE_INCLUDE_VALUE:
+ return "LTTNG_PROCESS_ATTR_TRACKER_REMOVE_INCLUDE_VALUE";
+ case LTTNG_PROCESS_ATTR_TRACKER_GET_POLICY:
+ return "LTTNG_PROCESS_ATTR_TRACKER_GET_POLICY";
+ case LTTNG_PROCESS_ATTR_TRACKER_SET_POLICY:
+ return "LTTNG_PROCESS_ATTR_TRACKER_SET_POLICY";
+ case LTTNG_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET:
+ return "LTTNG_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET";
+ case LTTNG_SET_SESSION_SHM_PATH:
+ return "LTTNG_SET_SESSION_SHM_PATH";
+ case LTTNG_REGENERATE_METADATA:
+ return "LTTNG_REGENERATE_METADATA";
+ case LTTNG_REGENERATE_STATEDUMP:
+ return "LTTNG_REGENERATE_STATEDUMP";
+ case LTTNG_REGISTER_TRIGGER:
+ return "LTTNG_REGISTER_TRIGGER";
+ case LTTNG_UNREGISTER_TRIGGER:
+ return "LTTNG_UNREGISTER_TRIGGER";
+ case LTTNG_ROTATE_SESSION:
+ return "LTTNG_ROTATE_SESSION";
+ case LTTNG_ROTATION_GET_INFO:
+ return "LTTNG_ROTATION_GET_INFO";
+ case LTTNG_ROTATION_SET_SCHEDULE:
+ return "LTTNG_ROTATION_SET_SCHEDULE";
+ case LTTNG_SESSION_LIST_ROTATION_SCHEDULES:
+ return "LTTNG_SESSION_LIST_ROTATION_SCHEDULES";
+ case LTTNG_CREATE_SESSION_EXT:
+ return "LTTNG_CREATE_SESSION_EXT";
+ case LTTNG_CLEAR_SESSION:
+ return "LTTNG_CLEAR_SESSION";
+ case LTTNG_LIST_TRIGGERS:
+ return "LTTNG_LIST_TRIGGERS";
+ default:
+ abort();
+ }
+}
+
+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,
+ RELAYD_ADD_INDEX = 12,
+ RELAYD_SEND_INDEX = 13,
+ RELAYD_CLOSE_INDEX = 14,
+ /* Live-reading commands (2.4+). */
+ RELAYD_LIST_SESSIONS = 15,
+ /* All streams of the channel have been sent to the relayd (2.4+). */
+ RELAYD_STREAMS_SENT = 16,
+ /* Ask the relay to reset the metadata trace file (2.8+) */
+ RELAYD_RESET_METADATA = 17,
+ /* Ask the relay to rotate a set of stream files (2.11+) */
+ RELAYD_ROTATE_STREAMS = 18,
+ /* Ask the relay to create a trace chunk (2.11+) */
+ RELAYD_CREATE_TRACE_CHUNK = 19,
+ /* Ask the relay to close a trace chunk (2.11+) */
+ RELAYD_CLOSE_TRACE_CHUNK = 20,
+ /* Ask the relay whether a trace chunk exists (2.11+) */
+ RELAYD_TRACE_CHUNK_EXISTS = 21,
+ /* Get the current configuration of a relayd peer (2.12+) */
+ RELAYD_GET_CONFIGURATION = 22,
+
+ /* Feature branch specific commands start at 10000. */