2cef67d077d3cf47bd08104c75faacb9ea31a200
[lttng-tools.git] / include / lttng / trigger / trigger-internal.h
1 /*
2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8 #ifndef LTTNG_TRIGGER_INTERNAL_H
9 #define LTTNG_TRIGGER_INTERNAL_H
10
11 #include <lttng/trigger/trigger.h>
12 #include <common/macros.h>
13 #include <stdint.h>
14 #include <stdbool.h>
15 #include <sys/types.h>
16
17 struct lttng_payload;
18 struct lttng_payload_view;
19
20 struct lttng_trigger {
21 struct lttng_condition *condition;
22 struct lttng_action *action;
23 };
24
25 struct lttng_trigger_comm {
26 /* length excludes its own length. */
27 uint32_t length;
28 /* A condition and action object follow. */
29 char payload[];
30 } LTTNG_PACKED;
31
32 LTTNG_HIDDEN
33 ssize_t lttng_trigger_create_from_payload(struct lttng_payload_view *view,
34 struct lttng_trigger **trigger);
35
36 LTTNG_HIDDEN
37 int lttng_trigger_serialize(struct lttng_trigger *trigger,
38 struct lttng_payload *payload);
39
40 LTTNG_HIDDEN
41 const struct lttng_condition *lttng_trigger_get_const_condition(
42 const struct lttng_trigger *trigger);
43
44 LTTNG_HIDDEN
45 const struct lttng_action *lttng_trigger_get_const_action(
46 const struct lttng_trigger *trigger);
47
48 LTTNG_HIDDEN
49 bool lttng_trigger_validate(struct lttng_trigger *trigger);
50
51 #endif /* LTTNG_TRIGGER_INTERNAL_H */
This page took 0.029306 seconds and 3 git commands to generate.