diff options
author | Patrick McHardy <kaber@trash.net> | 2014-02-16 22:45:19 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2014-02-17 17:17:18 +0000 |
commit | 4a11511e936b5d38837137c9d04f047d4dab2c8f (patch) | |
tree | 9b4031c7a8e04412f024d5620f691bb4444f7420 /include/expression.h | |
parent | 5a140c9cf95724f971ec9cb40217bea8fc4d089f (diff) |
netlink_delinarize: convert *all* bitmask values into individual bit values
We're currently only converting bitmask types as direct argument to a
relational expression in the form of a flagcmp (expr & mask neq 0) back
into a list of bit values. This means expressions like:
tcp flags & (syn | ack) == syn | ack
won't be shown symbolically. Convert *all* bitmask values back to a sequence
of inclusive or expressions of the individual bits. In case of a flagcmp,
this sequence is further converted to a list (tcp flags syn,ack).
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/expression.h')
-rw-r--r-- | include/expression.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/expression.h b/include/expression.h index 5128a5bb..ac6a4f4a 100644 --- a/include/expression.h +++ b/include/expression.h @@ -316,6 +316,12 @@ extern struct expr *constant_expr_join(const struct expr *e1, const struct expr *e2); extern struct expr *constant_expr_splice(struct expr *expr, unsigned int len); +extern struct expr *flag_expr_alloc(const struct location *loc, + const struct datatype *dtype, + enum byteorder byteorder, + unsigned int len, unsigned long n); +extern struct expr *bitmask_expr_to_binops(struct expr *expr); + extern struct expr *prefix_expr_alloc(const struct location *loc, struct expr *expr, unsigned int prefix_len); |