2 * Copyright (C) 2019 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef LTTNG_EVENT_RULE_SYSCALL_H
19 #define LTTNG_EVENT_RULE_SYSCALL_H
21 #include <lttng/event-rule/event-rule.h>
30 extern struct lttng_event_rule
*lttng_event_rule_syscall_create(void);
33 * Set the pattern of a syscall event rule.
35 * Pattern can contains wildcard '*'. See man lttng-enable-event.
37 * Return LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
38 * if invalid parameters are passed.
40 extern enum lttng_event_rule_status
lttng_event_rule_syscall_set_pattern(
41 struct lttng_event_rule
*rule
, const char *pattern
);
44 * Get the pattern of a tracecpoint event rule.
46 * The caller does not assume the ownership of the returned pattern. The
47 * pattern shall only only be used for the duration of the event rule's
48 * lifetime, or before a different pattern is set.
50 * Returns LTTNG_EVENT_RULE_STATUS_OK and a pointer to the event rule's pattern
51 * on success, LTTNG_EVENT_RULE_STATUS_INVALID if an invalid
52 * parameter is passed, or LTTNG_EVENT_RULE_STATUS_UNSET if a pattern
53 * was not set prior to this call.
55 extern enum lttng_event_rule_status
lttng_event_rule_syscall_get_pattern(
56 const struct lttng_event_rule
*rule
, const char **pattern
);
59 * Set the filter expression of a syscall event rule.
61 * The expression is copied.
63 * Return LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
64 * if invalid parameters are passed.
66 extern enum lttng_event_rule_status
lttng_event_rule_syscall_set_filter(
67 struct lttng_event_rule
*rule
, const char *expression
);
70 * Get the filter expression of a syscall event rule.
72 * The caller does not assume the ownership of the returned filter expression.
73 * The filter expression shall only only be used for the duration of the event
74 * rule's lifetime, or before a different filter expression is set.
76 * Returns LTTNG_EVENT_RULE_STATUS_OK and a pointer to the event rule's filter
77 * expression on success, LTTNG_EVENT_RULE_STATUS_INVALID if an invalid
78 * parameter is passed, or LTTNG_EVENT_RULE_STATUS_UNSET if a filter expression
79 * was not set prior to this call.
81 extern enum lttng_event_rule_status
lttng_event_rule_syscall_get_filter(
82 const struct lttng_event_rule
*rule
, const char **expression
);
88 #endif /* LTTNG_EVENT_RULE_H */
This page took 0.072972 seconds and 5 git commands to generate.