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/macros.h>
15 #include <lttng/lttng.h>
18 * Command value passed in the header.
20 enum lttcomm_agent_command
{
23 AGENT_CMD_DISABLE
= 3,
24 AGENT_CMD_REG_DONE
= 4, /* End registration process. */
25 AGENT_CMD_APP_CTX_ENABLE
= 5,
26 AGENT_CMD_APP_CTX_DISABLE
= 6,
30 * Return codes from the agent.
32 enum lttcomm_agent_ret_code
{
33 /* Success, assumed to be the first entry */
34 AGENT_RET_CODE_SUCCESS
= 1,
36 AGENT_RET_CODE_INVALID
= 2,
37 /* Unknown logger name */
38 AGENT_RET_CODE_UNKNOWN_NAME
= 3,
43 * Agent application communication header.
45 struct lttcomm_agent_hdr
{
46 uint64_t data_size
; /* data size following this header */
47 uint32_t cmd
; /* Enum of agent command. */
48 uint32_t cmd_version
; /* command version */
52 * Enable event command payload. Will be immediately followed by the
53 * variable-length string representing the filter expression.
55 struct lttcomm_agent_enable_event
{
56 uint32_t loglevel_value
;
57 uint32_t loglevel_type
;
58 char name
[LTTNG_SYMBOL_NAME_LEN
];
59 uint32_t filter_expression_length
;
63 * Disable event command payload.
65 struct lttcomm_agent_disable_event
{
66 char name
[LTTNG_SYMBOL_NAME_LEN
];
70 * Generic reply coming from the agent.
72 struct lttcomm_agent_generic_reply
{
77 * List command reply header.
79 struct lttcomm_agent_list_reply_hdr
{
85 * List command reply payload coming from the agent.
87 struct lttcomm_agent_list_reply
{
89 /* List of event name each of them ending by a NULL byte. */
93 #endif /* AGENT_COMM */