X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Fsessiond-comm.h;h=735fa023c5470ce7e349985e4ba9491983ef79bb;hp=6fc65a103167b8a5db13fa99dcc24b1820906fb9;hb=refs%2Fheads%2Fsow-2019-0002-rev1;hpb=ecd1a12fac39784bded85c0f06e47ace2dc98cde diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.h index 6fc65a103..735fa023c 100644 --- a/src/common/sessiond-comm/sessiond-comm.h +++ b/src/common/sessiond-comm/sessiond-comm.h @@ -1,20 +1,10 @@ /* - * Copyright (C) 2011 - David Goulet - * Julien Desfossez - * Mathieu Desnoyers + * Copyright (C) 2011 David Goulet + * Copyright (C) 2011 Julien Desfossez + * Copyright (C) 2011 Mathieu Desnoyers * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-only * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* @@ -35,7 +25,7 @@ #include #include #include -#include +#include #include #include @@ -95,9 +85,9 @@ enum lttcomm_sessiond_command { /* 29 */ /* 30 */ LTTNG_SAVE_SESSION = 31, - LTTNG_TRACK_PID = 32, - LTTNG_UNTRACK_PID = 33, - LTTNG_LIST_TRACKER_PIDS = 34, + LTTNG_TRACK_ID = 32, + LTTNG_UNTRACK_ID = 33, + LTTNG_LIST_TRACKER_IDS = 34, LTTNG_SET_SESSION_SHM_PATH = 40, LTTNG_REGENERATE_METADATA = 41, LTTNG_REGENERATE_STATEDUMP = 42, @@ -107,7 +97,9 @@ enum lttcomm_sessiond_command { LTTNG_ROTATION_GET_INFO = 46, LTTNG_ROTATION_SET_SCHEDULE = 47, LTTNG_SESSION_LIST_ROTATION_SCHEDULES = 48, - LTTNG_CREATE_SESSION_EXT = 49 + LTTNG_CREATE_SESSION_EXT = 49, + LTTNG_CLEAR_SESSION = 50, + LTTNG_LIST_TRIGGERS = 51, }; enum lttcomm_relayd_command { @@ -139,6 +131,10 @@ enum lttcomm_relayd_command { 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. */ }; /* @@ -181,6 +177,7 @@ enum lttcomm_return_code { LTTCOMM_CONSUMERD_TRACE_CHUNK_EXISTS_LOCAL, /* Trace chunk exists on consumer daemon. */ LTTCOMM_CONSUMERD_TRACE_CHUNK_EXISTS_REMOTE,/* Trace chunk exists on relay daemon. */ LTTCOMM_CONSUMERD_UNKNOWN_TRACE_CHUNK, /* Unknown trace chunk. */ + LTTCOMM_CONSUMERD_RELAYD_CLEAR_DISALLOWED, /* Relayd does not accept clear command. */ /* MUST be last element */ LTTCOMM_NR, /* Last element */ @@ -348,8 +345,21 @@ struct lttcomm_session_msg { char shm_path[PATH_MAX]; } LTTNG_PACKED set_shm_path; struct { - uint32_t pid; - } LTTNG_PACKED pid_tracker; + uint32_t tracker_type; /* enum lttng_tracker_type */ + uint32_t id_type; /* enum lttng_tracker_id_type */ + union { + int32_t value; + uint32_t var_len; + } u; + /* + * for LTTNG_ID_STRING, followed by a variable length + * zero-terminated string of length "var_len", which + * includes the final \0. + */ + } LTTNG_PACKED id_tracker; + struct { + uint32_t tracker_type; /* enum lttng_tracker_type */ + } LTTNG_PACKED id_tracker_list; struct { uint32_t length; } LTTNG_PACKED trigger; @@ -453,6 +463,21 @@ struct lttcomm_session_destroy_command_header { int32_t rotation_state; }; +/* + * tracker command header. + */ +struct lttcomm_tracker_command_header { + uint32_t nb_tracker_id; +} LTTNG_PACKED; + +struct lttcomm_tracker_id_header { + uint32_t type; /* enum lttng_tracker_id_type */ + union { + int32_t value; + uint32_t var_data_len; + } u; +} LTTNG_PACKED; + /* * Data structure for the response from sessiond to the lttng client. */ @@ -543,7 +568,7 @@ struct lttcomm_consumer_msg { uint64_t key; /* Unique channel key. */ /* ID of the session's current trace chunk. */ LTTNG_OPTIONAL_COMM(uint64_t) LTTNG_PACKED chunk_id; - unsigned char uuid[UUID_LEN]; /* uuid for ust tracer. */ + unsigned char uuid[LTTNG_UUID_LEN]; /* uuid for ust tracer. */ uint32_t chan_id; /* Channel ID on the tracer side. */ uint64_t tracefile_size; /* bytes */ uint32_t tracefile_count; /* number of tracefiles */ @@ -660,6 +685,9 @@ struct lttcomm_consumer_msg { struct { lttng_uuid sessiond_uuid; } LTTNG_PACKED init; + struct { + uint64_t key; + } LTTNG_PACKED clear_channel; } u; } LTTNG_PACKED; @@ -693,14 +721,14 @@ struct lttcomm_consumer_status_channel { unsigned int stream_count; } LTTNG_PACKED; -#ifdef HAVE_LIBLTTNG_UST_CTL - struct lttcomm_consumer_close_trace_chunk_reply { enum lttcomm_return_code ret_code; uint32_t path_length; char path[]; }; +#ifdef HAVE_LIBLTTNG_UST_CTL + #include /*