diff options
author | laforge <laforge> | 2005-11-05 16:23:57 +0000 |
---|---|---|
committer | laforge <laforge> | 2005-11-05 16:23:57 +0000 |
commit | c17abcc0a45298f4846f18f5b4a0edfbad2144ba (patch) | |
tree | 0a1b96a003abbfd5da8601bd5aa2df82ccdb1c87 /include/ulogd/ulogd.h | |
parent | a579cd853bc878ec93d51756011113eedd3dfcd0 (diff) |
introduce version field for plugins, refuse loading plugins with different version
Diffstat (limited to 'include/ulogd/ulogd.h')
-rw-r--r-- | include/ulogd/ulogd.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/ulogd/ulogd.h b/include/ulogd/ulogd.h index e864e8e..16a2f7a 100644 --- a/include/ulogd/ulogd.h +++ b/include/ulogd/ulogd.h @@ -21,6 +21,7 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define ULOGD_VERSION "2.0.0beta" /* All types with MSB = 1 make use of value.ptr * other types use one of the union's member */ @@ -117,6 +118,8 @@ struct ulogd_pluginstance; struct ulogd_plugin { /* global list of plugins */ struct list_head list; + /* version */ + char *version; /* name of this plugin (predefined by plugin) */ char name[ULOGD_MAX_KEYLEN]; /* ID for this plugin (dynamically assigned) */ @@ -223,7 +226,7 @@ struct ulogd_key *keyh_getres(unsigned int id); /* the key hash itself */ extern struct ulogd_keyh_entry *ulogd_keyh; -#define IS_VALID(x) (x.flags & ULOGD_RETF_VALID) +#define IS_VALID(x) ((x).flags & ULOGD_RETF_VALID) #define SET_VALID(x) (x.flags |= ULOGD_RETF_VALID) #define IS_NEEDED(x) (x.flags & ULOGD_RETF_NEEDED) #define SET_NEEDED(x) (x.flags |= ULOGD_RETF_NEEDED) |