3e5e0991d64cf498b3f77afb53bf4b6466b29a4d
[lttng-tools.git] / include / lttng / event-rule / kernel-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_KERNEL_SYSCALL_INTERNAL_H
9 #define LTTNG_EVENT_RULE_KERNEL_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/kernel-syscall.h>
15
16 #if defined(__cplusplus)
17 extern "C" {
18 #endif
19
20 struct lttng_event_rule_kernel_syscall {
21 struct lttng_event_rule parent;
22 enum lttng_event_rule_kernel_syscall_emission_site emission_site;
23 char *pattern;
24 char *filter_expression;
25
26 /* Internal use only. */
27 struct {
28 char *filter;
29 struct lttng_bytecode *bytecode;
30 } internal_filter;
31 };
32
33 struct lttng_event_rule_kernel_syscall_comm {
34 uint32_t emission_site;
35 /* Includes terminator `\0`. */
36 uint32_t pattern_len;
37 /* Includes terminator `\0`. */
38 uint32_t filter_expression_len;
39 /*
40 * Payload is composed of, in that order:
41 * - Pattern (null terminated),
42 * - Filter expression (null terminated).
43 */
44 char payload[];
45 } LTTNG_PACKED;
46
47 ssize_t lttng_event_rule_kernel_syscall_create_from_payload(
48 struct lttng_payload_view *view,
49 struct lttng_event_rule **rule);
50
51 const char *lttng_event_rule_kernel_syscall_emission_site_str(
52 enum lttng_event_rule_kernel_syscall_emission_site emission_site);
53
54 #if defined(__cplusplus)
55 }
56 #endif
57
58 #endif /* LTTNG_EVENT_RULE_KERNEL_SYSCALL_INTERNAL_H */
This page took 0.030814 seconds and 3 git commands to generate.