Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions bbinc/comdb2_ruleset.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define _COMDB2_RULESET_H_

#include <stddef.h>
#include <stdlib.h>

#ifndef FPSZ
#define FPSZ 16 /* stolen from "sql.h" FINGERPRINTSZ */
Expand Down Expand Up @@ -144,6 +145,8 @@ struct ruleset_item_criteria {
unsigned char *pFingerprint; /* Obtained via "clnt->work.aFingerprint".
* If not NULL this will be matched using
* memcmp(). */

char *zIdentity;
};

struct ruleset_item_criteria_cache {
Expand All @@ -158,6 +161,9 @@ struct ruleset_item_criteria_cache {

void *pSqlRe; /* This is the cached regular expression for
* the SQL pattern, if needed. */

void *pIdentityRe; /* This is the cached regular expression for
* the identity pattern, if needed. */
};

struct ruleset_item {
Expand Down Expand Up @@ -232,15 +238,12 @@ typedef enum ruleset_string_match ruleset_string_match_t;
typedef enum ruleset_match ruleset_match_t;
typedef enum ruleset_match_mode ruleset_match_mode_t;

int comdb2_ruleset_fingerprints_allowed(void);

int comdb2_load_ruleset_item_criteria(
const char *zFileName,
int lineNo,
char *zBuf,
size_t nBuf,
int noCase,
int bAllowFingerprint,
int bStrictFingerprint,
struct ruleset_item_criteria *criteria,
struct ruleset_item_criteria_cache *cache,
Expand Down Expand Up @@ -271,7 +274,11 @@ size_t comdb2_ruleset_result_to_str(
int comdb2_enable_ruleset_item(struct ruleset *rules, int ruleNo, int bEnable);
void comdb2_dump_ruleset(struct ruleset *rules);
void comdb2_free_ruleset(struct ruleset *rules);
int comdb2_load_ruleset(const char *zFileName, struct ruleset **pRules);
int comdb2_save_ruleset(const char *zFileName, struct ruleset *rules);

int comdb2_load_ruleset_filename(const char *zFileName, struct ruleset **pRules);
int comdb2_load_ruleset_buf(const char *ruleset, struct ruleset **rules);
int comdb2_load_ruleset_fp(struct ruleset **pRules, FILE *fp, const char *zFileName);

extern struct ruleset *gbl_ruleset;
#endif /* _COMDB2_RULESET_H_ */
1 change: 1 addition & 0 deletions bbinc/thdpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ void thdpool_command_to_all(char *line, int lline, int st);
void thdpool_set_dump_on_full(struct thdpool *pool, int onoff);
/* TODO: maybe thdpool_set_event_callback, to call for various life cycle events? */
void thdpool_set_queued_callback(struct thdpool *pool, void(*callback)(void*));
char *thdpool_name(struct thdpool *pool);

int thdpool_lock(struct thdpool *pool);
int thdpool_unlock(struct thdpool *pool);
Expand Down
Loading
Loading