2 * Copyright (C) 2019 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_EVENT_RULE_SYSCALL_H
9 #define LTTNG_EVENT_RULE_SYSCALL_H
11 #include <lttng/event-rule/event-rule.h>
18 * Create a newly allocated syscall event rule.
20 * Returns a new event rule on success, NULL on failure. This event rule must be
21 * destroyed using lttng_event_rule_destroy().
23 extern struct lttng_event_rule
*lttng_event_rule_syscall_create(void);
26 * Set the pattern of a syscall event rule.
28 * Pattern can contain wildcard '*'. See man lttng-enable-event.
30 * The pattern is copied internally.
32 * Returns LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
33 * if invalid parameters are passed.
35 extern enum lttng_event_rule_status
lttng_event_rule_syscall_set_pattern(
36 struct lttng_event_rule
*rule
, const char *pattern
);
39 * Get the pattern of a syscall event rule.
41 * The caller does not assume the ownership of the returned pattern. The
42 * pattern shall only only be used for the duration of the event rule's
43 * lifetime, or before a different pattern is set.
45 * Returns LTTNG_EVENT_RULE_STATUS_OK and a pointer to the event rule's pattern
46 * on success, LTTNG_EVENT_RULE_STATUS_INVALID if an invalid
47 * parameter is passed, or LTTNG_EVENT_RULE_STATUS_UNSET if a pattern
48 * was not set prior to this call.
50 extern enum lttng_event_rule_status
lttng_event_rule_syscall_get_pattern(
51 const struct lttng_event_rule
*rule
, const char **pattern
);
54 * Set the filter expression of a syscall event rule.
56 * The expression is copied internally.
58 * Returns LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
59 * if invalid parameters are passed.
61 extern enum lttng_event_rule_status
lttng_event_rule_syscall_set_filter(
62 struct lttng_event_rule
*rule
, const char *expression
);
65 * Get the filter expression of a syscall event rule.
67 * The caller does not assume the ownership of the returned filter expression.
68 * The filter expression shall only only be used for the duration of the event
69 * rule's lifetime, or before a different filter expression is set.
71 * Returns LTTNG_EVENT_RULE_STATUS_OK and a pointer to the event rule's filter
72 * expression on success, LTTNG_EVENT_RULE_STATUS_INVALID if an invalid
73 * parameter is passed, or LTTNG_EVENT_RULE_STATUS_UNSET if a filter expression
74 * was not set prior to this call.
76 extern enum lttng_event_rule_status
lttng_event_rule_syscall_get_filter(
77 const struct lttng_event_rule
*rule
, const char **expression
);
83 #endif /* LTTNG_EVENT_RULE_SYSCALL_H */
This page took 0.031357 seconds and 4 git commands to generate.