summaryrefslogtreecommitdiffstats
path: root/include/expression.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2014-01-08 13:02:15 +0000
committerPatrick McHardy <kaber@trash.net>2014-01-08 13:02:15 +0000
commit77ef4d83c8d030b183ff763605b2c3026545fc9c (patch)
tree8ad321d7a8d5f285d84f3873c75f65c408ec11be /include/expression.h
parent8f86606efe82489945db1706bd1d1a4d524afcad (diff)
expr: add protocol context update callback
Add a callback function to the expression ops to update the protocol context for relational protocol expressions (EXPR_F_PROTOCOL). Also set the EXPR_F_PROTOCOL flag for IIFTYPE meta expressions to make sure the callback is invoked when necessary. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/expression.h')
-rw-r--r--include/expression.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/expression.h b/include/expression.h
index 2b7b3795..59b27c08 100644
--- a/include/expression.h
+++ b/include/expression.h
@@ -118,7 +118,9 @@ static inline void expr_set_context(struct expr_ctx *ctx,
* @destroy: destructor, must release inner expressions
* @set_type: function to promote type and byteorder of inner types
* @print: function to print the expression
+ * @pctx_update:update protocol context
*/
+struct proto_ctx;
struct expr_ops {
enum expr_types type;
const char *name;
@@ -128,6 +130,8 @@ struct expr_ops {
const struct datatype *dtype,
enum byteorder byteorder);
void (*print)(const struct expr *expr);
+ void (*pctx_update)(struct proto_ctx *ctx,
+ const struct expr *expr);
};
/**