2 * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
3 * Copyright (C) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 * SPDX-License-Identifier: GPL-2.0-only
12 #include <common/compiler.hpp>
13 #include <common/macros.hpp>
15 #include <lttng/lttng.h>
20 * Command value passed in the header.
22 enum lttcomm_agent_command {
25 AGENT_CMD_DISABLE = 3,
26 AGENT_CMD_REG_DONE = 4, /* End registration process. */
27 AGENT_CMD_APP_CTX_ENABLE = 5,
28 AGENT_CMD_APP_CTX_DISABLE = 6,
32 * Return codes from the agent.
34 enum lttcomm_agent_ret_code {
35 /* Success, assumed to be the first entry */
36 AGENT_RET_CODE_SUCCESS = 1,
38 AGENT_RET_CODE_INVALID = 2,
39 /* Unknown logger name */
40 AGENT_RET_CODE_UNKNOWN_NAME = 3,
45 * Agent application communication header.
47 struct lttcomm_agent_hdr {
48 uint64_t data_size; /* data size following this header */
49 uint32_t cmd; /* Enum of agent command. */
50 uint32_t cmd_version; /* command version */
54 * Enable event command payload. Will be immediately followed by the
55 * variable-length string representing the filter expression.
57 struct lttcomm_agent_enable_event {
58 uint32_t loglevel_value;
59 uint32_t loglevel_type;
60 char name[LTTNG_SYMBOL_NAME_LEN];
61 uint32_t filter_expression_length;
65 * Disable event command payload.
67 struct lttcomm_agent_disable_event {
68 char name[LTTNG_SYMBOL_NAME_LEN];
72 * Generic reply coming from the agent.
74 struct lttcomm_agent_generic_reply {
79 * List command reply header.
81 struct lttcomm_agent_list_reply_hdr {
87 * List command reply payload coming from the agent.
89 struct lttcomm_agent_list_reply {
91 /* List of event name each of them ending by a NULL byte. */
92 char payload[LTTNG_FLEXIBLE_ARRAY_MEMBER_LENGTH];
95 #endif /* AGENT_COMM */