57 #include <arpa2/identity.h>
203 #define RULES_VARINDEX(c) (c - 'a')
225 #define RULES_FLAG(c) ( 1 << (c - 'A') )
313 unsigned tigger_namelen);
402 const char *ruleset,
unsigned rulesetlen,
403 bool permit_selector);
416 char const *flags_rawstr;
443 const char *ruleset,
unsigned rulesetlen,
444 bool permit_selector);
478 const uint8_t *svckey,
unsigned svckeylen,
bool(* rules_selector_upcall)(struct rules_request *self, const a2sel_t *selector)
Rules upcall for selectors; used when ~sel is encountered in a Rule.
Definition: rules.h:320
bool(* rules_flags_upcall)(struct rules_request *self)
Rules upcall for flags; used when FLAGS are encountered in a Rule.
Definition: rules.h:302
void rules_init(void)
Initialise the ARPA2 Rules system.
bool(* rules_endruleset_upcall)(struct rules_request *self)
Rules upcall for the end of a Ruleset.
Definition: rules.h:360
bool rules_process(struct rules_request *req, const char *ruleset, unsigned rulesetlen, bool permit_selector)
Process a Ruleset, causing upcalls as specified in the rules_request. The ruleset is the ext to proce...
void rules_fini(void)
Finalise the ARPA2 Rules system.
bool(* rules_endrule_upcall)(struct rules_request *self)
Rules upcall for the end of a Rule.
Definition: rules.h:340
bool(* rules_trigger_upcall)(struct rules_request *self, rules_trigger trigger_name, unsigned tigger_namelen)
Rules upcall for triggers; used ^trigger is encountered in a Rule.
Definition: rules.h:310
bool rules_dbiterate(struct rules_request *req, const uint8_t *svckey, unsigned svckeylen, const rules_name name, const a2sel_t *iter0)
Iterate over an ARPA2 Selector for an identity to find the most concrete Ruleset; once found,...
uint8_t * rules_typeref
A reference to the 16-byte array of a rules_type.
Definition: rules.h:139
char const * rules_trigger
Triggers reference a ^trigger name.
Definition: rules.h:238
unsigned rules_varray_len[26]
The corresponding lengths for rules_varray_ptr.
Definition: rules.h:192
char const * rules_varray_ptr[26]
Rules Variables form a set of 26 variables named a through z that never have value NULL but may be em...
Definition: rules.h:188
uint32_t rules_flags
Flags in a bit mask.
Definition: rules.h:214
char * rules_domain
Rules Domains are UTF-8 representations of a Fully Qualified Domain Name.
Definition: rules.h:99
uint8_t rules_type[16]
Rules Types are 128-bit "well-known service identities".
Definition: rules.h:134
char * rules_name
Rules Names represent instances of a Rules Type.
Definition: rules.h:167
Storage structure for Quick Iteration.
Definition: identity.h:526
ARPA2 Selector.
Definition: identity.h:165