SoW-2019-0007-2: Dynamic Snapshot: Triggers send partial event payload with notifications
[lttng-tools.git] / include / lttng / event-rule / tracepoint-internal.h
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_TRACEPOINT_INTERNAL_H
9 #define LTTNG_EVENT_RULE_TRACEPOINT_INTERNAL_H
10
11 #include <common/buffer-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>
17
18 struct lttng_event_rule_tracepoint {
19 struct lttng_event_rule parent;
20
21 /* Domain */
22 enum lttng_domain_type domain;
23
24 /* Name pattern */
25 char *pattern;
26
27 /* Filter */
28 char *filter_expression;
29
30 /* Loglevel */
31 struct {
32 enum lttng_loglevel_type type;
33 int value;
34 } loglevel;
35
36 /* Exclusions */
37
38 struct {
39 char **values;
40 unsigned int count;
41 } exclusions;
42
43 /* internal use only */
44 struct {
45 char *filter;
46 struct lttng_bytecode *bytecode;
47 } internal_filter;
48 };
49
50 struct lttng_event_rule_tracepoint_comm {
51 /* enum lttng_domain_type */
52 int8_t domain_type;
53 /* enum lttng_event_logleven_type */
54 int8_t loglevel_type;
55 int32_t loglevel_value;
56 uint32_t pattern_len;
57 uint32_t filter_expression_len;
58 uint32_t exclusions_count;
59 uint32_t exclusions_len;
60 /*
61 * pattern, filter expression and exclusions each terminating with '\0'
62 */
63 char payload[];
64 } LTTNG_PACKED;
65
66 LTTNG_HIDDEN
67 ssize_t lttng_event_rule_tracepoint_create_from_buffer(
68 const struct lttng_buffer_view *view,
69 struct lttng_event_rule **rule);
70
71 #endif /* LTTNG_EVENT_RULE_TRACEPOINT_INTERNAL_H */
This page took 0.036438 seconds and 5 git commands to generate.