summaryrefslogtreecommitdiffstats
path: root/include/ulogd/plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ulogd/plugin.h')
-rw-r--r--include/ulogd/plugin.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/include/ulogd/plugin.h b/include/ulogd/plugin.h
index f9f91e0..f35e353 100644
--- a/include/ulogd/plugin.h
+++ b/include/ulogd/plugin.h
@@ -90,13 +90,12 @@ struct db_column;
/* structure describing an input / output parameter of a plugin */
struct ulogd_key {
- union {
- struct ulogd_value val;
- struct ulogd_key *source;
- } u;
+ struct ulogd_key *source;
uint16_t flags;
+ struct ulogd_value val;
+
/*
* Map to database column
*/
@@ -127,13 +126,13 @@ struct ulogd_keyset {
/* key initializers */
#define KEY(t, n) \
{ \
- .u.val.type = ULOGD_RET_ ## t, \
+ .val.type = ULOGD_RET_ ## t, \
.name = (n), \
}
#define KEY_FLAGS(t, n, fl) \
{ \
.flags = (fl), \
- .u.val.type = ULOGD_RET_ ## t, \
+ .val.type = ULOGD_RET_ ## t, \
.name = (n), \
}
#define IPFIX(v, f) \
@@ -143,14 +142,14 @@ struct ulogd_keyset {
}
#define KEY_IPFIX(t, n, v, f) \
{ \
- .u.val.type = ULOGD_RET_ ## t, \
+ .val.type = ULOGD_RET_ ## t, \
.name = (n), \
.ipfix = IPFIX(v, f), \
}
#define KEY_IPFIX_FLAGS(t, n, v, f, fl) \
{ \
.flags = (fl), \
- .u.val.type = ULOGD_RET_ ## t, \
+ .val.type = ULOGD_RET_ ## t, \
.name = (n), \
.ipfix = IPFIX(v, f), \
}
@@ -205,13 +204,13 @@ void key_reset(struct ulogd_key *key);
static inline struct ulogd_key *
key_src(const struct ulogd_key *key)
{
- return key->u.source;
+ return key->source;
}
static inline void
key_set_src(struct ulogd_key *key, struct ulogd_key *src_key)
{
- key->u.source = src_key;
+ key->source = src_key;
}
static inline bool