Commit | Line | Data |
---|---|---|
5024c2ac 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 | ||
8 | #ifndef LTTNG_EVENT_RULE_KRETPROBE_H | |
9 | #define LTTNG_EVENT_RULE_KRETPROBE_H | |
10 | ||
11 | #include <lttng/event-rule/event-rule.h> | |
12 | ||
13 | #ifdef __cplusplus | |
14 | extern "C" { | |
15 | #endif | |
16 | ||
17 | /* | |
18 | * TODO: | |
19 | */ | |
20 | extern struct lttng_event_rule *lttng_event_rule_kretprobe_create(void); | |
21 | ||
22 | /* | |
23 | * Set the source of a kretprobe event rule. | |
24 | * | |
25 | * TODO: list possible format | |
26 | * | |
27 | * Return LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID | |
28 | * if invalid parameters are passed. | |
29 | */ | |
30 | extern enum lttng_event_rule_status lttng_event_rule_kretprobe_set_source( | |
31 | struct lttng_event_rule *rule, const char *source); | |
32 | ||
33 | /* | |
34 | * Set the name of a kretprobe event rule. | |
35 | * | |
36 | * The name is copied. | |
37 | * | |
38 | * Return LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID | |
39 | * if invalid parameters are passed. | |
40 | */ | |
41 | extern enum lttng_event_rule_status lttng_event_rule_kretprobe_set_name( | |
42 | struct lttng_event_rule *rule, const char *name); | |
43 | ||
44 | /* | |
45 | * Get the name of a kretprobe event rule. | |
46 | * | |
47 | * The caller does not assume the ownership of the returned name. | |
48 | * The name shall only only be used for the duration of the event | |
49 | * rule's lifetime, or before a different name is set. | |
50 | * | |
51 | * Returns LTTNG_EVENT_RULE_STATUS_OK and a pointer to the event rule's name on | |
52 | * success, LTTNG_EVENT_RULE_STATUS_INVALID if an invalid parameter is passed, | |
53 | * or LTTNG_EVENT_RULE_STATUS_UNSET if a name was not set prior to this call. | |
54 | */ | |
55 | extern enum lttng_event_rule_status lttng_event_rule_kretprobe_get_name( | |
56 | const struct lttng_event_rule *rule, const char **name); | |
57 | ||
58 | #ifdef __cplusplus | |
59 | } | |
60 | #endif | |
61 | ||
62 | #endif /* LTTNG_EVENT_RULE_KRETPROBE_H */ |