From c17abcc0a45298f4846f18f5b4a0edfbad2144ba Mon Sep 17 00:00:00 2001 From: laforge Date: Sat, 5 Nov 2005 16:23:57 +0000 Subject: introduce version field for plugins, refuse loading plugins with different version --- include/ulogd/ulogd.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') 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) -- cgit v1.2.3