Clean-up: run format-cpp on the tree
[lttng-tools.git] / include / lttng / event-rule / kernel-tracepoint-internal.hpp
1 /*
2 * Copyright (C) 2019 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8 #ifndef LTTNG_EVENT_RULE_KERNEL_TRACEPOINT_INTERNAL_H
9 #define LTTNG_EVENT_RULE_KERNEL_TRACEPOINT_INTERNAL_H
10
11 #include <common/macros.hpp>
12 #include <common/optional.hpp>
13 #include <common/payload-view.hpp>
14
15 #include <lttng/event-rule/event-rule-internal.hpp>
16 #include <lttng/event-rule/kernel-tracepoint.h>
17 #include <lttng/event.h>
18
19 struct lttng_event_rule_kernel_tracepoint {
20 struct lttng_event_rule parent;
21
22 /* Name pattern. */
23 char *pattern;
24
25 /* Filter. */
26 char *filter_expression;
27
28 /* internal use only. */
29 struct {
30 char *filter;
31 struct lttng_bytecode *bytecode;
32 } internal_filter;
33 };
34
35 struct lttng_event_rule_kernel_tracepoint_comm {
36 /* Includes terminator `\0`. */
37 uint32_t pattern_len;
38 /* Includes terminator `\0`. */
39 uint32_t filter_expression_len;
40 /*
41 * Payload is composed of, in that order:
42 * - pattern (null terminated),
43 * - filter expression (null terminated),
44 */
45 char payload[];
46 } LTTNG_PACKED;
47
48 ssize_t lttng_event_rule_kernel_tracepoint_create_from_payload(struct lttng_payload_view *view,
49 struct lttng_event_rule **rule);
50
51 #endif /* LTTNG_EVENT_RULE_KERNEL_TRACEPOINT_INTERNAL_H */
This page took 0.044355 seconds and 5 git commands to generate.