Commit | Line | Data |
---|---|---|
077192fd JR |
1 | /* |
2 | * Copyright (C) 2019 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> | |
3 | * | |
4 | * SPDX-License-Identifier: LGPL-2.1-only | |
5 | * | |
6 | */ | |
7 | ||
f2791161 JR |
8 | #ifndef LTTNG_EVENT_RULE_KERNEL_PROBE_INTERNAL_H |
9 | #define LTTNG_EVENT_RULE_KERNEL_PROBE_INTERNAL_H | |
077192fd JR |
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/kprobe.h> | |
15 | ||
f2791161 | 16 | struct lttng_event_rule_kernel_probe { |
077192fd JR |
17 | struct lttng_event_rule parent; |
18 | char *name; | |
19 | struct lttng_kernel_probe_location *location; | |
20 | }; | |
21 | ||
f2791161 | 22 | struct lttng_event_rule_kernel_probe_comm { |
077192fd JR |
23 | /* Includes terminator `\0`. */ |
24 | uint32_t name_len; | |
25 | uint32_t location_len; | |
26 | /* | |
27 | * Payload is composed of, in that order: | |
28 | * - name (null terminated), | |
29 | * - kernel probe location object. | |
30 | */ | |
31 | char payload[]; | |
32 | } LTTNG_PACKED; | |
33 | ||
34 | LTTNG_HIDDEN | |
f2791161 | 35 | ssize_t lttng_event_rule_kernel_probe_create_from_payload( |
077192fd JR |
36 | struct lttng_payload_view *payload, |
37 | struct lttng_event_rule **rule); | |
38 | ||
f2791161 | 39 | #endif /* LTTNG_EVENT_RULE_KERNEL_PROBE_INTERNAL_H */ |