Clean-up: run format-cpp on the tree
[lttng-tools.git] / include / lttng / event-rule / user-tracepoint-internal.hpp
CommitLineData
0a23a07d
JR
1/*
2 * Copyright (C) 2021 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8#ifndef LTTNG_EVENT_RULE_USER_TRACEPOINT_INTERNAL_H
9#define LTTNG_EVENT_RULE_USER_TRACEPOINT_INTERNAL_H
10
c9e313bc
SM
11#include <common/macros.hpp>
12#include <common/optional.hpp>
28f23191
JG
13#include <common/payload-view.hpp>
14
0a23a07d 15#include <lttng/domain.h>
c9e313bc 16#include <lttng/event-rule/event-rule-internal.hpp>
0a23a07d
JR
17#include <lttng/event-rule/user-tracepoint.h>
18#include <lttng/event.h>
c9e313bc 19#include <lttng/log-level-rule-internal.hpp>
0a23a07d
JR
20
21struct lttng_event_rule_user_tracepoint {
22 struct lttng_event_rule parent;
23
24 /* Name pattern. */
25 char *pattern;
26
27 /* Filter. */
28 char *filter_expression;
29
30 /* Log level. */
31 struct lttng_log_level_rule *log_level_rule;
32
33 /* Exclusions. */
34 struct lttng_dynamic_pointer_array exclusions;
35
36 /* internal use only. */
37 struct {
38 char *filter;
39 struct lttng_bytecode *bytecode;
40 } internal_filter;
41};
42
43struct lttng_event_rule_user_tracepoint_comm {
44 /* Includes terminator `\0`. */
45 uint32_t pattern_len;
46 /* Includes terminator `\0`. */
47 uint32_t filter_expression_len;
48 /* enum lttng_log_level_rule_comm + payload if any */
49 uint32_t log_level_rule_len;
50 uint32_t exclusions_count;
51 uint32_t exclusions_len;
52 /*
53 * Payload is composed of, in that order:
54 * - pattern (null terminated),
55 * - filter expression (null terminated),
56 * - log level rule serialized object,
57 * - exclusions (32 bit length + null terminated string).
58 */
59 char payload[];
60} LTTNG_PACKED;
61
28f23191
JG
62ssize_t lttng_event_rule_user_tracepoint_create_from_payload(struct lttng_payload_view *view,
63 struct lttng_event_rule **rule);
0a23a07d
JR
64
65#endif /* LTTNG_EVENT_RULE_USER_TRACEPOINT_INTERNAL_H */
This page took 0.037027 seconds and 4 git commands to generate.