Fix: add missing JUL loglevel handling
[lttng-tools.git] / src / common / sessiond-comm / jul.h
1 /*
2 * Copyright (C) 2013 - David Goulet <dgoulet@efficios.com>
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License, version 2 only, as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 51
15 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 */
17
18 #ifndef _JUL_COMM
19 #define _JUL_COMM
20
21 #define _GNU_SOURCE
22 #include <stdint.h>
23
24 #include <lttng/lttng.h>
25
26 /*
27 * Command value pass in the header.
28 */
29 enum lttcomm_jul_command {
30 JUL_CMD_LIST = 1,
31 JUL_CMD_ENABLE = 2,
32 JUL_CMD_DISABLE = 3,
33 };
34
35 /*
36 * Return code from the Java agent.
37 */
38 enum lttcomm_jul_ret_code {
39 JUL_RET_CODE_SUCCESS = 1,
40 JUL_RET_CODE_INVALID = 2,
41 JUL_RET_CODE_UNKNOWN_NAME = 3,
42 };
43
44 /*
45 * JUL application communication header.
46 */
47 struct lttcomm_jul_hdr {
48 uint64_t data_size; /* data size following this header */
49 uint32_t cmd; /* Enum of JUL command. */
50 uint32_t cmd_version; /* command version */
51 } LTTNG_PACKED;
52
53 /*
54 * Enable event command payload.
55 */
56 struct lttcomm_jul_enable {
57 uint32_t loglevel;
58 uint32_t loglevel_type;
59 char name[LTTNG_SYMBOL_NAME_LEN];
60 } LTTNG_PACKED;
61
62 /*
63 * Disable event command payload.
64 */
65 struct lttcomm_jul_disable {
66 char name[LTTNG_SYMBOL_NAME_LEN];
67 } LTTNG_PACKED;
68
69 /*
70 * Generic reply coming from the Java Agent.
71 */
72 struct lttcomm_jul_generic_reply {
73 uint32_t ret_code;
74 } LTTNG_PACKED;
75
76 /*
77 * List command reply header.
78 */
79 struct lttcomm_jul_list_reply_hdr {
80 uint32_t ret_code;
81 uint32_t data_size;
82 } LTTNG_PACKED;
83
84 /*
85 * List command reply payload coming from the Java Agent.
86 */
87 struct lttcomm_jul_list_reply {
88 uint32_t nb_event;
89 /* List of event name each of them ending by a NULL byte. */
90 char payload[];
91 } LTTNG_PACKED;
92
93 #endif /* _JUL_COMM */
This page took 0.030431 seconds and 4 git commands to generate.