diff options
author | Patrick McHardy <kaber@trash.net> | 2009-03-20 08:34:59 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-03-20 08:34:59 +0100 |
commit | 878cc0e4e863e6b2c9fa71f791d35245b3ddbdb2 (patch) | |
tree | bd29fb4134cc513820af99f196671264b4c367dc /include | |
parent | 5c40780440c0e8661fc7cfcec72dab48b934631d (diff) |
Add support for user-defined symbolic constants
User-defined constants can be used like this:
define allowed_hosts = { 192.168.0.0/24, 10.0.0.20-10.0.0.30 }
define udp_services = domain
define tcp_services = { ssh, domain }
ip saddr $allowed_hosts udp dport $udp_services counter accept
ip saddr $allowed_hosts tcp dport $tcp_services counter accept
Recursive definitions are possible, but currently not fully handled.
Anything requiring transformations (sets using ranges) can not be
used more than once currently since the expressions need to be COW'ed
previously.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/expression.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/expression.h b/include/expression.h index e9d21cfc..d4222060 100644 --- a/include/expression.h +++ b/include/expression.h @@ -55,6 +55,7 @@ enum expr_types { enum ops { OP_INVALID, + OP_IMPLICIT, /* Unary operations */ OP_HTON, OP_NTOH, @@ -172,6 +173,7 @@ struct expr { struct { /* EXPR_SYMBOL */ const struct datatype *sym_type; + const struct scope *scope; const char *identifier; }; struct { |