Move to kernel style SPDX license identifiers
[lttng-tools.git] / include / lttng / trigger / trigger-internal.h
CommitLineData
a58c490f 1/*
ab5be9fa 2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
a58c490f 3 *
ab5be9fa 4 * SPDX-License-Identifier: LGPL-2.1-only
a58c490f 5 *
a58c490f
JG
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 <common/buffer-view.h>
3647288f 14#include <common/dynamic-buffer.h>
a58c490f
JG
15#include <stdint.h>
16#include <stdbool.h>
72756a3f 17#include <sys/types.h>
a58c490f
JG
18
19struct lttng_trigger {
20 struct lttng_condition *condition;
21 struct lttng_action *action;
22};
23
24struct lttng_trigger_comm {
25 /* length excludes its own length. */
26 uint32_t length;
27 /* A condition and action object follow. */
28 char payload[];
29} LTTNG_PACKED;
30
31LTTNG_HIDDEN
32ssize_t lttng_trigger_create_from_buffer(const struct lttng_buffer_view *view,
33 struct lttng_trigger **trigger);
34
35LTTNG_HIDDEN
3647288f
JG
36int lttng_trigger_serialize(struct lttng_trigger *trigger,
37 struct lttng_dynamic_buffer *buf);
a58c490f 38
9b63a4aa
JG
39LTTNG_HIDDEN
40const struct lttng_condition *lttng_trigger_get_const_condition(
41 const struct lttng_trigger *trigger);
42
43LTTNG_HIDDEN
44const struct lttng_action *lttng_trigger_get_const_action(
45 const struct lttng_trigger *trigger);
46
a58c490f
JG
47LTTNG_HIDDEN
48bool lttng_trigger_validate(struct lttng_trigger *trigger);
49
50#endif /* LTTNG_TRIGGER_INTERNAL_H */
This page took 0.036532 seconds and 5 git commands to generate.