diff options
author | Patrick McHardy <kaber@trash.net> | 2009-03-31 04:14:26 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-03-31 04:14:26 +0200 |
commit | 4fee12b4b0a837b4d34d21be99cda8185563f784 (patch) | |
tree | 129d65c66938c3851be3a3a35eb6523e5fef8791 /src/expression.c | |
parent | 53fc2c7a799877c5859298bd16b578711af9cca2 (diff) |
datatype: maintain table of all datatypes and add registration/lookup function
Add a table containing all available datatypes and registration/lookup functions.
This will be used to associate a stand-alone set in the kernel with the correct
type without parsing the entire ruleset.
Additionally it would now be possible to remove the global declarations for the
core types. Not done yet though.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/expression.c')
-rw-r--r-- | src/expression.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/expression.c b/src/expression.c index dba5331d..ba4bda17 100644 --- a/src/expression.c +++ b/src/expression.c @@ -78,12 +78,13 @@ void expr_describe(const struct expr *expr) const struct datatype *dtype = expr->dtype; const char *delim = ""; - printf("%s expression, datatype %s", expr->ops->name, dtype->name); + printf("%s expression, datatype %s (%s)", + expr->ops->name, dtype->name, dtype->desc); if (dtype->basetype != NULL) { printf(" (basetype "); for (dtype = dtype->basetype; dtype != NULL; dtype = dtype->basetype) { - printf("%s%s", delim, dtype->name); + printf("%s%s", delim, dtype->desc); delim = ", "; } printf(")"); |