2 * Copyright (C) 2013 - David Goulet <dgoulet@efficios.com>
3 * Copyright (C) 2016 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License, version 2 only, as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 51
16 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #include <lttng/lttng.h>
27 * Command value passed in the header.
29 enum lttcomm_agent_command
{
32 AGENT_CMD_DISABLE
= 3,
33 AGENT_CMD_REG_DONE
= 4, /* End registration process. */
34 AGENT_CMD_APP_CTX_ENABLE
= 5,
35 AGENT_CMD_APP_CTX_DISABLE
= 6,
39 * Return codes from the agent.
41 enum lttcomm_agent_ret_code
{
42 /* Success, assumed to be the first entry */
43 AGENT_RET_CODE_SUCCESS
= 1,
45 AGENT_RET_CODE_INVALID
= 2,
46 /* Unknown logger name */
47 AGENT_RET_CODE_UNKNOWN_NAME
= 3,
52 * Agent application communication header.
54 struct lttcomm_agent_hdr
{
55 uint64_t data_size
; /* data size following this header */
56 uint32_t cmd
; /* Enum of agent command. */
57 uint32_t cmd_version
; /* command version */
61 * Enable event command payload. Will be immediately followed by the
62 * variable-length string representing the filter expression.
64 struct lttcomm_agent_enable_event
{
65 uint32_t loglevel_value
;
66 uint32_t loglevel_type
;
67 char name
[LTTNG_SYMBOL_NAME_LEN
];
68 uint32_t filter_expression_length
;
72 * Disable event command payload.
74 struct lttcomm_agent_disable_event
{
75 char name
[LTTNG_SYMBOL_NAME_LEN
];
79 * Generic reply coming from the agent.
81 struct lttcomm_agent_generic_reply
{
86 * List command reply header.
88 struct lttcomm_agent_list_reply_hdr
{
94 * List command reply payload coming from the agent.
96 struct lttcomm_agent_list_reply
{
98 /* List of event name each of them ending by a NULL byte. */
102 #endif /* AGENT_COMM */