X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Fcondition%2Fevent-rule-internal.h;fp=include%2Flttng%2Fcondition%2Fevent-rule-internal.h;h=ce1004e61344d62c432383c4b6b14850a40325f7;hp=0000000000000000000000000000000000000000;hb=1831ae68b70dece8e9b847081526495adbbf05e5;hpb=25357057de5ae4dd2a572e8f9b893c1b90cbd60a diff --git a/include/lttng/condition/event-rule-internal.h b/include/lttng/condition/event-rule-internal.h new file mode 100644 index 000000000..ce1004e61 --- /dev/null +++ b/include/lttng/condition/event-rule-internal.h @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2019 - Jonathan Rajotte + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License, version 2.1 only, + * as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef LTTNG_CONDITION_event_rule_INTERNAL_H +#define LTTNG_CONDITION_event_rule_INTERNAL_H + +#include +#include +#include +#include + +struct lttng_condition_event_rule { + struct lttng_condition parent; + struct lttng_event_rule *rule; +}; + +struct lttng_condition_event_rule_comm { + /* length excludes its own length */ + uint32_t length; + /* rule */ + char payload[]; +} LTTNG_PACKED; + +struct lttng_evaluation_event_rule { + struct lttng_evaluation parent; + char *name; +}; + +struct lttng_evaluation_event_rule_comm { + uint32_t trigger_name_length; + /* Trigger name */ + char payload[]; +} LTTNG_PACKED; + + +LTTNG_HIDDEN +ssize_t lttng_condition_event_rule_create_from_buffer( + const struct lttng_buffer_view *view, + struct lttng_condition **condition); + +LTTNG_HIDDEN +enum lttng_condition_status +lttng_condition_event_rule_get_rule_no_const( + const struct lttng_condition *condition, + struct lttng_event_rule **rule); + +LTTNG_HIDDEN +struct lttng_evaluation *lttng_evaluation_event_rule_create(const char* trigger_name); + +LTTNG_HIDDEN +ssize_t lttng_evaluation_event_rule_create_from_buffer( + const struct lttng_buffer_view *view, + struct lttng_evaluation **_evaluation); + +#endif /* LTTNG_CONDITION_event_rule_INTERNAL_H */