diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-05-23 13:12:25 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-05-23 13:12:25 +0200 |
commit | 734e9fb8a933898cd3396786c06728bce6a754e5 (patch) | |
tree | 610ffaa2286fc604be4b2f1c30a983f0076b1da8 /conf | |
parent | bb7aa06a48f52813a019861a0e06ce9fe4d20c4b (diff) |
Minor cleanups and fixes
Diffstat (limited to 'conf')
-rw-r--r-- | conf/flowspec.Y | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/conf/flowspec.Y b/conf/flowspec.Y index a47d453b..8c72854c 100644 --- a/conf/flowspec.Y +++ b/conf/flowspec.Y @@ -44,19 +44,19 @@ CF_GRAMMAR /* Network Flow Specification */ flow_num_op: - TRUE { $$ = 0b000; } - | '=' { $$ = 0b001; } - | NEQ { $$ = 0b110; } - | '<' { $$ = 0b100; } - | LEQ { $$ = 0b101; } - | '>' { $$ = 0b010; } - | GEQ { $$ = 0b011; } - | FALSE { $$ = 0b111; } + TRUE { $$ = FLOW_OP_TRUE; } + | '=' { $$ = FLOW_OP_EQ; } + | NEQ { $$ = FLOW_OP_NEQ; } + | '<' { $$ = FLOW_OP_LT; } + | LEQ { $$ = FLOW_OP_LEQ; } + | '>' { $$ = FLOW_OP_GT; } + | GEQ { $$ = FLOW_OP_GEQ; } + | FALSE { $$ = FLOW_OP_FALSE; } ; flow_logic_op: - OR { $$ = 0x00; } - | AND { $$ = 0x40; } + OR { $$ = FLOW_OP_OR; } + | AND { $$ = FLOW_OP_AND; } ; flow_num_type_: @@ -97,13 +97,13 @@ flow_num_opts: flow_num_opt_ext_expr: expr { flow_check_cf_value_length(this_flow, $1); - flow_builder_add_op_val(this_flow, 0b001, $1); + flow_builder_add_op_val(this_flow, FLOW_OP_EQ, $1); } | expr DDOT expr { flow_check_cf_value_length(this_flow, $1); flow_check_cf_value_length(this_flow, $3); - flow_builder_add_op_val(this_flow, 0b011, $1); /* >= */ - flow_builder_add_op_val(this_flow, 0x40 | 0b101, $3); /* AND <= */ + flow_builder_add_op_val(this_flow, FLOW_OP_GEQ, $1); + flow_builder_add_op_val(this_flow, FLOW_OP_AND | FLOW_OP_LEQ, $3); } ; |