#define LTTNG_EVENT_RULE_INTERNAL_H
#include <common/macros.h>
+#include <common/credentials.h>
#include <lttng/domain.h>
#include <lttng/event-rule/event-rule.h>
#include <lttng/lttng-error.h>
struct lttng_payload_view *view,
struct lttng_event_rule **event_rule);
typedef enum lttng_error_code (*event_rule_generate_filter_bytecode_cb)(
- struct lttng_event_rule *event_rule, uid_t uid, gid_t gid);
+ struct lttng_event_rule *event_rule,
+ const struct lttng_credentials *creds);
typedef const char *(*event_rule_get_filter_cb)(
const struct lttng_event_rule *event_rule);
typedef const struct lttng_filter_bytecode *(
const struct lttng_event_rule *event_rule);
typedef struct lttng_event_exclusion *(*event_rule_generate_exclusions_cb)(
const struct lttng_event_rule *event_rule);
+typedef unsigned long (*event_rule_hash_cb)(
+ const struct lttng_event_rule *event_rule);
struct lttng_event_rule {
struct urcu_ref ref;
event_rule_get_filter_cb get_filter;
event_rule_get_filter_bytecode_cb get_filter_bytecode;
event_rule_generate_exclusions_cb generate_exclusions;
+ event_rule_hash_cb hash;
};
struct lttng_event_rule_comm {
LTTNG_HIDDEN
enum lttng_error_code lttng_event_rule_generate_filter_bytecode(
- struct lttng_event_rule *rule, uid_t uid, gid_t gid);
+ struct lttng_event_rule *rule,
+ const struct lttng_credentials *creds);
/*
* If not present/implemented returns NULL.
LTTNG_HIDDEN
const char *lttng_event_rule_type_str(enum lttng_event_rule_type type);
+LTTNG_HIDDEN
+unsigned long lttng_event_rule_hash(const struct lttng_event_rule *rule);
+
#endif /* LTTNG_EVENT_RULE_INTERNAL_H */