X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=include%2Flttng%2Fcondition%2Fevent-rule.h;h=170f381609c99495000355cf1e6c87512b255525;hb=81d566c913e31b5dbd6ec304e679a3b248abec2b;hp=91fce32d63a22a91858866d8342bb0c599f051b9;hpb=381140130b556bdccc8c7a45d843dcd34c6d7b8f;p=lttng-tools.git diff --git a/include/lttng/condition/event-rule.h b/include/lttng/condition/event-rule.h index 91fce32d6..170f38160 100644 --- a/include/lttng/condition/event-rule.h +++ b/include/lttng/condition/event-rule.h @@ -17,6 +17,7 @@ extern "C" { #endif struct lttng_event_expr; +struct lttng_event_field_value; /** * Event rule conditions allows an action to be taken whenever an event matching @@ -74,6 +75,30 @@ lttng_evaluation_event_rule_get_trigger_name( const struct lttng_evaluation *evaluation, const char **name); +/* + * Sets `*field_val` to the array event field value of the event rule + * condition evaluation `evaluation` which contains its captured values. + * + * Returns: + * + * `LTTNG_EVALUATION_STATUS_OK`: + * Success. + * + * `*field_val` is an array event field value with a length of at + * least one. + * + * `LTTNG_EVALUATION_STATUS_INVALID`: + * * `evaluation` is `NULL`. + * * The type of the condition of `evaluation` is not + * `LTTNG_CONDITION_TYPE_EVENT_RULE_HIT`. + * * The condition of `evaluation` has no capture descriptors. + * * `field_val` is `NULL`. + */ +extern enum lttng_evaluation_status +lttng_evaluation_event_rule_get_captured_values( + const struct lttng_evaluation *evaluation, + const struct lttng_event_field_value **field_val); + /* * Appends (transfering the ownership) the capture descriptor `expr` to * the event rule condition `condition`. @@ -98,6 +123,9 @@ lttng_evaluation_event_rule_get_trigger_name( * * `LTTNG_EVENT_EXPR_TYPE_CHANNEL_CONTEXT_FIELD` * * `LTTNG_EVENT_EXPR_TYPE_APP_SPECIFIC_CONTEXT_FIELD` * * `LTTNG_EVENT_EXPR_TYPE_ARRAY_FIELD_ELEMENT` + * + * `LTTNG_CONDITION_STATUS_UNSUPPORTED`: + * * The associated event-rule does not support runtime capture. */ extern enum lttng_condition_status lttng_condition_event_rule_append_capture_descriptor(