2 * Copyright (C) 2019 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_EVENT_RULE_TRACEPOINT_INTERNAL_H
9 #define LTTNG_EVENT_RULE_TRACEPOINT_INTERNAL_H
11 #include <common/payload-view.h>
12 #include <common/macros.h>
13 #include <lttng/domain.h>
14 #include <lttng/event-rule/event-rule-internal.h>
15 #include <lttng/event-rule/tracepoint.h>
16 #include <lttng/event.h>
18 struct lttng_event_rule_tracepoint
{
19 struct lttng_event_rule parent
;
22 enum lttng_domain_type domain
;
28 char *filter_expression
;
32 enum lttng_loglevel_type type
;
37 struct lttng_dynamic_pointer_array exclusions
;
39 /* internal use only. */
42 struct lttng_filter_bytecode
*bytecode
;
46 struct lttng_event_rule_tracepoint_comm
{
47 /* enum lttng_domain_type. */
49 /* enum lttng_event_logleven_type. */
51 int32_t loglevel_value
;
52 /* Includes terminator `\0`. */
54 /* Includes terminator `\0`. */
55 uint32_t filter_expression_len
;
56 uint32_t exclusions_count
;
57 uint32_t exclusions_len
;
59 * Payload is composed of, in that order:
60 * - pattern (null terminated),
61 * - filter expression (null terminated),
62 * - exclusions (32 bit length + null terminated string).
68 ssize_t
lttng_event_rule_tracepoint_create_from_payload(
69 struct lttng_payload_view
*view
,
70 struct lttng_event_rule
**rule
);
72 #endif /* LTTNG_EVENT_RULE_TRACEPOINT_INTERNAL_H */