2 * Copyright (C) 2019 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_EVENT_RULE_H
9 #define LTTNG_EVENT_RULE_H
15 struct lttng_event_rule
;
17 enum lttng_event_rule_type
{
18 LTTNG_EVENT_RULE_TYPE_UNKNOWN
= -1,
19 LTTNG_EVENT_RULE_TYPE_TRACEPOINT
= 0,
20 LTTNG_EVENT_RULE_TYPE_SYSCALL
= 1,
21 LTTNG_EVENT_RULE_TYPE_KERNEL_PROBE
= 2,
22 LTTNG_EVENT_RULE_TYPE_KRETPROBE
= 3,
23 LTTNG_EVENT_RULE_TYPE_UPROBE
= 4,
26 enum lttng_event_rule_status
{
27 LTTNG_EVENT_RULE_STATUS_OK
= 0,
28 LTTNG_EVENT_RULE_STATUS_ERROR
= -1,
29 LTTNG_EVENT_RULE_STATUS_UNKNOWN
= -2,
30 LTTNG_EVENT_RULE_STATUS_INVALID
= -3,
31 LTTNG_EVENT_RULE_STATUS_UNSET
= -4,
32 LTTNG_EVENT_RULE_STATUS_UNSUPPORTED
= -5,
36 * An event rule describes a set of criteria to be used as a discriminant in
37 * regards to a set of events.
41 * Get the event rule type.
43 * Returns the type of an event rule on success, LTTNG_EVENT_RULE_UNKNOWN on
46 extern enum lttng_event_rule_type
lttng_event_rule_get_type(
47 const struct lttng_event_rule
*event_rule
);
50 * Destroy an event rule object.
52 extern void lttng_event_rule_destroy(struct lttng_event_rule
*rule
);
58 #endif /* LTTNG_EVENT_RULE_H */