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
14 #include <common/compiler.hpp>
15 #include <common/macros.hpp>
16 #include <lttng/lttng.h>
19 * Command value passed in the header.
21 enum lttcomm_agent_command {
24 AGENT_CMD_DISABLE = 3,
25 AGENT_CMD_REG_DONE = 4, /* End registration process. */
26 AGENT_CMD_APP_CTX_ENABLE = 5,
27 AGENT_CMD_APP_CTX_DISABLE = 6,
31 * Return codes from the agent.
33 enum lttcomm_agent_ret_code {
34 /* Success, assumed to be the first entry */
35 AGENT_RET_CODE_SUCCESS = 1,
37 AGENT_RET_CODE_INVALID = 2,
38 /* Unknown logger name */
39 AGENT_RET_CODE_UNKNOWN_NAME = 3,
44 * Agent application communication header.
46 struct lttcomm_agent_hdr {
47 uint64_t data_size; /* data size following this header */
48 uint32_t cmd; /* Enum of agent command. */
49 uint32_t cmd_version; /* command version */
53 * Enable event command payload. Will be immediately followed by the
54 * variable-length string representing the filter expression.
56 struct lttcomm_agent_enable_event {
57 uint32_t loglevel_value;
58 uint32_t loglevel_type;
59 char name[LTTNG_SYMBOL_NAME_LEN];
60 uint32_t filter_expression_length;
64 * Disable event command payload.
66 struct lttcomm_agent_disable_event {
67 char name[LTTNG_SYMBOL_NAME_LEN];
71 * Generic reply coming from the agent.
73 struct lttcomm_agent_generic_reply {
78 * List command reply header.
80 struct lttcomm_agent_list_reply_hdr {
86 * List command reply payload coming from the agent.
88 struct lttcomm_agent_list_reply {
90 /* List of event name each of them ending by a NULL byte. */
91 char payload[LTTNG_FLEXIBLE_ARRAY_MEMBER_LENGTH];
94 #endif /* AGENT_COMM */