From 4fee12b4b0a837b4d34d21be99cda8185563f784 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Tue, 31 Mar 2009 04:14:26 +0200 Subject: 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 --- src/expression.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/expression.c') 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(")"); -- cgit v1.2.3