credentials: implement is_equal
[lttng-tools.git] / include / lttng / trigger / trigger-internal.h
... / ...
CommitLineData
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
17struct lttng_payload;
18struct lttng_payload_view;
19
20struct lttng_trigger {
21 struct lttng_condition *condition;
22 struct lttng_action *action;
23};
24
25struct 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
32LTTNG_HIDDEN
33ssize_t lttng_trigger_create_from_payload(struct lttng_payload_view *view,
34 struct lttng_trigger **trigger);
35
36LTTNG_HIDDEN
37int lttng_trigger_serialize(struct lttng_trigger *trigger,
38 struct lttng_payload *payload);
39
40LTTNG_HIDDEN
41const struct lttng_condition *lttng_trigger_get_const_condition(
42 const struct lttng_trigger *trigger);
43
44LTTNG_HIDDEN
45const struct lttng_action *lttng_trigger_get_const_action(
46 const struct lttng_trigger *trigger);
47
48LTTNG_HIDDEN
49bool lttng_trigger_validate(struct lttng_trigger *trigger);
50
51#endif /* LTTNG_TRIGGER_INTERNAL_H */
This page took 0.022628 seconds and 4 git commands to generate.