2 * Copyright (C) 2019 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_EVENT_RULE_KERNEL_TRACEPOINT_INTERNAL_H
9 #define LTTNG_EVENT_RULE_KERNEL_TRACEPOINT_INTERNAL_H
11 #include <common/payload-view.hpp>
12 #include <common/macros.hpp>
13 #include <common/optional.hpp>
14 #include <lttng/event-rule/event-rule-internal.hpp>
15 #include <lttng/event-rule/kernel-tracepoint.h>
16 #include <lttng/event.h>
18 struct lttng_event_rule_kernel_tracepoint {
19 struct lttng_event_rule parent;
25 char *filter_expression;
27 /* internal use only. */
30 struct lttng_bytecode *bytecode;
34 struct lttng_event_rule_kernel_tracepoint_comm {
35 /* Includes terminator `\0`. */
37 /* Includes terminator `\0`. */
38 uint32_t filter_expression_len;
40 * Payload is composed of, in that order:
41 * - pattern (null terminated),
42 * - filter expression (null terminated),
47 ssize_t lttng_event_rule_kernel_tracepoint_create_from_payload(
48 struct lttng_payload_view *view,
49 struct lttng_event_rule **rule);
51 #endif /* LTTNG_EVENT_RULE_KERNEL_TRACEPOINT_INTERNAL_H */