29f9e3316ba4fa6d5fbd93167c13639913e914ae
[lttng-tools.git] / include / lttng / event-rule / syscall-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_SYSCALL_INTERNAL_H
9 #define LTTNG_EVENT_RULE_SYSCALL_INTERNAL_H
10
11 #include <common/payload-view.h>
12 #include <common/macros.h>
13 #include <lttng/event-rule/event-rule-internal.h>
14 #include <lttng/event-rule/syscall.h>
15
16 struct lttng_event_rule_syscall {
17 struct lttng_event_rule parent;
18 enum lttng_event_rule_syscall_emission_site emission_site;
19 char *pattern;
20 char *filter_expression;
21
22 /* Internal use only. */
23 struct {
24 char *filter;
25 struct lttng_bytecode *bytecode;
26 } internal_filter;
27 };
28
29 struct lttng_event_rule_syscall_comm {
30 uint32_t emission_site;
31 /* Includes terminator `\0`. */
32 uint32_t pattern_len;
33 /* Includes terminator `\0`. */
34 uint32_t filter_expression_len;
35 /*
36 * Payload is composed of, in that order:
37 * - Pattern (null terminated),
38 * - Filter expression (null terminated).
39 */
40 char payload[];
41 } LTTNG_PACKED;
42
43 LTTNG_HIDDEN
44 ssize_t lttng_event_rule_syscall_create_from_payload(
45 struct lttng_payload_view *view,
46 struct lttng_event_rule **rule);
47
48 LTTNG_HIDDEN
49 const char *lttng_event_rule_syscall_emission_site_str(
50 enum lttng_event_rule_syscall_emission_site emission_site);
51 #endif /* LTTNG_EVENT_RULE_SYSCALL_INTERNAL_H */
This page took 0.035223 seconds and 3 git commands to generate.