Commit | Line | Data |
---|---|---|
df08d338 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 | ||
46fd07ac JR |
8 | #ifndef LTTNG_EVENT_RULE_KERNEL_UPROBE_INTERNAL_H |
9 | #define LTTNG_EVENT_RULE_KERNEL_UPROBE_INTERNAL_H | |
df08d338 JR |
10 | |
11 | #include <common/payload-view.h> | |
12 | #include <common/macros.h> | |
13 | #include <lttng/event-rule/event-rule-internal.h> | |
46fd07ac | 14 | #include <lttng/event-rule/kernel-uprobe.h> |
df08d338 | 15 | |
46fd07ac | 16 | struct lttng_event_rule_kernel_uprobe { |
df08d338 JR |
17 | struct lttng_event_rule parent; |
18 | char *name; | |
19 | struct lttng_userspace_probe_location *location; | |
20 | }; | |
21 | ||
46fd07ac | 22 | struct lttng_event_rule_kernel_uprobe_comm { |
df08d338 JR |
23 | /* Includes terminator `\0`. */ |
24 | uint32_t name_len; | |
25 | /* Includes terminator `\0`. */ | |
26 | uint32_t location_len; | |
27 | /* | |
28 | * Payload is composed of, in that order: | |
29 | * - name (null terminated), | |
30 | * - user space probe location object. | |
31 | */ | |
32 | char payload[]; | |
33 | } LTTNG_PACKED; | |
34 | ||
46fd07ac | 35 | ssize_t lttng_event_rule_kernel_uprobe_create_from_payload( |
df08d338 JR |
36 | struct lttng_payload_view *view, |
37 | struct lttng_event_rule **rule); | |
38 | ||
df08d338 | 39 | struct lttng_userspace_probe_location * |
46fd07ac | 40 | lttng_event_rule_kernel_uprobe_get_location_mutable( |
df08d338 JR |
41 | const struct lttng_event_rule *rule); |
42 | ||
46fd07ac | 43 | #endif /* LTTNG_EVENT_RULE_KERNEL_UPROBE_INTERNAL_H */ |