* are then copied to the user's lttng_rotation_handle object.
*/
-/* For the LTTNG_ROTATE_SESSION command. */
+/* For the LTTCOMM_SESSIOND_COMMAND_ROTATE_SESSION command. */
struct lttng_rotate_session_return {
uint64_t rotation_id;
} LTTNG_PACKED;
-/* For the LTTNG_ROTATION_GET_INFO command. */
+/* For the LTTCOMM_SESSIOND_COMMAND_ROTATION_GET_INFO command. */
struct lttng_rotation_get_info_return {
/* Represents values defined in enum lttng_rotation_state. */
int32_t status;
const struct cmd_clear_session_reply_context *reply_context =
(cmd_clear_session_reply_context *) _reply_context;
struct lttcomm_lttng_msg llm = {
- .cmd_type = LTTNG_CLEAR_SESSION,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_CLEAR_SESSION,
.ret_code = LTTNG_OK,
.pid = UINT32_MAX,
.cmd_header_size = 0,
struct lttng_event_exclusion *local_exclusion = NULL;
lttng_payload_init(&event_payload);
- if (cmd_ctx->lsm.cmd_type == LTTNG_ENABLE_EVENT) {
+ if (cmd_ctx->lsm.cmd_type == LTTCOMM_SESSIOND_COMMAND_ENABLE_EVENT) {
event_len = (size_t) cmd_ctx->lsm.u.enable.length;
- } else if (cmd_ctx->lsm.cmd_type == LTTNG_DISABLE_EVENT) {
+ } else if (cmd_ctx->lsm.cmd_type == LTTCOMM_SESSIOND_COMMAND_DISABLE_EVENT) {
event_len = (size_t) cmd_ctx->lsm.u.disable.length;
} else {
abort();
*sock_error = 0;
switch (cmd_ctx->lsm.cmd_type) {
- case LTTNG_CREATE_SESSION_EXT:
- case LTTNG_DESTROY_SESSION:
- case LTTNG_LIST_SESSIONS:
- case LTTNG_LIST_DOMAINS:
- case LTTNG_START_TRACE:
- case LTTNG_STOP_TRACE:
- case LTTNG_DATA_PENDING:
- case LTTNG_SNAPSHOT_ADD_OUTPUT:
- case LTTNG_SNAPSHOT_DEL_OUTPUT:
- case LTTNG_SNAPSHOT_LIST_OUTPUT:
- case LTTNG_SNAPSHOT_RECORD:
- case LTTNG_SAVE_SESSION:
- case LTTNG_SET_SESSION_SHM_PATH:
- case LTTNG_REGENERATE_METADATA:
- case LTTNG_REGENERATE_STATEDUMP:
- case LTTNG_ROTATE_SESSION:
- case LTTNG_ROTATION_GET_INFO:
- case LTTNG_ROTATION_SET_SCHEDULE:
- case LTTNG_SESSION_LIST_ROTATION_SCHEDULES:
- case LTTNG_CLEAR_SESSION:
- case LTTNG_LIST_TRIGGERS:
- case LTTNG_EXECUTE_ERROR_QUERY:
+ case LTTCOMM_SESSIOND_COMMAND_CREATE_SESSION_EXT:
+ case LTTCOMM_SESSIOND_COMMAND_DESTROY_SESSION:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_SESSIONS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_DOMAINS:
+ case LTTCOMM_SESSIOND_COMMAND_START_TRACE:
+ case LTTCOMM_SESSIOND_COMMAND_STOP_TRACE:
+ case LTTCOMM_SESSIOND_COMMAND_DATA_PENDING:
+ case LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_ADD_OUTPUT:
+ case LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_DEL_OUTPUT:
+ case LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_LIST_OUTPUT:
+ case LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_RECORD:
+ case LTTCOMM_SESSIOND_COMMAND_SAVE_SESSION:
+ case LTTCOMM_SESSIOND_COMMAND_SET_SESSION_SHM_PATH:
+ case LTTCOMM_SESSIOND_COMMAND_REGENERATE_METADATA:
+ case LTTCOMM_SESSIOND_COMMAND_REGENERATE_STATEDUMP:
+ case LTTCOMM_SESSIOND_COMMAND_ROTATE_SESSION:
+ case LTTCOMM_SESSIOND_COMMAND_ROTATION_GET_INFO:
+ case LTTCOMM_SESSIOND_COMMAND_ROTATION_SET_SCHEDULE:
+ case LTTCOMM_SESSIOND_COMMAND_SESSION_LIST_ROTATION_SCHEDULES:
+ case LTTCOMM_SESSIOND_COMMAND_CLEAR_SESSION:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRIGGERS:
+ case LTTCOMM_SESSIOND_COMMAND_EXECUTE_ERROR_QUERY:
need_domain = false;
break;
default:
/* Needs a functioning consumerd? */
switch (cmd_ctx->lsm.cmd_type) {
- case LTTNG_REGISTER_TRIGGER:
- case LTTNG_UNREGISTER_TRIGGER:
- case LTTNG_EXECUTE_ERROR_QUERY:
+ case LTTCOMM_SESSIOND_COMMAND_REGISTER_TRIGGER:
+ case LTTCOMM_SESSIOND_COMMAND_UNREGISTER_TRIGGER:
+ case LTTCOMM_SESSIOND_COMMAND_EXECUTE_ERROR_QUERY:
need_consumerd = false;
break;
default:
}
/* Deny register consumer if we already have a spawned consumer. */
- if (cmd_ctx->lsm.cmd_type == LTTNG_REGISTER_CONSUMER) {
+ if (cmd_ctx->lsm.cmd_type == LTTCOMM_SESSIOND_COMMAND_REGISTER_CONSUMER) {
pthread_mutex_lock(&the_kconsumer_data.pid_mutex);
if (the_kconsumer_data.pid > 0) {
ret = LTTNG_ERR_KERN_CONSUMER_FAIL;
* command.
*/
switch(cmd_ctx->lsm.cmd_type) {
- case LTTNG_LIST_SESSIONS:
- case LTTNG_LIST_TRACEPOINTS:
- case LTTNG_LIST_TRACEPOINT_FIELDS:
- case LTTNG_LIST_DOMAINS:
- case LTTNG_LIST_CHANNELS:
- case LTTNG_LIST_EVENTS:
- case LTTNG_LIST_SYSCALLS:
- case LTTNG_SESSION_LIST_ROTATION_SCHEDULES:
- case LTTNG_PROCESS_ATTR_TRACKER_GET_POLICY:
- case LTTNG_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET:
- case LTTNG_DATA_PENDING:
- case LTTNG_ROTATE_SESSION:
- case LTTNG_ROTATION_GET_INFO:
- case LTTNG_REGISTER_TRIGGER:
- case LTTNG_LIST_TRIGGERS:
- case LTTNG_EXECUTE_ERROR_QUERY:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_SESSIONS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRACEPOINTS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRACEPOINT_FIELDS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_DOMAINS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_CHANNELS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_EVENTS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_SYSCALLS:
+ case LTTCOMM_SESSIOND_COMMAND_SESSION_LIST_ROTATION_SCHEDULES:
+ case LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_GET_POLICY:
+ case LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET:
+ case LTTCOMM_SESSIOND_COMMAND_DATA_PENDING:
+ case LTTCOMM_SESSIOND_COMMAND_ROTATE_SESSION:
+ case LTTCOMM_SESSIOND_COMMAND_ROTATION_GET_INFO:
+ case LTTCOMM_SESSIOND_COMMAND_REGISTER_TRIGGER:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRIGGERS:
+ case LTTCOMM_SESSIOND_COMMAND_EXECUTE_ERROR_QUERY:
break;
default:
/* Setup lttng message with no payload */
/* Commands that DO NOT need a session. */
switch (cmd_ctx->lsm.cmd_type) {
- case LTTNG_CREATE_SESSION_EXT:
- case LTTNG_LIST_SESSIONS:
- case LTTNG_LIST_TRACEPOINTS:
- case LTTNG_LIST_SYSCALLS:
- case LTTNG_LIST_TRACEPOINT_FIELDS:
- case LTTNG_SAVE_SESSION:
- case LTTNG_REGISTER_TRIGGER:
- case LTTNG_UNREGISTER_TRIGGER:
- case LTTNG_LIST_TRIGGERS:
- case LTTNG_EXECUTE_ERROR_QUERY:
+ case LTTCOMM_SESSIOND_COMMAND_CREATE_SESSION_EXT:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_SESSIONS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRACEPOINTS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_SYSCALLS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRACEPOINT_FIELDS:
+ case LTTCOMM_SESSIOND_COMMAND_SAVE_SESSION:
+ case LTTCOMM_SESSIOND_COMMAND_REGISTER_TRIGGER:
+ case LTTCOMM_SESSIOND_COMMAND_UNREGISTER_TRIGGER:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRIGGERS:
+ case LTTCOMM_SESSIOND_COMMAND_EXECUTE_ERROR_QUERY:
need_tracing_session = false;
break;
default:
* code path.
*/
switch (cmd_ctx->lsm.cmd_type) {
- case LTTNG_DISABLE_CHANNEL:
- case LTTNG_DISABLE_EVENT:
+ case LTTCOMM_SESSIOND_COMMAND_DISABLE_CHANNEL:
+ case LTTCOMM_SESSIOND_COMMAND_DISABLE_EVENT:
switch (cmd_ctx->lsm.domain.type) {
case LTTNG_DOMAIN_KERNEL:
if (!cmd_ctx->session->kernel_session) {
/* Start the kernel consumer daemon */
pthread_mutex_lock(&the_kconsumer_data.pid_mutex);
if (the_kconsumer_data.pid == 0 &&
- cmd_ctx->lsm.cmd_type != LTTNG_REGISTER_CONSUMER) {
+ cmd_ctx->lsm.cmd_type != LTTCOMM_SESSIOND_COMMAND_REGISTER_CONSUMER) {
pthread_mutex_unlock(&the_kconsumer_data.pid_mutex);
ret = start_consumerd(&the_kconsumer_data);
if (ret < 0) {
pthread_mutex_lock(&the_ustconsumer64_data.pid_mutex);
if (the_config.consumerd64_bin_path.value &&
the_ustconsumer64_data.pid == 0 &&
- cmd_ctx->lsm.cmd_type != LTTNG_REGISTER_CONSUMER) {
+ cmd_ctx->lsm.cmd_type != LTTCOMM_SESSIOND_COMMAND_REGISTER_CONSUMER) {
pthread_mutex_unlock(&the_ustconsumer64_data.pid_mutex);
ret = start_consumerd(&the_ustconsumer64_data);
if (ret < 0) {
pthread_mutex_lock(&the_ustconsumer32_data.pid_mutex);
if (the_config.consumerd32_bin_path.value &&
the_ustconsumer32_data.pid == 0 &&
- cmd_ctx->lsm.cmd_type != LTTNG_REGISTER_CONSUMER) {
+ cmd_ctx->lsm.cmd_type != LTTCOMM_SESSIOND_COMMAND_REGISTER_CONSUMER) {
pthread_mutex_unlock(&the_ustconsumer32_data.pid_mutex);
ret = start_consumerd(&the_ustconsumer32_data);
if (ret < 0) {
skip_domain:
/* Validate consumer daemon state when start/stop trace command */
- if (cmd_ctx->lsm.cmd_type == LTTNG_START_TRACE ||
- cmd_ctx->lsm.cmd_type == LTTNG_STOP_TRACE) {
+ if (cmd_ctx->lsm.cmd_type == LTTCOMM_SESSIOND_COMMAND_START_TRACE ||
+ cmd_ctx->lsm.cmd_type == LTTCOMM_SESSIOND_COMMAND_STOP_TRACE) {
switch (cmd_ctx->lsm.domain.type) {
case LTTNG_DOMAIN_NONE:
break;
/* Process by command type */
switch (cmd_ctx->lsm.cmd_type) {
- case LTTNG_ADD_CONTEXT:
+ case LTTCOMM_SESSIOND_COMMAND_ADD_CONTEXT:
{
struct lttng_event_context *event_context = NULL;
const enum lttng_error_code ret_code =
lttng_event_context_destroy(event_context);
break;
}
- case LTTNG_DISABLE_CHANNEL:
+ case LTTCOMM_SESSIOND_COMMAND_DISABLE_CHANNEL:
{
ret = cmd_disable_channel(cmd_ctx->session, cmd_ctx->lsm.domain.type,
cmd_ctx->lsm.u.disable.channel_name);
break;
}
- case LTTNG_ENABLE_CHANNEL:
+ case LTTCOMM_SESSIOND_COMMAND_ENABLE_CHANNEL:
{
ret = cmd_enable_channel(
cmd_ctx, *sock, the_kernel_poll_pipe[1]);
break;
}
- case LTTNG_PROCESS_ATTR_TRACKER_ADD_INCLUDE_VALUE:
- case LTTNG_PROCESS_ATTR_TRACKER_REMOVE_INCLUDE_VALUE:
+ case LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_ADD_INCLUDE_VALUE:
+ case LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_REMOVE_INCLUDE_VALUE:
{
struct lttng_dynamic_buffer payload;
struct lttng_buffer_view payload_view;
const bool add_value =
cmd_ctx->lsm.cmd_type ==
- LTTNG_PROCESS_ATTR_TRACKER_ADD_INCLUDE_VALUE;
+ LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_ADD_INCLUDE_VALUE;
const size_t name_len =
cmd_ctx->lsm.u.process_attr_tracker_add_remove_include_value
.name_len;
lttng_dynamic_buffer_reset(&payload);
break;
}
- case LTTNG_PROCESS_ATTR_TRACKER_GET_POLICY:
+ case LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_GET_POLICY:
{
enum lttng_tracking_policy tracking_policy;
const enum lttng_domain_type domain_type =
ret = LTTNG_OK;
break;
}
- case LTTNG_PROCESS_ATTR_TRACKER_SET_POLICY:
+ case LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_SET_POLICY:
{
const enum lttng_tracking_policy tracking_policy =
(enum lttng_tracking_policy) cmd_ctx->lsm.u
}
break;
}
- case LTTNG_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET:
+ case LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET:
{
struct lttng_process_attr_values *values;
struct lttng_dynamic_buffer reply;
lttng_dynamic_buffer_reset(&reply);
break;
}
- case LTTNG_ENABLE_EVENT:
- case LTTNG_DISABLE_EVENT:
+ case LTTCOMM_SESSIOND_COMMAND_ENABLE_EVENT:
+ case LTTCOMM_SESSIOND_COMMAND_DISABLE_EVENT:
{
struct lttng_event *event;
char *filter_expression;
* Ownership of filter_expression, exclusions, and bytecode is
* always transferred.
*/
- ret = cmd_ctx->lsm.cmd_type == LTTNG_ENABLE_EVENT ?
+ ret = cmd_ctx->lsm.cmd_type == LTTCOMM_SESSIOND_COMMAND_ENABLE_EVENT ?
cmd_enable_event(cmd_ctx, event,
filter_expression, exclusions,
bytecode,
lttng_event_destroy(event);
break;
}
- case LTTNG_LIST_TRACEPOINTS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRACEPOINTS:
{
enum lttng_error_code ret_code;
size_t original_payload_size;
ret = LTTNG_OK;
break;
}
- case LTTNG_LIST_TRACEPOINT_FIELDS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRACEPOINT_FIELDS:
{
enum lttng_error_code ret_code;
size_t original_payload_size;
ret = LTTNG_OK;
break;
}
- case LTTNG_LIST_SYSCALLS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_SYSCALLS:
{
enum lttng_error_code ret_code;
size_t original_payload_size;
ret = LTTNG_OK;
break;
}
- case LTTNG_SET_CONSUMER_URI:
+ case LTTCOMM_SESSIOND_COMMAND_SET_CONSUMER_URI:
{
size_t nb_uri, len;
struct lttng_uri *uris;
break;
}
- case LTTNG_START_TRACE:
+ case LTTCOMM_SESSIOND_COMMAND_START_TRACE:
{
/*
* On the first start, if we have a kernel session and we have
ret = cmd_start_trace(cmd_ctx->session);
break;
}
- case LTTNG_STOP_TRACE:
+ case LTTCOMM_SESSIOND_COMMAND_STOP_TRACE:
{
ret = cmd_stop_trace(cmd_ctx->session);
break;
}
- case LTTNG_DESTROY_SESSION:
+ case LTTCOMM_SESSIOND_COMMAND_DESTROY_SESSION:
{
ret = cmd_destroy_session(cmd_ctx->session,
the_notification_thread_handle, sock);
break;
}
- case LTTNG_LIST_DOMAINS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_DOMAINS:
{
ssize_t nb_dom;
struct lttng_domain *domains = NULL;
ret = LTTNG_OK;
break;
}
- case LTTNG_LIST_CHANNELS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_CHANNELS:
{
enum lttng_error_code ret_code;
size_t original_payload_size;
ret = LTTNG_OK;
break;
}
- case LTTNG_LIST_EVENTS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_EVENTS:
{
enum lttng_error_code ret_code;
size_t original_payload_size;
ret = LTTNG_OK;
break;
}
- case LTTNG_LIST_SESSIONS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_SESSIONS:
{
unsigned int nr_sessions;
lttng_session *sessions_payload = nullptr;
ret = LTTNG_OK;
break;
}
- case LTTNG_REGISTER_CONSUMER:
+ case LTTCOMM_SESSIOND_COMMAND_REGISTER_CONSUMER:
{
struct consumer_data *cdata;
cmd_ctx->lsm.u.reg.path, cdata);
break;
}
- case LTTNG_DATA_PENDING:
+ case LTTCOMM_SESSIOND_COMMAND_DATA_PENDING:
{
int pending_ret;
uint8_t pending_ret_byte;
ret = LTTNG_OK;
break;
}
- case LTTNG_SNAPSHOT_ADD_OUTPUT:
+ case LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_ADD_OUTPUT:
{
uint32_t snapshot_id;
struct lttcomm_lttng_output_id reply;
ret = LTTNG_OK;
break;
}
- case LTTNG_SNAPSHOT_DEL_OUTPUT:
+ case LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_DEL_OUTPUT:
{
lttng_snapshot_output output = cmd_ctx->lsm.u.snapshot_output.output;
ret = cmd_snapshot_del_output(cmd_ctx->session, &output);
break;
}
- case LTTNG_SNAPSHOT_LIST_OUTPUT:
+ case LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_LIST_OUTPUT:
{
ssize_t nb_output;
struct lttng_snapshot_output *outputs = NULL;
ret = LTTNG_OK;
break;
}
- case LTTNG_SNAPSHOT_RECORD:
+ case LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_RECORD:
{
lttng_snapshot_output output = cmd_ctx->lsm.u.snapshot_record.output;
ret = cmd_snapshot_record(cmd_ctx->session,
&output, 0); // RFC: set to zero since it's ignored by cmd_snapshot_record
break;
}
- case LTTNG_CREATE_SESSION_EXT:
+ case LTTCOMM_SESSIOND_COMMAND_CREATE_SESSION_EXT:
{
struct lttng_dynamic_buffer payload;
struct lttng_session_descriptor *return_descriptor = NULL;
ret = LTTNG_OK;
break;
}
- case LTTNG_SAVE_SESSION:
+ case LTTCOMM_SESSIOND_COMMAND_SAVE_SESSION:
{
ret = cmd_save_sessions(&cmd_ctx->lsm.u.save_session.attr,
&cmd_ctx->creds);
break;
}
- case LTTNG_SET_SESSION_SHM_PATH:
+ case LTTCOMM_SESSIOND_COMMAND_SET_SESSION_SHM_PATH:
{
ret = cmd_set_session_shm_path(cmd_ctx->session,
cmd_ctx->lsm.u.set_shm_path.shm_path);
break;
}
- case LTTNG_REGENERATE_METADATA:
+ case LTTCOMM_SESSIOND_COMMAND_REGENERATE_METADATA:
{
ret = cmd_regenerate_metadata(cmd_ctx->session);
break;
}
- case LTTNG_REGENERATE_STATEDUMP:
+ case LTTCOMM_SESSIOND_COMMAND_REGENERATE_STATEDUMP:
{
ret = cmd_regenerate_statedump(cmd_ctx->session);
break;
}
- case LTTNG_REGISTER_TRIGGER:
+ case LTTCOMM_SESSIOND_COMMAND_REGISTER_TRIGGER:
{
struct lttng_trigger *payload_trigger;
struct lttng_trigger *return_trigger;
ret = LTTNG_OK;
break;
}
- case LTTNG_UNREGISTER_TRIGGER:
+ case LTTCOMM_SESSIOND_COMMAND_UNREGISTER_TRIGGER:
{
struct lttng_trigger *payload_trigger;
const struct lttng_credentials cmd_creds = {
lttng_trigger_put(payload_trigger);
break;
}
- case LTTNG_ROTATE_SESSION:
+ case LTTCOMM_SESSIOND_COMMAND_ROTATE_SESSION:
{
struct lttng_rotate_session_return rotate_return;
ret = LTTNG_OK;
break;
}
- case LTTNG_ROTATION_GET_INFO:
+ case LTTCOMM_SESSIOND_COMMAND_ROTATION_GET_INFO:
{
struct lttng_rotation_get_info_return get_info_return;
ret = LTTNG_OK;
break;
}
- case LTTNG_ROTATION_SET_SCHEDULE:
+ case LTTCOMM_SESSIOND_COMMAND_ROTATION_SET_SCHEDULE:
{
bool set_schedule;
enum lttng_rotation_schedule_type schedule_type;
break;
}
- case LTTNG_SESSION_LIST_ROTATION_SCHEDULES:
+ case LTTCOMM_SESSIOND_COMMAND_SESSION_LIST_ROTATION_SCHEDULES:
{
lttng_session_list_schedules_return schedules;
ret = LTTNG_OK;
break;
}
- case LTTNG_CLEAR_SESSION:
+ case LTTCOMM_SESSIOND_COMMAND_CLEAR_SESSION:
{
ret = cmd_clear_session(cmd_ctx->session, sock);
break;
}
- case LTTNG_LIST_TRIGGERS:
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRIGGERS:
{
struct lttng_triggers *return_triggers = NULL;
size_t original_payload_size;
ret = LTTNG_OK;
break;
}
- case LTTNG_EXECUTE_ERROR_QUERY:
+ case LTTCOMM_SESSIOND_COMMAND_EXECUTE_ERROR_QUERY:
{
struct lttng_error_query *query;
const struct lttng_credentials cmd_creds = {
struct lttcomm_session_destroy_command_header cmd_header;
struct lttng_trace_archive_location *location = NULL;
struct lttcomm_lttng_msg llm = {
- .cmd_type = LTTNG_DESTROY_SESSION,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_DESTROY_SESSION,
.ret_code = reply_context->destruction_status,
.pid = UINT32_MAX,
.cmd_header_size =
#endif
enum lttcomm_sessiond_command {
- LTTCOMM_SESSIOND_COMMAND_MIN = -1,
- /* Tracer command */
- LTTNG_ADD_CONTEXT = 0,
- /* LTTNG_CALIBRATE used to be here */
- LTTNG_DISABLE_CHANNEL = 2,
- LTTNG_DISABLE_EVENT = 3,
- LTTNG_LIST_SYSCALLS = 4,
- LTTNG_ENABLE_CHANNEL = 5,
- LTTNG_ENABLE_EVENT = 6,
- /* 7 */
- /* Session daemon command */
- /* 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 = 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,
- LTTNG_EXECUTE_ERROR_QUERY = 52,
+ LTTCOMM_SESSIOND_COMMAND_MIN,
+ LTTCOMM_SESSIOND_COMMAND_ADD_CONTEXT,
+ LTTCOMM_SESSIOND_COMMAND_DISABLE_CHANNEL,
+ LTTCOMM_SESSIOND_COMMAND_DISABLE_EVENT,
+ LTTCOMM_SESSIOND_COMMAND_LIST_SYSCALLS,
+ LTTCOMM_SESSIOND_COMMAND_ENABLE_CHANNEL,
+ LTTCOMM_SESSIOND_COMMAND_ENABLE_EVENT,
+ LTTCOMM_SESSIOND_COMMAND_DESTROY_SESSION,
+ LTTCOMM_SESSIOND_COMMAND_LIST_CHANNELS,
+ LTTCOMM_SESSIOND_COMMAND_LIST_DOMAINS,
+ LTTCOMM_SESSIOND_COMMAND_LIST_EVENTS,
+ LTTCOMM_SESSIOND_COMMAND_LIST_SESSIONS,
+ LTTCOMM_SESSIOND_COMMAND_LIST_TRACEPOINTS,
+ LTTCOMM_SESSIOND_COMMAND_REGISTER_CONSUMER,
+ LTTCOMM_SESSIOND_COMMAND_START_TRACE,
+ LTTCOMM_SESSIOND_COMMAND_STOP_TRACE,
+ LTTCOMM_SESSIOND_COMMAND_LIST_TRACEPOINT_FIELDS,
+ LTTCOMM_SESSIOND_COMMAND_DISABLE_CONSUMER,
+ LTTCOMM_SESSIOND_COMMAND_ENABLE_CONSUMER,
+ LTTCOMM_SESSIOND_COMMAND_SET_CONSUMER_URI,
+ LTTCOMM_SESSIOND_COMMAND_DATA_PENDING,
+ LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_ADD_OUTPUT,
+ LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_DEL_OUTPUT,
+ LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_LIST_OUTPUT,
+ LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_RECORD,
+ LTTCOMM_SESSIOND_COMMAND_SAVE_SESSION,
+ LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_ADD_INCLUDE_VALUE,
+ LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_REMOVE_INCLUDE_VALUE,
+ LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_GET_POLICY,
+ LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_SET_POLICY,
+ LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET,
+ LTTCOMM_SESSIOND_COMMAND_SET_SESSION_SHM_PATH,
+ LTTCOMM_SESSIOND_COMMAND_REGENERATE_METADATA,
+ LTTCOMM_SESSIOND_COMMAND_REGENERATE_STATEDUMP,
+ LTTCOMM_SESSIOND_COMMAND_REGISTER_TRIGGER,
+ LTTCOMM_SESSIOND_COMMAND_UNREGISTER_TRIGGER,
+ LTTCOMM_SESSIOND_COMMAND_ROTATE_SESSION,
+ LTTCOMM_SESSIOND_COMMAND_ROTATION_GET_INFO,
+ LTTCOMM_SESSIOND_COMMAND_ROTATION_SET_SCHEDULE,
+ LTTCOMM_SESSIOND_COMMAND_SESSION_LIST_ROTATION_SCHEDULES,
+ LTTCOMM_SESSIOND_COMMAND_CREATE_SESSION_EXT,
+ LTTCOMM_SESSIOND_COMMAND_CLEAR_SESSION,
+ LTTCOMM_SESSIOND_COMMAND_LIST_TRIGGERS,
+ LTTCOMM_SESSIOND_COMMAND_EXECUTE_ERROR_QUERY,
LTTCOMM_SESSIOND_COMMAND_MAX,
};
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";
- case LTTNG_EXECUTE_ERROR_QUERY:
- return "LTTNG_EXECUTE_ERROR_QUERY";
+ case LTTCOMM_SESSIOND_COMMAND_ADD_CONTEXT:
+ return "ADD_CONTEXT";
+ case LTTCOMM_SESSIOND_COMMAND_DISABLE_CHANNEL:
+ return "DISABLE_CHANNEL";
+ case LTTCOMM_SESSIOND_COMMAND_DISABLE_EVENT:
+ return "DISABLE_EVENT";
+ case LTTCOMM_SESSIOND_COMMAND_LIST_SYSCALLS:
+ return "LIST_SYSCALLS";
+ case LTTCOMM_SESSIOND_COMMAND_ENABLE_CHANNEL:
+ return "ENABLE_CHANNEL";
+ case LTTCOMM_SESSIOND_COMMAND_ENABLE_EVENT:
+ return "ENABLE_EVENT";
+ case LTTCOMM_SESSIOND_COMMAND_DESTROY_SESSION:
+ return "DESTROY_SESSION";
+ case LTTCOMM_SESSIOND_COMMAND_LIST_CHANNELS:
+ return "LIST_CHANNELS";
+ case LTTCOMM_SESSIOND_COMMAND_LIST_DOMAINS:
+ return "LIST_DOMAINS";
+ case LTTCOMM_SESSIOND_COMMAND_LIST_EVENTS:
+ return "LIST_EVENTS";
+ case LTTCOMM_SESSIOND_COMMAND_LIST_SESSIONS:
+ return "LIST_SESSIONS";
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRACEPOINTS:
+ return "LIST_TRACEPOINTS";
+ case LTTCOMM_SESSIOND_COMMAND_REGISTER_CONSUMER:
+ return "REGISTER_CONSUMER";
+ case LTTCOMM_SESSIOND_COMMAND_START_TRACE:
+ return "START_TRACE";
+ case LTTCOMM_SESSIOND_COMMAND_STOP_TRACE:
+ return "STOP_TRACE";
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRACEPOINT_FIELDS:
+ return "LIST_TRACEPOINT_FIELDS";
+ case LTTCOMM_SESSIOND_COMMAND_DISABLE_CONSUMER:
+ return "DISABLE_CONSUMER";
+ case LTTCOMM_SESSIOND_COMMAND_ENABLE_CONSUMER:
+ return "ENABLE_CONSUMER";
+ case LTTCOMM_SESSIOND_COMMAND_SET_CONSUMER_URI:
+ return "SET_CONSUMER_URI";
+ case LTTCOMM_SESSIOND_COMMAND_DATA_PENDING:
+ return "DATA_PENDING";
+ case LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_ADD_OUTPUT:
+ return "SNAPSHOT_ADD_OUTPUT";
+ case LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_DEL_OUTPUT:
+ return "SNAPSHOT_DEL_OUTPUT";
+ case LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_LIST_OUTPUT:
+ return "SNAPSHOT_LIST_OUTPUT";
+ case LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_RECORD:
+ return "SNAPSHOT_RECORD";
+ case LTTCOMM_SESSIOND_COMMAND_SAVE_SESSION:
+ return "SAVE_SESSION";
+ case LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_ADD_INCLUDE_VALUE:
+ return "PROCESS_ATTR_TRACKER_ADD_INCLUDE_VALUE";
+ case LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_REMOVE_INCLUDE_VALUE:
+ return "PROCESS_ATTR_TRACKER_REMOVE_INCLUDE_VALUE";
+ case LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_GET_POLICY:
+ return "PROCESS_ATTR_TRACKER_GET_POLICY";
+ case LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_SET_POLICY:
+ return "PROCESS_ATTR_TRACKER_SET_POLICY";
+ case LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET:
+ return "PROCESS_ATTR_TRACKER_GET_INCLUSION_SET";
+ case LTTCOMM_SESSIOND_COMMAND_SET_SESSION_SHM_PATH:
+ return "SET_SESSION_SHM_PATH";
+ case LTTCOMM_SESSIOND_COMMAND_REGENERATE_METADATA:
+ return "REGENERATE_METADATA";
+ case LTTCOMM_SESSIOND_COMMAND_REGENERATE_STATEDUMP:
+ return "REGENERATE_STATEDUMP";
+ case LTTCOMM_SESSIOND_COMMAND_REGISTER_TRIGGER:
+ return "REGISTER_TRIGGER";
+ case LTTCOMM_SESSIOND_COMMAND_UNREGISTER_TRIGGER:
+ return "UNREGISTER_TRIGGER";
+ case LTTCOMM_SESSIOND_COMMAND_ROTATE_SESSION:
+ return "ROTATE_SESSION";
+ case LTTCOMM_SESSIOND_COMMAND_ROTATION_GET_INFO:
+ return "ROTATION_GET_INFO";
+ case LTTCOMM_SESSIOND_COMMAND_ROTATION_SET_SCHEDULE:
+ return "ROTATION_SET_SCHEDULE";
+ case LTTCOMM_SESSIOND_COMMAND_SESSION_LIST_ROTATION_SCHEDULES:
+ return "SESSION_LIST_ROTATION_SCHEDULES";
+ case LTTCOMM_SESSIOND_COMMAND_CREATE_SESSION_EXT:
+ return "CREATE_SESSION_EXT";
+ case LTTCOMM_SESSIOND_COMMAND_CLEAR_SESSION:
+ return "CLEAR_SESSION";
+ case LTTCOMM_SESSIOND_COMMAND_LIST_TRIGGERS:
+ return "LIST_TRIGGERS";
+ case LTTCOMM_SESSIOND_COMMAND_EXECUTE_ERROR_QUERY:
+ return "EXECUTE_ERROR_QUERY";
default:
abort();
}
} LTTNG_PACKED;
/*
- * Command header of the reply to an LTTNG_DESTROY_SESSION command.
+ * Command header of the reply to an LTTCOMM_SESSIOND_COMMAND_DESTROY_SESSION command.
*/
struct lttcomm_session_destroy_command_header {
/* enum lttng_session */
enum lttng_error_code ret_code = LTTNG_OK;
struct lttng_clear_handle *handle = NULL;
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_CLEAR_SESSION,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_CLEAR_SESSION,
.session = {},
.domain = {},
.u = {},
ssize_t comm_ret;
enum lttng_error_code ret_code = LTTNG_OK;
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_DESTROY_SESSION,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_DESTROY_SESSION,
.session = {},
.domain = {},
.u = {},
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_REGISTER_CONSUMER;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_REGISTER_CONSUMER;
ret = lttng_strncpy(lsm.session.name, handle->session_name,
sizeof(lsm.session.name));
if (ret) {
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_START_TRACE;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_START_TRACE;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_STOP_TRACE;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_STOP_TRACE;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
{
int ret;
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_ADD_CONTEXT,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_ADD_CONTEXT,
.session = {},
.domain = {},
.u = {},
int exclusion_count, char **exclusion_list)
{
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_ENABLE_EVENT,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_ENABLE_EVENT,
.session = {},
.domain = {},
.u = {},
const char *original_filter_expression)
{
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_DISABLE_EVENT,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_DISABLE_EVENT,
.session = {},
.domain = {},
.u = {},
/* Prepare the payload */
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_ENABLE_CHANNEL;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_ENABLE_CHANNEL;
COPY_DOMAIN_PACKED(lsm.domain, handle->domain);
ret = lttng_strncpy(lsm.session.name, handle->session_name,
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_DISABLE_CHANNEL;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_DISABLE_CHANNEL;
ret = lttng_strncpy(lsm.u.disable.channel_name, name,
sizeof(lsm.u.disable.channel_name));
int ret, total_payload_received;
char *reception_buffer = NULL;
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_LIST_TRACEPOINTS,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_LIST_TRACEPOINTS,
.session = {},
.domain = {},
.u = {},
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_LIST_TRACEPOINT_FIELDS;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_LIST_TRACEPOINT_FIELDS;
COPY_DOMAIN_PACKED(lsm.domain, handle->domain);
{
goto end;
}
- lsm.cmd_type = LTTNG_LIST_SYSCALLS;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_LIST_SYSCALLS;
/* Force kernel domain for system calls. */
lsm.domain.type = LTTNG_DOMAIN_KERNEL;
{
enum lttng_error_code ret_code;
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_CREATE_SESSION_EXT,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_CREATE_SESSION_EXT,
.session = {},
.domain = {},
.u = {},
struct lttng_session *sessions = NULL;
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_LIST_SESSIONS;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_LIST_SESSIONS;
/*
* Initialize out_sessions to NULL so it is initialized when
* lttng_list_sessions returns 0, thus allowing *out_sessions to
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_SET_SESSION_SHM_PATH;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_SET_SESSION_SHM_PATH;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_LIST_DOMAINS;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_LIST_DOMAINS;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_LIST_CHANNELS;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_LIST_CHANNELS;
ret = lttng_strncpy(lsm.session.name, handle->session_name,
sizeof(lsm.session.name));
if (ret) {
}
/* Initialize command parameters. */
- lsm.cmd_type = LTTNG_LIST_EVENTS;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_LIST_EVENTS;
ret = lttng_strncpy(lsm.session.name, handle->session_name,
sizeof(lsm.session.name));
if (ret) {
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_SET_CONSUMER_URI;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_SET_CONSUMER_URI;
ret = lttng_strncpy(lsm.session.name, handle->session_name,
sizeof(lsm.session.name));
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_DATA_PENDING;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_DATA_PENDING;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_REGENERATE_METADATA;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_REGENERATE_METADATA;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_REGENERATE_STATEDUMP;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_REGENERATE_STATEDUMP;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
{
int ret;
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_REGISTER_TRIGGER,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_REGISTER_TRIGGER,
.session = {},
.domain = {},
.u = {},
int ret;
enum lttng_error_code ret_code;
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_EXECUTE_ERROR_QUERY,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_EXECUTE_ERROR_QUERY,
.session = {},
.domain = {},
.u = {},
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_UNREGISTER_TRIGGER;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_UNREGISTER_TRIGGER;
ret = lttng_dynamic_buffer_append(&message.buffer, &lsm, sizeof(lsm));
if (ret) {
int ret;
enum lttng_error_code ret_code = LTTNG_OK;
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_LIST_TRIGGERS,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_LIST_TRIGGERS,
.session = {},
.domain = {},
.u = {},
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_ROTATION_GET_INFO;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_ROTATION_GET_INFO;
lsm.u.get_rotation_info.rotation_id = rotation_handle->rotation_id;
ret = lttng_strncpy(lsm.session.name, rotation_handle->session_name,
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_ROTATE_SESSION;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_ROTATE_SESSION;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_ROTATION_SET_SCHEDULE;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_ROTATION_SET_SCHEDULE;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
/* Source length already validated. */
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_SESSION_LIST_ROTATION_SCHEDULES;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_SESSION_LIST_ROTATION_SCHEDULES;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
if (ret) {
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_SAVE_SESSION;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_SAVE_SESSION;
memcpy(&lsm.u.save_session.attr, attr,
sizeof(struct lttng_save_session_attr));
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_SNAPSHOT_ADD_OUTPUT;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_ADD_OUTPUT;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_SNAPSHOT_DEL_OUTPUT;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_DEL_OUTPUT;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_SNAPSHOT_LIST_OUTPUT;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_LIST_OUTPUT;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
}
memset(&lsm, 0, sizeof(lsm));
- lsm.cmd_type = LTTNG_SNAPSHOT_RECORD;
+ lsm.cmd_type = LTTCOMM_SESSIOND_COMMAND_SNAPSHOT_RECORD;
ret = lttng_strncpy(lsm.session.name, session_name,
sizeof(lsm.session.name));
enum lttng_process_attr_tracker_handle_status status =
LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_OK;
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_GET_POLICY,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_GET_POLICY,
.session = {},
.domain = {},
.u = {},
enum lttng_process_attr_tracker_handle_status status =
LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_OK;
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_SET_POLICY,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_SET_POLICY,
.session = {},
.domain = {},
.u = {},
enum lttng_process_attr_tracker_handle_status status = \
LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_OK; \
struct lttcomm_session_msg lsm = { \
- .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_##command_upper##_INCLUDE_VALUE, \
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_##command_upper##_INCLUDE_VALUE, \
.session = {}, \
.domain = {}, \
.u = {}, \
enum lttng_process_attr_tracker_handle_status status = \
LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_OK; \
struct lttcomm_session_msg lsm = { \
- .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_##command_upper##_INCLUDE_VALUE, \
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_##command_upper##_INCLUDE_VALUE, \
.session = {}, \
.domain = {}, \
.u = {}, \
enum lttng_process_attr_tracker_handle_status status =
LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_OK;
struct lttcomm_session_msg lsm = {
- .cmd_type = LTTNG_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET,
+ .cmd_type = LTTCOMM_SESSIOND_COMMAND_PROCESS_ATTR_TRACKER_GET_INCLUSION_SET,
.session = {},
.domain = {},
.u = {},