+ enum lttng_error_code ret_code;
+ event_rule_create create;
+ event_rule_set_name_pattern set_name_pattern;
+ event_rule_set_filter set_filter;
+ event_rule_add_name_pattern_exclusion add_name_pattern_exclusion;
+
+ LTTNG_ASSERT(event_pattern);
+ LTTNG_ASSERT(trigger_name);
+ LTTNG_ASSERT(condition);
+ LTTNG_ASSERT(trigger);
+
+ /* Set the function pointers based on the domain type. */
+ switch (domain_type) {
+ case LTTNG_DOMAIN_UST:
+ create = lttng_event_rule_user_tracepoint_create;
+ set_name_pattern = lttng_event_rule_user_tracepoint_set_name_pattern;
+ set_filter = lttng_event_rule_user_tracepoint_set_filter;
+ add_name_pattern_exclusion = lttng_event_rule_user_tracepoint_add_name_pattern_exclusion;
+ break;
+ case LTTNG_DOMAIN_KERNEL:
+ create = lttng_event_rule_kernel_tracepoint_create;
+ set_name_pattern = lttng_event_rule_kernel_tracepoint_set_name_pattern;
+ set_filter = lttng_event_rule_kernel_tracepoint_set_filter;
+ add_name_pattern_exclusion = NULL;
+ break;
+ default:
+ abort();
+ break;
+ }